[BUG] unknown node type 0. Very Weird.

A

Andrew Walrond

I'm getting this:

[BUG] unknown node type 0
ruby 1.8.2 (2004-08-22) [i686-linux]

Aborted

If I remove a BLANK LINE in my code!

The code in question follows. The blank line is immediately after
the .fwrite()

def build()
unpack().cd
'DEFAULTS/Defaults.linux'.fwrite(
'#ident "%W% %E% %Q%"',
'DEFCCOM= cc',
'CWARNOPTS=',
'DEFINCDIRS= $(SRCROOT)/include /usr/src/linux/include',
'LDPATH= -L/lib',
'RUNPATH= -R $(INS_BASE)/lib -R $(OLIBSDIR)',
"INS_BASE= #{prefix}",
'INS_KBASE= /',
'DEFUMASK= 002',
'DEFINSMODEF= 444',
'DEFINSMODEX= 755',
'DEFINSUSR= cdrtools',
'DEFINSGRP= cdrtools'
)
-----------BLANK LINE HERE - BUG IF REMOVED----------------
bash "./Gmake.linux -j#{$mj}"
bash "./Gmake.linux install"
end

I have seen this bug before, and it always seems to be comment (#) or white
space related. Any clues? This very complex script runs perfectly with blank
line in place.

Andrew Walrond
 
T

ts

A> I'm getting this:
A> [BUG] unknown node type 0
A> ruby 1.8.2 (2004-08-22) [i686-linux]

Give the complete source of your script, if it don't use C extension.

If it use C extension, verify first these extensions.

Guy Decoux
 
A

Andrew Walrond

A> I'm getting this:
A> [BUG] unknown node type 0
A> ruby 1.8.2 (2004-08-22) [i686-linux]

Give the complete source of your script, if it don't use C extension.

If it use C extension, verify first these extensions.

Guy Decoux

No C extensions. I checked my work into version control; exported a copy to
send, tested.....work fine :(

Scrathed head, went back to original repo, tested...worked fine !?!

Something very strange is going on here. Smacks of an unintialised var or
similar.

What exactly does 'unknown node type 0' mean? perhaps that would help me to
chase this down.

Andrew Walrond
 
T

ts

A> Scrathed head, went back to original repo, tested...worked fine !?!

If you can reproduce easily the problem, don't modify the source and post
it to ruby-talk or send it to me.

A> What exactly does 'unknown node type 0' mean?

ruby has a problem with the gc


Guy Decoux
 
A

Andrew Walrond

If you can reproduce easily the problem, don't modify the source and post
it to ruby-talk or send it to me.

It steadfastly refuses to fail now. Next time I see it, I'll catch a copy
immediately and send it in
ruby has a problem with the gc

gc? galatic centre?
 
A

Andrew Walrond

Ok; This has just started happening again.

I would really like to get to the bottom of this. Any debugging suggestions
appreciated.

To reiterate; This is running on a linux 2.6.8.1 system, and is an
intermittent problem which appears occasionally as I work on the code. If I
edit the code, randomly; adding a blank line or something; The problem goes
away. If I copy the code to another directory, and run it from there, it
works fine. Follow this example session carefully and become as puzzled as
I...

andrew@orac rubyx $ ls -l
total 168
drwxrwxr-x 7 andrew users 4096 Sep 15 12:01 BitKeeper
drwxrwxr-x 2 andrew users 4096 Sep 15 12:00 SCCS
drwxrwxr-x 3 andrew users 4096 Sep 15 12:01 contrib
drwxrwxr-x 3 andrew users 4096 Aug 24 16:31 lib
lrwxrwxr-x 1 andrew users 10 Sep 15 12:01 rubyx -> sbin/rubyx
drwxrwxr-x 3 andrew users 4096 Sep 16 10:54 sbin
-rw-r--r-- 1 andrew users 138745 Sep 16 14:35 strace.log
-rwxr-xr-x 1 andrew users 28 Sep 16 14:35 test
drwxrwxr-x 5 andrew users 4096 Sep 15 12:01 www

[NOTICE THE SYMLINK]

andrew@orac rubyx $ ./rubyx
[BUG] unknown node type 0
ruby 1.8.2 (2004-08-22) [i686-linux]

Aborted

[BROKEN RUNNING FROM SYMLINK]

andrew@orac rubyx $ sbin/rubyx
Rubyx (DEVELOPMENT)

[WORKS RUNNING FROM PATH]

andrew@orac rubyx $ cd ..
andrew@orac ~ $ mkdir test
andrew@orac ~ $ cd test
andrew@orac test $ cp -rpd ../rubyx .
andrew@orac test $ cd rubyx/
andrew@orac rubyx $ ls -l
total 168
drwxrwxr-x 7 andrew users 4096 Sep 15 12:01 BitKeeper
drwxrwxr-x 2 andrew users 4096 Sep 15 12:00 SCCS
drwxrwxr-x 3 andrew users 4096 Sep 15 12:01 contrib
drwxrwxr-x 3 andrew users 4096 Aug 24 16:31 lib
lrwxrwxrwx 1 andrew users 10 Sep 16 15:01 rubyx -> sbin/rubyx
drwxrwxr-x 3 andrew users 4096 Sep 16 10:54 sbin
-rw-r--r-- 1 andrew users 138745 Sep 16 14:35 strace.log
-rwxr-xr-x 1 andrew users 28 Sep 16 14:35 test
drwxrwxr-x 5 andrew users 4096 Sep 15 12:01 www

andrew@orac rubyx $ ./rubyx
Rubyx (DEVELOPMENT)

[WORKS FROM SYMLINK ON COPY!]

andrew@orac rubyx $ cd ../rubyx/
andrew@orac rubyx $ ./rubyx
Rubyx (DEVELOPMENT)

[AND FROM PATH]

Weird huh?

I also compiled a version of ruby with debug info, but that works just fine,
even on original copy of source, so running with gdb doesn't help.

I have managed to use strace on the working and broken cases, which might help
shed some light for the ruby developers.

A snapshot around the problem area for the working case:

open("/home/andrew/test/rubyx/lib/ruby/site_ruby/rubyx/packages/gnome.rb",
O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=37514, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x4024e000
read(3, "class Pkg_Gnome < Package\n def "..., 4096) = 4096
read(3, "glib\',\'gnome-vfs\',\'gtkplus\',\'gai"..., 4096) = 4096
read(3, "8e7460fc6c985724500470b1-gdm-2.6"..., 4096) = 4096
read(3, "r.bz2\'],\'c\'=>\'-O3\',\'c++\'=>\'-O3\'}"..., 4096) = 4096
read(3, "\'0.3.3\'=>{\'files\'=>[\'ww://ww.rub"..., 4096) = 4096
read(3, "se newer pwlib\n\t\t#\t\'configure\'.f"..., 4096) = 4096
read(3, "5c03edd1138136f925d14e81fcaf4420"..., 4096) = 4096
read(3, "omePackage\n\tdef initialize()\n\t\ts"..., 4096) = 4096
read(3, "kage\n\tdef initialize()\n\t\tsuper(\'"..., 4096) = 4096
mmap2(NULL, 1167360, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x402ee000
read(3, "71648410da984b49fd596bf3350bddb2"..., 4096) = 650
read(3, "", 4096) = 0
close(3) = 0
munmap(0x4024e000, 4096) = 0
lstat64("/home/andrew/test/rubyx/lib/ruby/site_ruby/rubyx/packages/gnupg.rb",
{st_mode=S_IFREG|0444, st_size=612, ...}) = 0
stat64("/home/andrew/test/rubyx/lib/ruby/site_ruby/rubyx/packages/gnupg.rb",
{st_mode=S_IFREG|0444, st_size=612, ...}) = 0
open("/home/andrew/test/rubyx/lib/ruby/site_ruby/rubyx/packages/gnupg.rb",
O_RDONLY|O_LARGEFILE) = 3
close(3) = 0

And for the broken case:

open("/home/andrew/rubyx/lib/ruby/site_ruby/rubyx/packages/gnome.rb",
O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=37514, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x4024e000
read(3, "class Pkg_Gnome < Package\n def "..., 4096) = 4096
read(3, "glib\',\'gnome-vfs\',\'gtkplus\',\'gai"..., 4096) = 4096
read(3, "8e7460fc6c985724500470b1-gdm-2.6"..., 4096) = 4096
read(3, "r.bz2\'],\'c\'=>\'-O3\',\'c++\'=>\'-O3\'}"..., 4096) = 4096
read(3, "\'0.3.3\'=>{\'files\'=>[\'ww://ww.rub"..., 4096) = 4096
read(3, "se newer pwlib\n\t\t#\t\'configure\'.f"..., 4096) = 4096
read(3, "5c03edd1138136f925d14e81fcaf4420"..., 4096) = 4096
read(3, "omePackage\n\tdef initialize()\n\t\ts"..., 4096) = 4096
read(3, "kage\n\tdef initialize()\n\t\tsuper(\'"..., 4096) = 4096
mmap2(NULL, 1167360, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x402ee000
read(3, "71648410da984b49fd596bf3350bddb2"..., 4096) = 650
read(3, "", 4096) = 0
close(3) = 0
munmap(0x4024e000, 4096) = 0
write(2, "[BUG] ", 6[BUG] ) = 6
write(2, "unknown node type 0", 19unknown node type 0) = 19
write(2, "\nruby 1.8.2 (2004-08-22) [i686-l"..., 39

I can supply the full source tarball if that is useful.

Any suggestions?

Andrew Walrond

PS This machine is otherwise rock solid, and has been thoroughly tested with
memtest, so it's unlikely to be flakey hardware.
Ruby was compiled with gcc 3.4.1 and CFLAGS='-march=i686 -O2'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top