Bugzilla – Bug 317872
[PPC] monodis linked against libmono.so isn't working (was Microsoft.VisualBasic/fixup is broken)
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by jsacco@ydl.net 2005-05-03 17:38:13 MST ---- Description of Problem: Microsoft.VisualBasic/fixup is broken on a PPC. Steps to reproduce the problem: Try building it using SVN code available since April 20. Actual Results: make[9]: Entering directory `/usr/local/src/Mono/SVN/mcs/class/Microsoft.VisualBasic/fixup' MONO_PATH="../../../class/lib/default:$MONO_PATH" /usr/local/src/Mono/SVN/mono/runtime/monodis-wrapper ../../../class/lib/default/Microsoft.VisualBasic.dll > default/t1 || { rm -f default/t1; exit 1; } make[9]: *** [default/Microsoft.VisualBasic.il] Error 1 Expected Results: monodis should not segfault How often does this happen? Every time, every version since April 20'th/ ---- Additional Comments From vargaz@gmail.com 2005-05-06 10:57:23 MST ---- -> runtime ---- Additional Comments From vargaz@gmail.com 2005-05-07 06:19:48 MST ---- This is fixed now. ---- Additional Comments From jsacco@ydl.net 2005-05-07 12:12:38 MST ---- Still broken as of SVN version 44198. Maybe the fix is in the pipeline somewhere. -Joseph ---- Additional Comments From gonzalo@ximian.com 2005-05-09 02:51:30 MST ---- Reopening based in last comment ---- Additional Comments From vargaz@gmail.com 2005-05-12 09:51:17 MST ---- Well, it works on buildbot: http://mono.ximian.com:8008/ppc-head-mono/builds/6/build/0 ---- Additional Comments From jsacco@ydl.net 2005-05-12 10:25:31 MST ---- The output from buildbot indicates that the buildbot PPC is running MacOSX, not Linux: Running ./configure --enable-maintainer-mode --enable-compile-warnings --with-preview=yes --prefix=/Users/nbuilder/install ... checking build system type... powerpc-apple-darwin7.9.0 checking host system type... powerpc-apple-darwin7.9.0 checking target system type... powerpc-apple-darwin7.9.0 Try building on a LinuxPPC. Using version 44437, 12May05: Assembly fixup/default/Microsoft.VisualBasic.dll signed. MONO_PATH="../../class/lib/default:$MONO_PATH" /usr/local/src/Mono/SVN/mono/runtime/monodis-wr apper fixup/default/Microsoft.VisualBasic.dll > fixup/default/t1 || { rm -f fixup/default/t1; e xit 1; } make[8]: *** [fixup/default/Microsoft.VisualBasic.il] Error 1 -Joseph ---- Additional Comments From rharinath@novell.com 2005-05-13 06:20:15 MST ---- It appears to be a libtool bug. One option I can think of is to link monodis to libmono-static.la rather than libmono.la. ---- Additional Comments From bmaurer@users.sf.net 2005-05-21 02:49:23 MST ---- Linking monodis to the static version is a horrible idea -- it will create alot of bloat in the rpms. If we can't get a reliable usage of the fixup stuff, it simply should not be enabled. ---- Additional Comments From jsacco@ydl.net 2005-05-22 09:35:13 MST ---- monodis appears to be broken. If I force the build/install using "make -k mono", I can run monodis directly without the wrapper: % cd class/Microsoft.VisualBasic/ % monodis fixup/default/Microsoft.VisualBasic.dll Segmentation fault Viewed from within gdb: (gdb) run fixup/default/Microsoft.VisualBasic.dll Starting program: /opt/mono-svn/bin/monodis fixup/default/Microsoft.VisualBasic.dll [Thread debugging using libthread_db enabled] [New Thread 807479136 (LWP 10638)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 807479136 (LWP 10638)] 0x0fee1d74 in mono_init_internal (filename=Variable "filename" is not available. ) at domain.c:366 366 SET_APPDOMAIN (domain); (gdb) bt #0 0x0fee1d74 in mono_init_internal (filename=Variable "filename" is not available. ) at domain.c:366 #1 0x0fee1d64 in mono_init_internal (filename=Variable "filename" is not available. ) at domain.c:363 #2 0x300d58a4 in generic_start_main () from /lib/tls/libc.so.6 #3 0x300d5a70 in __libc_start_main () from /lib/tls/libc.so.6 (gdb) l 363 domain = mono_domain_create (); 364 mono_root_domain = domain; 365 366 SET_APPDOMAIN (domain); 367 368 /* Get a list of runtimes supported by the exe */ 369 if (exe_filename != NULL) { 370 get_runtimes_from_exe (exe_filename, runtimes); 371 } else if (runtime_version != NULL) { 372 runtimes [0] = get_runtime_by_version (runtime_version); (gdb) b 363 Breakpoint 1 at 0xfee1d60: file domain.c, line 363. (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /opt/mono-svn/bin/monodis fixup/default/Microsoft.VisualBasic.dll [Thread debugging using libthread_db enabled] [New Thread 807479136 (LWP 10656)] [Switching to Thread 807479136 (LWP 10656)] Breakpoint 1, mono_init_internal (filename=Variable "filename" is not available. ) at domain.c:363 363 domain = mono_domain_create (); (gdb) n 366 SET_APPDOMAIN (domain); (gdb) p domain $1 = (MonoDomain *) 0x0 So... looks like something bad happened to mono_domain_create() -Joseph ---- Additional Comments From rharinath@novell.com 2005-05-30 07:49:52 MST ---- Created an attachment (id=167843) Patch to build a static monodis in addition to the normal monodis ---- Additional Comments From rharinath@novell.com 2005-05-30 07:51:09 MST ---- Can you try applying the attached patch and see if it helps. It'll help us narrow down the cause of the failure. ---- Additional Comments From jsacco@ydl.net 2005-05-30 15:10:01 MST ---- The patch works. I tested it with both mono-1.1.7 and SVN-45193. "make check" results: Overall results: tests: 5166, failed: 14, opt combinations: 14 (pass: 99.73%) Regression ERRORS! System: * PPC G4 [silver] PowerMac * Yellow Dog Linux-4.0.1 [redhat FC2 clone for PPC] * libtool-1.5.16 * gcc-3.3.3 * glibc-2.3.3 -Joseph ---- Additional Comments From rharinath@novell.com 2005-05-31 02:44:32 MST ---- Thanks for checking. Can you also check whether the installed 'monodis' is working? If it is, I'll go ahead and check this patch in. ---- Additional Comments From jsacco@ydl.net 2005-05-31 09:53:41 MST ---- Bad news... The installed version of monodis segfaults: [setup the evironment] MONO=/opt/mono PATH=$MONO/bin:$PATH LD_LIBRARY_PATH=$MONO/lib:$LD_LIBRARY_PATH PYTHONPATH=$MONO/lib/python2.3/site-packages PKG_CONFIG_PATH=$MONO/lib/pkgconfig:/usr/lib/pkgconfig MANPATH=$MONO/man:$MANPATH export PATH LD_LIBRARY_PATH PYTHONPATH PKG_CONFIG_PATH MANPATH cd mono-1.1.7/mcs/class/Microsoft.VisualBasic/fixup monodis ../../../class/lib/default/Microsoft.VisualBasic.dll Segmentation fault Using gdb I see the same sequence of events that I reported on 22May05. Let's take a look at what libtool does when installing monodis: Making install in dis make[2]: Entering directory `/usr/local/src/Mono/mono-1.1.7/mono/dis' make[3]: Entering directory `/usr/local/src/Mono/mono-1.1.7/mono/dis' test -z "/opt/mono/bin" || mkdir -p -- "/opt/mono/bin" /bin/sh ../../libtool --mode=install /usr/bin/install -c 'monodis' '/opt/mono/bin/monodis' (cd /usr/local/src/Mono/mono-1.1.7/mono/dis; { test -z "${LIBRARY_PATH+set}" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z "${COMPILER_PATH+set}" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z "${GCC_EXEC_PREFIX+set}" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z "${LD_RUN_PATH+set}" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; PATH="/opt/mono/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/apache-ant-1.6.2/bin:/usr/local/eclipse:/opt/IBMJava2-ppc-142/bin:/opt/IBMJava2-ppc-142/jre/bin:/root/bin"; export PATH; gcc -g -O2 -fno-strict-aliasing -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -o /tmp/libtool-32257/monodis dump.o main.o -Wl,--export-dynamic -pthread libmonodis.a -L/opt/mono/lib -lmono -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0 -lnsl -lpthread -lm -lrt -Wl,--rpath -Wl,/opt/mono/lib) /usr/bin/install -c /tmp/libtool-32257/monodis /opt/mono/bin/monodis Hmmm... looks like a dynamically linked version of monodis was installed, and we know, the dynamically linked version of monodis is broken. If you were intending to install monodis-s, that's not what happened. You will need to alter ./mono/dis/Makefile -Joseph ---- Additional Comments From rharinath@novell.com 2005-05-31 11:44:17 MST ---- It was the intent to installed the monodis built against the shared libmono.so. The idea of the patch was to determine if the problem was libtool or the shared library itself. Seems to me there's some problem with libmono.so on PPC. Do people have the same problem on other distributions? I remember a couple of other people were interested in this bug. ---- Additional Comments From latexer@gentoo.org 2005-05-31 11:50:08 MST ---- Raja: We've had reports of the same problem on PPC with mono-1.1.7 on Gentoo. The bug report can is at http://bugs.gentoo.org/show_bug.cgi?id=93765 (not much there). ---- Additional Comments From jsacco@ydl.net 2005-05-31 12:00:14 MST ---- The problem with libmono.so appears to be linuxPPC specific. We now see it on two releases, YDL and Gentoo. The root cause could be a compiler/glibc issue. One never knows... lupus@ximian.com is probably the person you want to chat with. -Joseph ---- Additional Comments From rharinath@novell.com 2005-06-01 02:10:42 MST ---- Paolo, I think we need your help here. ---- Additional Comments From grompf@sublimeintervention.com 2005-06-02 17:39:06 MST ---- Created an attachment (id=167844) please test and report back ---- Additional Comments From jsacco@ydl.net 2005-06-02 21:57:22 MST ---- The patch for mono/utils/mono-compiler.h appears to fix the problem. The test I reported on 31may05 no longer segfaults. Hmmm... Didn't "we" who run PPC's get bitten by this TLS issue in an earlier release? -Joseph ---- Additional Comments From grompf@sublimeintervention.com 2005-06-13 15:14:50 MST ---- fixed in r45888 and 1.1.8 -kangaroo ---- Additional Comments From bmaurer@users.sf.net 2005-06-19 16:58:57 MST ---- -> fixed Imported an attachment (id=167843) Imported an attachment (id=167844) Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Yellow Dog Linux-4.0.1 [FC2 clone for PPC's]</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".