Red Hat Bugzilla – Bug 805447
eu-unstrip emits garbage for librt.so.1
Last modified: 2012-07-10 17:01:20 EDT
[root@dev-mk ~]# eu-unstrip --core=/var/spool/abrt/ccpp-2012-03-20-20:03:15-30358/coredump -n
0x8048000+0x5000 afb7cbc99623149a977db56d6459558c76f34cb9@0x8048198 - - [exe]
0xb76fb000+0x1000 241c1b10341666dce64db4e33d343f218c0a19bc@0xb76fb210 . - linux-gate.so.1
0xb7661000+0x99000 381325400081344e94d1a8d6d06c5211b6aeaac7@0xb7661124 /usr/lib/gnome-shell/libgnome-shell.so - libgnome-shell.so
/lib/libXcomposite.so.1 - libXcomposite.so.1
0xb686e000+0x5000 96bc916348339f3d8b48161d58fb1445c2ab5787@0xb686e124 /lib/libgmodule-2.0.so.0 - libgmodule-2.0.so.0
0xb6865000+0x9000 53aa4cda7be9b800a82c2b4b511bc01605bb8ce6@0xb6865164 /lib/librt.so.1 - librt.so.���
0xb685f000+0x6000 1d6d247cb1c1dc86b34ab960d58c82d7cce35e15@0xb685f124 /lib/libXfixes.so.3 - libXfixes.so.3
0xb6824000+0x3b000 eadfee09bfef04ff0c96410a7ac976f2ed0c593c@0xb6824124 /lib/libcroco-0.6.so.3 - libcroco-0.6.so.3
0xb66d5000+0x14f000 346c7f8a791cd1b7be07bfff6f849d658d506a17@0xb66d5124 /lib/libxml2.so.2 - libxml2.so.2
This causes bug 804309 where abrt can't report crashes. It thus makes it harder to report and fix other more serious bugs.
Would you please attach a core dump that reproduces this behavior, if practical? If it's huge even after compression, would you put it up somewhere on the Internet for us to download?
The garbage is the name of the Dwfl_Module for librt.so which doesn't seem to be zero terminated:
2125 printf ("%#" PRIx64 "+%#" PRIx64 " ", start, end - start);
2: name = 0x61cd00 "librt.so.\206\004\203\005\002\267\n\303A\306A\307A\305\f\004\004H\vk\n\303A\306A\307A\305\f\004\004A\v"
1: id_len = 20
(gdb) print /x start
$1 = 0xb6865000
(gdb) print /x end
$2 = 0xb686e000
The situation is that the .dynstr of librt.so available in the image is truncated, because only the first page of librt.so in the image. There was a bug in the code that handles an embedded .dynstr so that it wasn't noticing when the image was truncated. I fixed it with upstream commit 210c2f0.
It should be straightforward to produce a small test case for the test suite, because anything that links in librt.so (or anything else whose .dynstr starts in its first page and ends past it, with the DT_SONAME string crossing that boundary) will produce a core file with this situation.
I added a testcase:
Author: Mark Wielaard <email@example.com>
Date: Tue Apr 3 00:21:50 2012 +0200
Add new run-unstrip-n.sh test for RHBZ#805447 fixed in commit 210c2f.
elfutils-0.153-2.fc17 has been submitted as an update for Fedora 17.
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing elfutils-0.153-2.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
elfutils-0.153-2.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
elfutils-0.154-1.fc16 has been submitted as an update for Fedora 16.
elfutils-0.154-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.