nih: Set __abort_msg when aborting

Bug #429411 reported by Johan Kiviniemi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libnih
Fix Released
Wishlist
Scott James Remnant (Canonical)
upstart
Fix Released
Wishlist
Scott James Remnant (Canonical)
upstart (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

If the string __abort_msg is set, glibc stores the value in the core dump, which is helpful with debugging. Apport also uses the value.

The attached patch needs more work, it’s a quick implementation without test cases or verification of whether glibc is recent enough to support __abort_msg.

Revision history for this message
Johan Kiviniemi (ion) wrote :
Changed in libnih:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :
Changed in libnih:
status: Triaged → Fix Committed
Changed in upstart:
status: New → Fix Committed
importance: Undecided → Wishlist
summary: - Set __abort_msg when aborting
+ nih: Set __abort_msg when aborting
Changed in upstart:
milestone: none → 0.7.0
Changed in upstart:
assignee: nobody → Scott James Remnant (scott)
Changed in libnih:
assignee: nobody → Scott James Remnant (scott)
Changed in upstart:
milestone: 0.7.0 → none
Changed in upstart (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package upstart - 0.6.3-8

---------------
upstart (0.6.3-8) karmic; urgency=low

  * Rather than calling "telinit u" after upgrade, which will lose state,
    have the umountroot initscript take care of it for us by setting a
    flag. LP: #441796.
  * Don't lose the original default runlevel if /etc/inittab exists without
    an initdefault line. LP: #405847.
  * Fix "unhandled error" in shutdown when unable to change runlevel,
    e.g. due to previous Ubiquity bug. LP: #426332.
  * Merge change from trunk that makes it possible to build Upstart using
    a previously built copy of nih-dbus-tool, especially useful when
    cross-compiling. LP: #426740.
  * Merge change from libnih to store our assertion messages in the
    glibc __abort_msg symbol so apport can pick them up. LP: #429411.
  * Merge change from libnih to fix compilation issue with eglibc due
    to changed alphasort() prototype.

 -- Scott James Remnant <email address hidden> Wed, 14 Oct 2009 05:34:13 +0100

Changed in upstart (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Fixed in libnih 1.0.0, note that this fix will still need to be merged into software using libnih or the software updated to dynamically link to libnih instead.

Changed in libnih:
status: Fix Committed → Fix Released
Revision history for this message
Mark Seaborn (mrs) wrote :

__abort_msg is an internal glibc symbol; it's not part of glibc's public interface. You're not supposed to set it from your own libraries. If your library links against this symbol, it may stop working in future glibc versions. See my comment on https://bugzilla.gnome.org/show_bug.cgi?id=594872.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: [Bug 429411] Re: nih: Set __abort_msg when aborting

On Tue, 2009-12-29 at 13:09 +0000, Mark Seaborn wrote:

> __abort_msg is an internal glibc symbol; it's not part of glibc's public
> interface. You're not supposed to set it from your own libraries. If
> your library links against this symbol, it may stop working in future
> glibc versions. See my comment on
> https://bugzilla.gnome.org/show_bug.cgi?id=594872.
>
This was added by an Ubuntu developer, and was definitely intended to be
usable by other libraries that had their own assert functions. If the
developer got the glibc patch wrong, they'll fix it.

(Indeed, I see they've commented on that GNOME bug to say the same
thing)

Scott
--
Have you ever, ever felt like this?
Had strange things happen? Are you going round the twist?

Changed in upstart:
milestone: none → 0.6.5
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Making this a weak symbol seems to have the right effect; when it's missing from glibc, it has no address, which the code now checks for and doesn't stash it (runtime check > configure check)

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

0.6.5 2010-02-04 "Our last, best hope for victory"

 * Since libnih has been separated out into its own project, Upstart
   no longer includes its source and now uses the installed version by
   default.

 * The external nih-dbus-tool means that cross-compilation is trivial,
   the path to it may be overriden with NIH_DBUS_TOOL=... as an
   argument to configure. (Bug: #426740)

 * Developers may still build against a local libnih source tree by
   passing --with-local-libnih=/path/to/libnih to configure.

 * There is a new initctl "reload" command, with matching
   /sbin/reload symlink. This sends the SIGHUP signal to the running
   main process of the named job instance.

 * Event operator matches in jobs now support "!=" in addition to the
   usual "=", e.g.:

  start on net-device-added INTERFACE!=eth*

   (Bug: #513035)

 * Moved D-Bus system bus reconnection trigger from SIGHUP to SIGUSR1,
   since SIGHUP is already used for a forced configuration reload and
   causes Upstart to "forget" state.

 * Fixed bug where the default runlevel would be lost when an
   /etc/inittab file exists without an initdefault line. (Bug: #405847)

 * Fixed "Unhandled error" message from shutdown. (Bug: #426332)

 * Fixed "Unhandled error" assertion crash from Upstart child
   processes when failing to spawn a job. (Bug: #451917)

 * No longer holds /dev/console open, so the SAK SysRq key will not
   kill Upstart. (Bug: #486005)

 * Restored sync() call before reboot().

 * Added missing OPTIONS section to init(8) manpage. (Bug: #449883)

Changed in upstart:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.