2012-05-09 22:12:11 |
James Hunt |
bug |
|
|
added bug |
2012-05-09 22:14:02 |
James Hunt |
description |
NIH uses the __abort_msg symbol to save a string explaining why nih_assert() failed. However, __abort_msg is not a public symbol which causes problems when libc is upgraded - it actually necessitates that for every libc upgrade on, for example, Ubuntu systems the following has to happen:
1) eglibc is upgraded with a version set to <version>~foo
2) nih is rebuilt against the eglibc version
3) nih is upgraded.
4) the eglibc package is upgraded *again* to drop the ~foo.
The symbol can be made use of like this:
$ cat >foo.c<<EOF
int
main(int argc, char *argv[])
{
nih_log_set_priority (NIH_LOG_FATAL);
nih_assert (0 == 1);
exit (EXIT_SUCCESS);
}
EOF
$ gcc -std=gnu99 -g -Wall -pedantic -o foo foo.c `pkg-config --cflags --libs libnih`
$ ./foo
(null):nih_make_core.c:46: Assertion failed in main: 0 == 1
Aborted (core dumped)
$ gdb foo core.1597
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /home/james/src/c/foo...done.
[New LWP 1597]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
Core was generated by `foo'.
Program terminated with signal 6, Aborted.
#0 0xb770d1b2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb) p (char *)__abort_msg
$1 = 0x93fa098 "nih_make_core.c:46: Assertion failed in main: 0 == 1"
(gdb) |
NIH uses the private eglibc '__abort_msg' symbol to save a string explaining why nih_assert() failed. However, __abort_msg is not a public symbol which causes problems when libc is upgraded - it actually necessitates that for every libc upgrade on, for example, Ubuntu systems the following has to happen:
1) eglibc is upgraded with a version set to <version>~foo
2) nih is rebuilt against the eglibc version
3) nih is upgraded.
4) the eglibc package is upgraded *again* to drop the ~foo.
The symbol can be made use of like this:
$ cat >foo.c<<EOF
int
main(int argc, char *argv[])
{
nih_log_set_priority (NIH_LOG_FATAL);
nih_assert (0 == 1);
exit (EXIT_SUCCESS);
}
EOF
$ gcc -std=gnu99 -g -Wall -pedantic -o foo foo.c `pkg-config --cflags --libs libnih`
$ ./foo
(null):nih_make_core.c:46: Assertion failed in main: 0 == 1
Aborted (core dumped)
$ gdb foo core.1597
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /home/james/src/c/foo...done.
[New LWP 1597]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
Core was generated by `foo'.
Program terminated with signal 6, Aborted.
#0 0xb770d1b2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb) p (char *)__abort_msg
$1 = 0x93fa098 "nih_make_core.c:46: Assertion failed in main: 0 == 1"
(gdb) |
|
2012-05-11 18:22:34 |
James Hunt |
bug task added |
|
libnih (Ubuntu) |
|
2012-05-11 18:23:39 |
James Hunt |
bug task added |
|
apport (Ubuntu) |
|
2012-05-17 22:36:58 |
Brian Murray |
apport (Ubuntu): importance |
Undecided |
High |
|
2012-05-25 15:11:54 |
Brian Murray |
libnih (Ubuntu): importance |
Undecided |
High |
|
2012-08-20 00:21:38 |
Launchpad Janitor |
apport (Ubuntu): status |
New |
Confirmed |
|
2012-08-20 00:21:38 |
Launchpad Janitor |
libnih (Ubuntu): status |
New |
Confirmed |
|
2012-08-20 01:02:29 |
tammy stone |
bug |
|
|
added subscriber tammy stone |
2012-08-20 02:03:49 |
Micah Gersten |
tags |
|
rls-q-incoming |
|
2012-08-22 19:54:17 |
Steve Langasek |
tags |
rls-q-incoming |
rls-q-notfixing |
|
2012-10-25 09:51:13 |
Adam Conrad |
nominated for series |
|
Ubuntu Precise |
|
2012-10-25 09:51:13 |
Adam Conrad |
bug task added |
|
apport (Ubuntu Precise) |
|
2012-10-25 09:51:13 |
Adam Conrad |
bug task added |
|
libnih (Ubuntu Precise) |
|
2012-10-25 09:51:13 |
Adam Conrad |
nominated for series |
|
Ubuntu Quantal |
|
2012-10-25 09:51:13 |
Adam Conrad |
bug task added |
|
apport (Ubuntu Quantal) |
|
2012-10-25 09:51:13 |
Adam Conrad |
bug task added |
|
libnih (Ubuntu Quantal) |
|
2012-10-25 09:52:28 |
James Hunt |
nominated for series |
|
Ubuntu Raring |
|
2012-10-25 09:52:28 |
James Hunt |
bug task added |
|
apport (Ubuntu Raring) |
|
2012-10-25 09:52:28 |
James Hunt |
bug task added |
|
libnih (Ubuntu Raring) |
|
2012-10-25 09:52:56 |
James Hunt |
libnih (Ubuntu Raring): assignee |
|
James Hunt (jamesodhunt) |
|
2012-10-25 11:06:27 |
Launchpad Janitor |
branch linked |
|
lp:ubuntu/libnih |
|
2012-10-25 11:08:37 |
James Hunt |
libnih (Ubuntu Raring): status |
Confirmed |
Fix Released |
|
2012-10-25 12:11:26 |
Martin Pitt |
apport (Ubuntu Raring): status |
Confirmed |
In Progress |
|
2012-10-25 12:11:26 |
Martin Pitt |
apport (Ubuntu Raring): assignee |
|
Martin Pitt (pitti) |
|
2012-11-12 15:29:18 |
Martin Pitt |
attachment added |
|
test crash with nih https://bugs.launchpad.net/ubuntu/raring/+source/apport/+bug/997359/+attachment/3431337/+files/nih-crash |
|
2012-11-22 09:02:53 |
James Hunt |
attachment added |
|
script that forces an NIH program to crash to test __nih_abort_msg handling https://bugs.launchpad.net/libnih/+bug/997359/+attachment/3441007/+files/nih.sh |
|
2012-11-22 15:14:49 |
Launchpad Janitor |
branch linked |
|
lp:apport |
|
2012-11-22 15:17:06 |
Martin Pitt |
apport (Ubuntu Raring): status |
In Progress |
Fix Committed |
|
2012-11-30 17:55:23 |
Launchpad Janitor |
apport (Ubuntu Raring): status |
Fix Committed |
Fix Released |
|
2012-12-17 09:34:04 |
Dimitri John Ledkov |
libnih: status |
New |
Confirmed |
|
2012-12-17 09:55:58 |
Launchpad Janitor |
branch linked |
|
lp:~xnox/libnih/fix-for-997359 |
|
2012-12-17 09:58:16 |
Dimitri John Ledkov |
branch linked |
|
lp:~canonical-foundations/libnih/nih |
|
2014-05-04 11:18:33 |
Adolfo Jayme Barrientos |
apport (Ubuntu Quantal): status |
New |
Won't Fix |
|
2014-05-04 11:18:38 |
Adolfo Jayme Barrientos |
libnih (Ubuntu Quantal): status |
New |
Won't Fix |
|
2021-10-14 01:41:23 |
Steve Langasek |
apport (Ubuntu Precise): status |
New |
Won't Fix |
|
2021-10-14 01:41:27 |
Steve Langasek |
libnih (Ubuntu Precise): status |
New |
Won't Fix |
|