__abort_msg not defined

On Ubuntu karmic amd64, tests fail with the following error:

Traceback (most recent call last):
  File "/work/plash/plash/python/scripts/pola-run", line 25, in <module>
    import plash.env
  File "/work/plash/plash/python/plash/env.py", line 23, in <module>
    import plash_core
ImportError: /lib/libglib-2.0.so.0: symbol __abort_msg, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference

======================================================================
ERROR: tests_functional_test_py.PolaRunPythonTests.test_nested
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/functional_test.py", line 200, in test_nested
    check_subprocess_status(proc.wait())
  File "tests/functional_test.py", line 45, in check_subprocess_status
    raise Exception("Subprocess exited with status %i" % status)
Exception: Subprocess exited with status 1

This is with:

$ dpkg -s libglib2.0-0 | grep ^Version
Version: 2.22.2-0ubuntu1

/lib/libglib-2.0.so.0 references __abort_msg and has a dependency on the version symbol GLIBC_PRIVATE. This is not good! It means that this library has a dependency on a specific version of glibc. If Ubuntu upgrade libc, libglib will no longer work.

At least they have declared this dependency:

Depends: libc6 (>> 2.10), libc6 (<< 2.11), libpcre3 (>= 7.7), libselinux1 (>= 2.0.85)

It turns out that __abort_msg@GLIBC_PRIVATE is an Ubuntuism. They added it to libc themselves.

In this bug they ask for __assert_msg to be added to glibc: http://sources.redhat.com/bugzilla/show_bug.cgi?id=10217, "provide mechanism to examine assert/fatal messages from core file" (Kees Cook). Ulrich Drepper committed a change.

As an aside, why is libglib in /lib? Because it is used by /sbin/mount.devkit (whatever that is -- I can't find any documentation for it). libglib is in /lib in Debian as well as in Ubuntu.

Can we fix this or work around it?

Why is libglib referencing this variable? In the change that was committed to upstream glibc, this symbol is for use by debuggers, to read the message from a core dump. It is not supposed to be used by other libraries at run time.

Here is the changelog message from libglib that introduces the problem:

glib2.0 (2.22.0-1ubuntu1) karmic; urgency=low

  * Merge with Debian unstable to get the /usr/lib → /lib move. Aside from the
    new debugging library (libglib2.0-0-refdbg) this does not introduce any
    other changes to Karmic. Remaining Ubuntu changes:
    - debian/watch: Check for development versions, too.
    - Support for retaining assertion messages in core dumps, for Apport love:
      + Add 05_store_assert_message.patch: Store g_assert* message into
        glibc's __abort_msg variable, just like glibs' own assert() function.
        This keeps the assertion message in the core dump for easier debugging,
         and also enables Apport to catch assertion failures in GNOME programs.
      + Add 05_store_assert_message_autoconf.patch: autoheader/autoconf changes
        for above patch.
      + debian/rules: Configure with --enable-assert-messages for deb build.

 -- Martin Pitt <martin.pitt@ubuntu.com>  Wed, 23 Sep 2009 17:51:04 +0200

The Ubuntu developer filed a bug to make this change in upstream glib: https://bugzilla.gnome.org/show_bug.cgi?id=594872, "Support storing assertion messages into core dump". Unfortunately this change has been committed. It needs to be backed out because it breaks ABI compatibility by using a private interface of glibc.

Doesn't Lintian warn about dependencies on GLIBC_PRIVATE?

Other packages use __abort_msg in an unsupported way:

They both declare a libc6 (<< 2.11) dependency.

Ubuntu's ABI breakage is causing problems for users, e.g.:

PlashIssues/AbortMsgNotDefined (last edited 2009-12-29 16:42:49 by MarkSeaborn)