[Bug 586979] New: zypper ref causes SIGSEGV
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c0 Summary: zypper ref causes SIGSEGV Classification: openSUSE Product: openSUSE 11.3 Version: Factory Platform: x86-64 OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: libzypp AssignedTo: zypp-maintainers@forge.provo.novell.com ReportedBy: jslaby@novell.com QAContact: qa@suse.de Found By: --- Blocker: --- $ gdb --args zypper ref .. Program received signal SIGSEGV, Segmentation fault. SendReport (this=<value optimized out>) at /usr/src/debug/libzypp-6.30.4/zypp/Callback.h:214 214 { Distributor::instance()->reportbegin(); } Looks like _report in distributor is NULL: (gdb) info regs rdi 0x0 0 .. r13 0x343d2b84b0 224364561584 .. rip 0x343cee341b 0x343cee341b <SendReport+34> (gdb) disass 0x000000343cee33f9 <instance+0>: mov 0x3cbb50(%rip),%rdx 0x000000343cee3400 <...Access::provide> mov %eax,0x370(%rsp) 0x000000343cee3407 <instance+14>: cmpb $0x0,(%rdx) 0x000000343cee340a <instance+17>: je 0x343cee38a8 <instance+714> 0x000000343cee3410 <instance+23>: mov 0x3ca5e1(%rip),%r13 0x000000343cee3417 <SendReport+30>: mov 0x8(%r13),%rdi 0x000000343cee341b <SendReport+34>: mov (%rdi),%rax 0x000000343cee341e <SendReport+37>: callq *0x18(%rax) It is set to KeyRingSignalReceiver at 0xaa3320. #0 setReceiver (rec_r=...) at /usr/src/debug/libzypp-6.30.4/zypp/Callback.h:187 #1 connect (rec_r=...) at /usr/src/debug/libzypp-6.30.4/zypp/Callback.h:159 #2 KeyRingSignalReceiver (rec_r=...) at /usr/src/debug/libzypp-6.30.4/zypp/target/rpm/RpmDb.cc:87 rdi (i.e. _report) is 47 times 0xaa3320 in SendReport, then it becomes NULL. Dunno why. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c1 --- Comment #1 from Jiri Slaby <jslaby@novell.com> 2010-03-10 11:31:15 UTC --- (In reply to comment #0)
rdi (i.e. _report) is 47 times 0xaa3320 in SendReport, then it becomes NULL. Dunno why.
Ah, beacuse r13 also changes. This means Distributor::instance changed? -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c2 Michael Andres <ma@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ma@novell.com --- Comment #2 from Michael Andres <ma@novell.com> 2010-03-12 14:22:16 UTC --- typedef DistributeReport<_Report> Distributor; SendReport() { Distributor::instance()->reportbegin(); } ... template<class _Report> struct DistributeReport { static DistributeReport & instance() { static DistributeReport _self; return _self; } -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c3 --- Comment #3 from Jiri Slaby <jslaby@novell.com> 2010-03-12 14:28:56 UTC --- What to do with code in comment #2? -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c4 Michael Matz <matz@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matz@novell.com --- Comment #4 from Michael Matz <matz@novell.com> 2010-03-12 14:42:26 UTC --- If I should help I'd need a reproducer (preferably a machine where the bug happens), compile options and compiler version and the like. It might be (though I would be surprised) that the various DistributeReport::instance::_self variables aren't properly merged by the linker. The source looks sane, so it might be that its a compiler problem (misoptimization) or a linker problem. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c5 --- Comment #5 from Michael Andres <ma@novell.com> 2010-03-12 15:02:43 UTC --- (In reply to comment #3)
What to do with code in comment #2? I just pasted it to illustrate what the code should do.
-- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c Ján Kupec <jkupec@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P2 - High Severity|Normal |Major -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c6 --- Comment #6 from Richard Guenther <rguenther@novell.com> 2010-03-12 15:53:22 UTC --- You can also try re-building with a more recent gcc snapshot from devel:gcc. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c7 --- Comment #7 from Jiri Slaby <jslaby@novell.com> 2010-03-12 18:33:36 UTC --- (In reply to comment #4)
If I should help I'd need a reproducer (preferably a machine where the bug happens), compile options and compiler version and the like.
It's a package from factory, I think a version compiled with gcc45 20100302. (In reply to comment #6)
You can also try re-building with a more recent gcc snapshot from devel:gcc.
Compiling now with 20100311. Will let you know. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c8 Jiri Slaby <jslaby@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #8 from Jiri Slaby <jslaby@novell.com> 2010-03-12 18:49:11 UTC --- (In reply to comment #7)
Compiling now with 20100311. Will let you know.
Yup, seems to work now. What I did is mkdir /tmp/repo cd /tmp/repo osc getbinaries devel:gcc gcc45 openSUSE_Factory x86_64 cd /tmp osc co zypp:Head cd zypp:Head/libsatsolver abuild ... -D head-x86_64 --prefer-rpms=/tmp/repo/ libsatsolver.spec cp .../*rpm /tmp/repo/ cd ../libzypp abuild ... -D head-x86_64 --prefer-rpms=/tmp/repo/ libzypp.spec cp .../*rpm /tmp/repo/ cd ../zypper abuild ... -D head-x86_64 --prefer-rpms=/tmp/repo/ zypper.spec cp .../*rpm /tmp/repo/ rpm -Fvh /tmp/repo/*rpm As Richard already pushed 20100311 into factory and it's building now, closing as fixed. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c9 Jiri Slaby <jslaby@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | --- Comment #9 from Jiri Slaby <jslaby@novell.com> 2010-03-12 18:56:49 UTC --- Bullshit, all way back. Just for sure I ran /etc/cron.daily/prelink and now it behaves the same -- gets killed with SEGV. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c10 Jiri Slaby <jslaby@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |meissner@novell.com --- Comment #10 from Jiri Slaby <jslaby@novell.com> 2010-03-14 16:31:13 UTC --- Adding Marcus as a prelink maintainer (according to 'osc maintainer'). -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c11 --- Comment #11 from Jiri Slaby <jslaby@novell.com> 2010-03-15 09:34:58 UTC --- I've just updated to the latest factory (built by gcc45 20100311) and did # zypper ref OK output ... # /usr/sbin/prelink -uav # /usr/sbin/prelink -av -mR -q # zypper ref Segmentation fault $ objdump -s -j .comment /usr/lib/debug/usr/bin/zypper.debug /usr/lib/debug/usr/bin/zypper.debug: file format elf64-x86-64 Contents of section .comment: 0000 4743433a 20285355 5345204c 696e7578 GCC: (SUSE Linux 0010 2920342e 352e3020 32303130 30333131 ) 4.5.0 20100311 0020 20286578 70657269 6d656e74 616c2920 (experimental) 0030 5b747275 6e6b2072 65766973 696f6e20 [trunk revision 0040 31353733 38345d00 157384]. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c12 --- Comment #12 from Michael Matz <matz@novell.com> 2010-03-15 13:04:19 UTC --- Our prelink version is very old, it got some development meanwhile: http://people.redhat.com/jakub/prelink/ We should either drop it or maintain it more actively. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c13 --- Comment #13 from Jiri Slaby <jslaby@novell.com> 2010-03-15 13:52:12 UTC --- (In reply to comment #12)
Our prelink version is very old, it got some development meanwhile:
Though no change with 20100106 and repeated steps in comment #11. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c14 --- Comment #14 from Michael Matz <matz@novell.com> 2010-03-15 16:59:24 UTC --- prelink somehow mishandled UNIQUE variables. The guard variable is correctly shared, but the static var (_self) is not. The executable initialized its _self and the shared guard, libzypp asks the (shared, and hence properly handled) guard variable, but the proceeds to access its own copy of _self, which of course isn't initialized. As the _self variables have UNIQUE binding, my guess is that prelink simply doesn't correctly deal with those. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c15 Michael Matz <matz@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|Major |Critical --- Comment #15 from Michael Matz <matz@novell.com> 2010-03-16 16:23:49 UTC --- I'll momentarily attach a testcase for the prelink bug. I would CC Jakub here as well, but our bugzilla doesn't let me without him having an account :-/ -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c16 --- Comment #16 from Michael Matz <matz@novell.com> 2010-03-16 16:25:41 UTC --- Created an attachment (id=348699) --> (http://bugzilla.novell.com/attachment.cgi?id=348699) tarball containing testcase # unpack; cd nov586979/; make # ./app-nopre # ./app Aborted -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c Jiri Slaby <jslaby@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|zypper ref causes SIGSEGV |prelink causes 'zypper ref' | |to die with SIGSEGV -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c17 Michael Matz <matz@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|zypp-maintainers@forge.prov |pbaudis@novell.com |o.novell.com | --- Comment #17 from Michael Matz <matz@novell.com> 2010-03-23 13:58:09 UTC --- So, after some discussion with Jakub the problem is in glibc, when reporting conflicts for UNIQUE symbols, as speculated. He came up with two candidate patches: http://sources.redhat.com/ml/libc-hacker/2010-03/msg00010.html glibc, hence Petr. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=586979 http://bugzilla.novell.com/show_bug.cgi?id=586979#c18 Petr Baudis <pbaudis@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #18 from Petr Baudis <pbaudis@novell.com> 2010-03-25 16:08:58 UTC --- I have committed the second patch of the mail, thank you. It fixes the testcase. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com