Date: Wed, 5 Sep 2012 19:05:38 GMT From: Slaven Rezic <slaven@rezic.de> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/171353: Segmentation fault when use'ing the perl modules XML::LibXML and GD together (related to pthreads?) Message-ID: <201209051905.q85J5cPQ078974@red.freebsd.org> Resent-Message-ID: <201209051910.q85JA2w5062998@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 171353 >Category: ports >Synopsis: Segmentation fault when use'ing the perl modules XML::LibXML and GD together (related to pthreads?) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Sep 05 19:10:01 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Slaven Rezic >Release: 9.0-RELEASE >Organization: >Environment: FreeBSD cvrsnica.herceg.de 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 CPU: Intel(R) Core(TM) i5-2500T CPU @ 2.30GHz (2307.82-MHz K8-class CPU) >Description: The following perl one-liner crashes on my system with a segmentation fault: perl -e 'use XML::LibXML; use GD;' All components used here (perl, p5-XML-LibXML, p5-GD) are installed as packages. Interestingly, if I swap both use statements, then there's no crash: perl -e 'use GD; use XML::LibXML' I could also reproduce the problem with self-compiled perls (5.10.1, 5.14.2, 5.16.0) and the latest module versions from CPAN. Some of this perls did not produce a segfault, but an endless loop in the global destruction phase. Only with a perl with compiled-in threading there was no problem. The backtrace looks like following: #0 0x000000080508935b in pthread_mutex_lock () from /lib/libthr.so.3 #1 0x0000000803b436c5 in xmlRMutexLock () from /usr/local/lib/libxml2.so.5 #2 0x0000000803b3eb0c in xmlCatalogCleanup () from /usr/local/lib/libxml2.so.5 #3 0x0000000803adbbda in xmlCleanupParser () from /usr/local/lib/libxml2.so.5 #4 0x000000080383eac4 in XS_XML__LibXML_END (cv=0xf343c8) at LibXML.xs:1566 #5 0x00000000004eab56 in Perl_pp_entersub () at pp_hot.c:2778 #6 0x000000000043f36d in Perl_call_sv (sv=0xf343c8, flags=13) at perl.c:2705 #7 0x000000000044444a in Perl_call_list (oldscope=1, paramList=0xf343e0) at perl.c:4782 #8 0x000000000043a3cf in perl_destruct (my_perl=0x802735220) at perl.c:565 #9 0x000000000041ddc2 in main (argc=2, argv=0x7fffffffccb0, env=0x7fffffffccc8) at perlmain.c:131 If the problem caused an endless loop (see above), then this loop happens at the same place, somewhere after pthread_mutex_lock. Regards, Slaven >How-To-Repeat: See above. >Fix: Sorry, none known, other than the workaround of swapping both "use" statements, which is often not feasible in complex systems. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209051905.q85J5cPQ078974>