[Bug 1580601] Re: __nih_abort_msg symbol cannot be read any more
Dimitri John Ledkov
launchpad at surgut.co.uk
Thu May 12 16:33:15 UTC 2016
If i recall correctly there was something funny with weak symbols /
symbol overwriting with __nih_ things and i guess it's the bind now that
links the no-op symbol, instead of the real one.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to libnih in Ubuntu.
https://bugs.launchpad.net/bugs/1580601
Title:
__nih_abort_msg symbol cannot be read any more
Status in gcc-5 package in Ubuntu:
New
Status in libnih package in Ubuntu:
New
Bug description:
libnih has a global symbol __nih_abort_msg that contains the message
of the last failed nih_assert() (similar to glibc's own __abort_msg
and glib's __glib_assert_msg). Apport uses these to produce a more
meaningful crash report than just "/bin/foo crashed with SIGABRT", as
in these case the thing you actually want to see is the assertion
message.
This stopped working in yakkety/amd64. apport's
report.test_add_gdb_info_abort_libnih() now fails:
ERROR: test_add_gdb_info_abort_libnih (__main__.T)
add_gdb_info() with libnih assertion
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_report.py", line 886, in test_add_gdb_info_abort_libnih
self.assertIn('Assertion failed in main: 1 < 0', pr['AssertionMessage'])
File "/usr/lib/python3.5/collections/__init__.py", line 985, in __getitem__
raise KeyError(key)
KeyError: 'AssertionMessage'
This can be reproduced with the attached script which compiles a
trivial nih_assert() C program, runs it, and runs gdb on the produced
core dump. Up until xenial it looks like:
$ ./nih-assert.sh
(null):<stdin>:2: Assertion failed in main: 1 < 0
Aborted (core dumped)
[New LWP 9838]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./nih-assert'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007f28c070d418 in __GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
$1 = 0x25400f0 "<stdin>:2: Assertion failed in main: 1 < 0"
But in yakkety/amd64 it now looks like
$ ./nih-assert.sh
(null):<stdin>:2: Assertion failed in main: 1 < 0
Aborted (core dumped)
[New LWP 10489]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./nih-assert'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007fd303865418 in __GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
$1 = 0xffffffff869400f0 <error: Cannot access memory at address 0xffffffff869400f0>
This can be reproduced easily in a schroot, you need to install "libnih-dev pkg-config gdb".
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: libnih-dev 1.0.3-4.3ubuntu1
ProcVersionSignature: Ubuntu 4.4.0-22.39-generic 4.4.8
Uname: Linux 4.4.0-22-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
CurrentDesktop: i3
Date: Wed May 11 15:13:46 2016
Dependencies:
gcc-6-base 6.0.1-0ubuntu1
libc6 2.23-0ubuntu3
libgcc1 1:6.0.1-0ubuntu1
libnih1 1.0.3-4.3ubuntu1
EcryptfsInUse: Yes
SourcePackage: libnih
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1580601/+subscriptions
More information about the foundations-bugs
mailing list