
rubyenterpriseedition - issue #6
FreeBSD: miniruby dies with Illegal Instruction if --enable-pthread is set
When building on FreeBSD 7.0 or 7.1, the build is interrupted with Illegal Instruction if --enable-pthread is set (with or without --no-tmalloc). I use the following command for repeated tests:
------- 8< ------ 8< ------
make -C source distclean; CFLAGS="-I/usr/local/include" LDFLAGS="-L/
usr/local/lib" ./installer -c --enable-pthread -a /opt/ruby- enterprise-1.8.7-20090928 --no-tcmalloc ------- 8< ------ 8< ------
everything goes fine until miniruby's ready:
------- 8< ------ 8< ------ ... gcc -g -Os -fno-stack-protector -I/usr/local/include -DRUBY_EXPORT - L. -L/usr/local/lib -rdynamic main.o libruby-static.a -Wl,-rpath,/ opt/ruby-enterprise-1.8.7-20090928/lib -L/opt/ruby- enterprise-1.8.7-20090928/lib -lpthread -lrt -lcrypt -lm -o miniruby Illegal instruction (core dumped) * Error code 132 ------- 8< ------ 8< ------
While it's not shown, this Illegal Instruction is for miniruby's first call:
------- 8< ------ 8< ------
cd source
gdb miniruby miniruby.core
GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd"... Core was generated by `miniruby'. Program terminated with signal 4, Illegal instruction. Reading symbols from /lib/libthr.so.3...done. Loaded symbols for /lib/libthr.so.3 Reading symbols from /usr/lib/librt.so.1...done. Loaded symbols for /usr/lib/librt.so.1 Reading symbols from /lib/libcrypt.so.4...done. Loaded symbols for /lib/libcrypt.so.4 Reading symbols from /lib/libm.so.5...done. Loaded symbols for /lib/libm.so.5 Reading symbols from /lib/libc.so.7...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1
0 0x0806d488 in garbage_collect () at gc.c:2189
2189 garbage_collect_0(top); [New Thread 0x28301100 (LWP 100239)] (gdb) bt
0 0x0806d488 in garbage_collect () at gc.c:2189
1 0x0806d4e6 in rb_newobj () at gc.c:1000
2 0x08084d9d in rb_node_newnode (type=NODE_NEWLINE, a0=0, a1=0,
a2=674271240) at parse.y:4592
3 0x080850d1 in newline_node (node=Variable "node" is not available.
) at parse.y:4630
4 0x08089cd3 in ruby_yyparse () at parse.y:413
5 0x0808df29 in yycompile (f=0x2835dd60 "./lib/fileutils.rb",
line=1) at parse.y:2692
6 0x080a09ee in load_file (fname=0x2835dd60 "./lib/fileutils.rb",
script=0) at ruby.c:977
7 0x080652d6 in rb_load (fname=674373500, wrap=0) at eval.c:7174
8 0x080657fd in rb_require_safe (fname=674396240, safe=0) at eval.c:
7554
9 0x0805c30b in rb_call0 (klass=674471060, recv=674466120, id=9769,
oid=9769, argc=1, argv=0xbfbfe4c0, body=0x2832a2d0, flags=Variable "flags" is not available. ) at eval.c:6048
10 0x0805cc68 in rb_call (klass=674471060, recv=674466120, mid=9769,
argc=1, argv=0xbfbfe4c0, scope=1, self=674466120) at eval.c:6297
11 0x080639cb in eval_fcall (self=674466120, node=0x28327828) at
eval.c:3394
12 0x08059620 in rb_eval (self=674466120, node=0x28327800) at eval.c:
3856
13 0x08066573 in ruby_exec_internal () at eval.c:1683
14 0x0806659e in ruby_exec () at eval.c:1703
15 0x080665be in ruby_run () at eval.c:1713
16 0x08053d28 in main (argc=Cannot access memory at address 0x3ef69d8
) at main.c:48 ------- 8< ------ 8< ------
I tried with the following OSes:
FreeBSD md2 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #0: Thu May 8 23:13:02 CEST 2008 root@:/usr/obj/usr/src/sys/GENERIC i386
FreeBSD cissp.hu 7.1-RELEASE-p2 FreeBSD 7.1-RELEASE-p2 #0: Sun Feb 1 13:58:46 CET 2009 root@kasparov.cissp.hu:/usr/obj/usr/src/sys/FP amd64
FreeBSD web2 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
Comment #1
Posted on Dec 10, 2009 by Massive RabbitSame with:
FreeBSD tigrannanyan.ispvds.com 6.3-STABLE FreeBSD 6.3-STABLE #4: Thu Nov 5 03:57:38 CET 2009 root@dione.ispsystem.net:/root/src/sys/i386/compile/ISPSYSTEM_PAE i386
Comment #2
Posted on Jan 21, 2010 by Swift WombatSame with:
FreeBSD homestar 6.2-RELEASE-p11 FreeBSD 6.2-RELEASE-p11 #0: Wed Feb 13 07:00:04 UTC 2008
root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/SMP i386
Comment #3
Posted on Feb 24, 2010 by Helpful CatSame with:
FreeBSD 6.3-RELEASE FreeBSD 6.3-RELEASE #6: Wed Oct 21 09:32:42 MDT 2009
root@fc:/usr/src/sys/i386/compile/VKERN i386
Comment #4
Posted on Jun 3, 2010 by Grumpy CamelI think this should be fixed now. Please feel free to reopen if it isn't.
Comment #5
Posted on Sep 14, 2010 by Helpful CatI'm afraid it's still happening to me. Miniruby compilation is still dumping a core. I've attached my gdb output using the same commands as the original filer used, since I don't know how to use gdb.
It's happening using the installer and using the manual instructions as well.
FreeBSD ruckweb2.securesites.net 6.3-RELEASE FreeBSD 6.3-RELEASE #7: Wed Jul 21 13:13:58 MDT 2010 root@fc:/usr/src/sys/i386/compile/VKERN i386
- gdb-output.txt 2.66KB
Comment #6
Posted on Mar 1, 2011 by Happy PandaStill has this issue with version 1.8.7-2011.03 on FreeBSD 6.2 i386.
gcc -g -O2 -DRUBY_EXPORT -L. -rdynamic main.o libruby-static.a -L/opt/local/lib -Wl,-rpath,/usr/local/opt/ruby-enterprise-1.8.7-2011.03/lib -L/usr/local/opt/ruby-enterprise-1.8.7-2011.03/lib -lpthread -lcrypt -lm -o miniruby Illegal instruction (core dumped) * Error code 132
Stop in /root/build/ruby-enterprise-1.8.7-2011.03/source.
Comment #7
Posted on Mar 31, 2011 by Helpful CamelThis is happening to me on FreeBSD 7.3 i386 even with --no-tcmalloc using 2011.03
Comment #8
Posted on Apr 7, 2011 by Happy MonkeyThis problem is happening to me also on FreeBSD 6.2 (a Verio VPS) with version 1.8.7-2011.03
Comment #9
Posted on May 11, 2011 by Massive DogComment deleted
Status: Fixed
Labels:
Type-Defect
Priority-Medium
Milestone-2010.02