Re: [Koha-zebra] ZOOM seg fault
Date: Tue, 31 Jan 2006 16:27:55 +0100 From: Paul POULAIN <paul.poulain@free.fr>
Hmm. Can you send me a stack-trace?
I probably can... if you explain how to do ;-)
Use something like this: $ gdb perl GNU gdb 6.3-debian 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 "i486-linux-gnu"...(no debugging symbols found) Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". (gdb) run test_cql2rpn.pl Starting program: /usr/bin/perl test_cql2rpn.pl (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread -1210698048 (LWP 25507)] (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1210698048 (LWP 25507)] 0xb526732b in yaz_version (version_str=0xb648affc "2.1.", sys_str=0xb4ee9f98 'x' <repeats 100 times>) at version.c:27 27 strcpy(version_str, YAZ_VERSION); (gdb) bt #0 0xb526732b in yaz_version (version_str=0xb648affc "2.1.", sys_str=0xb4ee9f98 'x' <repeats 100 times>) at version.c:27 #1 0xb52650c5 in XS_Net__Z3950__ZOOM_yaz_version () from /usr/local/lib/perl/5.8.7/auto/Net/Z3950/ZOOM/ZOOM.so #2 0x080c40dd in Perl_pp_entersub () #3 0x080bcf0b in Perl_runops_standard () #4 0x08060cde in Perl_get_cv () #5 0x08064712 in Perl_call_sv () #6 0x08064bbd in Perl_call_list () #7 0x080972e1 in Perl_newATTRSUB () #8 0x08095d4e in Perl_utilize () #9 0x08089b24 in Perl_yyparse () #10 0x080f2991 in Perl_find_runcv () #11 0x080f4f20 in Perl_pp_require () #12 0x080bcf0b in Perl_runops_standard () #13 0x08060cde in Perl_get_cv () #14 0x08064712 in Perl_call_sv () #15 0x08064bbd in Perl_call_list () #16 0x080972e1 in Perl_newATTRSUB () #17 0x08095d4e in Perl_utilize () #18 0x08089b24 in Perl_yyparse () #19 0x0806732a in Perl_my_failure_exit () #20 0x08068d68 in perl_parse () ---Type <return> to continue, or q <return> to quit--- #21 0x0805fd89 in main () (gdb) ANd we'd better hope that this shows something useful, as I have now run the program under the ElectricFence memory-debugger, and it works just fine. What YAZ are you using now? Adam, it would be good to get another YAZ release out, so that we can all be running the same code. _/|_ ___________________________________________________________________ /o ) \/ Mike Taylor <mike@miketaylor.org.uk> http://www.miketaylor.org.uk )_v__/\ "Do I understand you correctly, Professor Groves? Surely you're not advancing the astonishing theory that the mentality of Neanderthal man compares favourably with that organ which ten million years of evolution has developed in his modern counterpart?" -- dialogue from "The Neanderthal Man".
Mike Taylor a écrit :
Date: Tue, 31 Jan 2006 16:27:55 +0100 From: Paul POULAIN <paul.poulain@free.fr>
Hmm. Can you send me a stack-trace?
(I really HTH ...) (gdb) run test_cql2rpn.pl Starting program: /usr/bin/perl test_cql2rpn.pl Reading symbols from shared object read from target memory...(no debugging symbols found)...done. Loaded system supplied DSO at 0xffffe000 (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread -1211959616 (LWP 31614)] QUERY : test at test_cql2rpn.pl line 10. ICI at test_cql2rpn.pl line 15. LA at test_cql2rpn.pl line 17. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1211959616 (LWP 31614)] 0xb7d5c880 in __malloc_initialize_hook () from /lib/tls/libc.so.6 Here some technical informations : [paul@bureau migration_tools]$ ll /lib/tls/libc.so.6 lrwxrwxrwx 1 root root 13 oct 27 20:25 /lib/tls/libc.so.6 -> libc-2.3.5.so [paul@bureau migration_tools]$ yaz-client -V YAZ version: 2.1.10 10:28:08-01/02 zebrasrv [log] zebra_start zebra.cfg 1.3.32 [paul@bureau migration_tools]$ uname -a Linux bureau.paulpoulain.com 2.6.12-14mdksmp #1 SMP Tue Dec 20 13:45:20 MST 2005 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz unknown GNU/Linux -- Paul POULAIN et Henri Damien LAURENT Consultants indépendants en logiciels libres et bibliothéconomie (http://www.koha-fr.org)
Date: Wed, 01 Feb 2006 10:30:34 +0100 From: Paul POULAIN <paul.poulain@free.fr>
Hmm. Can you send me a stack-trace?
(I really HTH ...)
TH a little bit ...
(gdb) run test_cql2rpn.pl [...] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1211959616 (LWP 31614)] 0xb7d5c880 in __malloc_initialize_hook () from /lib/tls/libc.so.6
OK, so this pretty much confirms the hypothesis that the problem is heap corruption, but doesn't tell us anything about where it's happening. Please can you try running it with ElectricFence? $ sudo apt-get install electric-fence $ gdb perl (gdb) set environment LD_PRELOAD libefence.so.0.0 (gdb) run test_cql2rpn With luck, that will give you more information. _/|_ ___________________________________________________________________ /o ) \/ Mike Taylor <mike@miketaylor.org.uk> http://www.miketaylor.org.uk )_v__/\ "Art isn't easy, any way you look at it" -- Steven Sondheim, "Putting it Together"
Mike Taylor a écrit :
OK, so this pretty much confirms the hypothesis that the problem is heap corruption, but doesn't tell us anything about where it's happening.
Please can you try running it with ElectricFence?
$ sudo apt-get install electric-fence
apt-get does not exist on mandriva, it's not a standard package, but rpmfind gave me what I was looking for : (gdb) set environment LD_PRELOAD libefence.so.0.0 (gdb) run test_cql2rpn.pl Starting program: /usr/bin/perl test_cql2rpn.pl Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com> Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com> Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com> Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com> Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com> Reading symbols from shared object read from target memory...(no debugging symbols found)...done. Loaded system supplied DSO at 0xffffe000 (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread -1211459360 (LWP 310)] Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com> QUERY : test at test_cql2rpn.pl line 10. ICI at test_cql2rpn.pl line 15. LA at test_cql2rpn.pl line 17. /usr/bin/perl: symbol lookup error: /usr/lib/perl5/site_perl/5.8.7/i386-linux/auto/Net/Z3950/ZOOM/ZOOM.so: undefined symbol: ZOOM_query_cql2rpn Program exited with code 0177. ls -l /usr/lib/perl5/site_perl/5.8.7/i386-linux/auto/Net/Z3950/ZOOM/ show : -rwxr-xr-x 1 root root 2058095 jan 19 13:52 ZOOM.so* -- Paul POULAIN et Henri Damien LAURENT Consultants indépendants en logiciels libres et bibliothéconomie (http://www.koha-fr.org)
Date: Wed, 01 Feb 2006 15:01:14 +0100 From: Paul POULAIN <paul.poulain@free.fr>
$ sudo apt-get install electric-fence
apt-get does not exist on mandriva, it's not a standard package, but rpmfind gave me what I was looking for :
That's cool.
(gdb) set environment LD_PRELOAD libefence.so.0.0 (gdb) run test_cql2rpn.pl Starting program: /usr/bin/perl test_cql2rpn.pl
Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com>
Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com>
Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com>
Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com>
Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com>
Gosh, he really does like to see his own name in print, doesn't he? :-)
Reading symbols from shared object read from target memory...(no debugging symbols found)...done. Loaded system supplied DSO at 0xffffe000 (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread -1211459360 (LWP 310)]
Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com> QUERY : test at test_cql2rpn.pl line 10. ICI at test_cql2rpn.pl line 15. LA at test_cql2rpn.pl line 17. /usr/bin/perl: symbol lookup error: /usr/lib/perl5/site_perl/5.8.7/i386-linux/auto/Net/Z3950/ZOOM/ZOOM.so: undefined symbol: ZOOM_query_cql2rpn
Well, that's just weird. It looks like you're getting an ... *lightbulb* OK. Here is the deal. From the top of the NEWS file in the CVS HEAD of the YAZ toolkit: --- NOT YET RELEASED ZOOM-C now support client-side compilation of CQL into RPN that is sent to the server, enabling CQL to be used against all Z39.50 servers. Use ZOOM_query_cql2rpn() to set the compiled CQL into a ZOOM_query object, and submit it using ZOOM_connection_search(). The CQL-to-RPN translation uses a configuration file, the name of which must be specified in the Connection's "cqlfile" option. ZOOM-C also support CQL scanning, via the new ZOOM_connection_scan1() function, which takes as its start-term parameter a ZOOM_query object (which may have had either CQL or RPN set into it). --- 2.1.10 2005/11/29 Added ZiNG Update Support. New codecs are defined in srw.h. Extended the GFS to support this as well. Backend handler, bend_srw_update, does the update work. Code contributed by Ko van der Sloot. [...] In other words, it's precisely correct to say that the symbol you're linking against doesn't exist, because (IIRC) you're using YAZ 2.1.10. Why it took ElectricFence to get the system to admit this, rather than just seggy-faulting, is left as an exercise for the reader (i.e. I don't know). So before we continue, you need to upgrade to YAZ 2.1.11. The only tiny problem with this plan is that it doesn't yet exist, because it still awaits release. You could wait for Adam to make the release; or you can probably use one of the new nightly builds ... except that I don't recall where they are, and they don't seem to be linked from http://indexdata.com/yaz/ Adam, please remind me where they are? _/|_ ___________________________________________________________________ /o ) \/ Mike Taylor <mike@miketaylor.org.uk> http://www.miketaylor.org.uk )_v__/\ "Any statements to the effect that this parrot is still a going concern are henceforth inoperative" -- _Dead Parrot_ sketch, Monty Python's Flying Circus.
Mike Taylor a écrit :
In other words, it's precisely correct to say that the symbol you're linking against doesn't exist, because (IIRC) you're using YAZ 2.1.10.
You remember correctly.
Why it took ElectricFence to get the system to admit this, rather than just seggy-faulting, is left as an exercise for the reader (i.e. I don't know).
So before we continue, you need to upgrade to YAZ 2.1.11. The only tiny problem with this plan is that it doesn't yet exist, because it still awaits release. You could wait for Adam to make the release; or you can probably use one of the new nightly builds ... except that I don't recall where they are, and they don't seem to be linked from http://indexdata.com/yaz/
Adam, please remind me where they are?
Adam, could you also help me with the 1ST problem I described at the beginning of this thread. It's still here. -- Paul POULAIN et Henri Damien LAURENT Consultants indépendants en logiciels libres et bibliothéconomie (http://www.koha-fr.org)
participants (2)
-
Mike Taylor -
Paul POULAIN