Inconsistency detected by ld.so: dl-close.c: 759: _dl_close: Assertion `map->l_init_called' failed!

Bug #1231459 reported by Stefan Paetow
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
krb5 (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

When I dynamically load a GSS mechanism that itself depends on the GSS library I get the following error on process exit:

Inconsistency detected by ld.so: dl-close.c: 759: _dl_close: Assertion `map->l_init_called' failed!

The Debian package apparently has a workaround for this (according to Sam), so... could you make this available to us Ubuntu 12 users too, please?

The server runs Ubuntu 12.04.3 LTS. The KRB5 package version is 1.10+dfsg~beta1-2ubuntu0.3

Tags: patch precise
Revision history for this message
Quinn Balazs (qbalazs) wrote :

1.11.3+dfsg-3 does have a fix for this, however I haven't seen it come over here yet.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in krb5 (Ubuntu):
status: New → Confirmed
Revision history for this message
Sam Hartman (hartmans) wrote :

Hi. What's going on here is that it seems there are cases where on process exit, ld.so will destruct the plugins before it destructs the dlopening library. So it sets m_inited to 0. But as part of its finalizer the library tries to clean up its resources, and dlcloses the plugins. Getting you this crash. For Debian I've decided to leak the library resource.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "0006-gssapi-never-unload-mechanisms.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
tags: added: precise
Changed in krb5 (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Sam Hartman (hartmans) wrote :

Stefan, I've prepared packages that should fix the problem available at https://launchpad.net/~hartmans/+archive/ubuntu-fixes
that page includes instructions on how to add the archive to your system. After you do that please update at least libgssapi-krb5-2 and let us know whether it fixes the problem.

Ubuntu review team, it turns out that the debian/saucy patch does not apply to precise. I've linked a branch of a proposed precise package. Let me know if there's anything else I can do to assist the process.

Revision history for this message
Stefan Paetow (stefan-paetow) wrote :

Sam, I now get a segfault in gss-server:

Reading symbols from /usr/bin/gss-server...(no debugging symbols found)...done.
(gdb) set args -verbose host@localhost
(gdb) run
Starting program: /usr/bin/gss-server -verbose host@localhost
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x000000000001f136 in ?? ()
(gdb) bt
#0 0x000000000001f136 in ?? ()
#1 0x00007ffff7bae8a1 in ?? () from /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
#2 0x00007ffff7baaaee in gss_add_cred () from /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
#3 0x00007ffff7bab187 in gss_acquire_cred () from /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
#4 0x00007ffff7bca624 in ?? () from /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
#5 0x00007ffff7bcadc8 in ?? () from /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
#6 0x00007ffff7baabc3 in gss_add_cred () from /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
#7 0x00007ffff7bab187 in gss_acquire_cred () from /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
#8 0x000000000040182e in ?? ()
#9 0x00007ffff77fe76d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000401ad1 in ?? ()
#11 0x00007fffffffe6c8 in ?? ()
#12 0x000000000000001c in ?? ()
#13 0x0000000000000003 in ?? ()
#14 0x00007fffffffe90a in ?? ()
#15 0x00007fffffffe91e in ?? ()
#16 0x00007fffffffe927 in ?? ()
#17 0x0000000000000000 in ?? ()
(gdb) quit
A debugging session is active.

 Inferior 1 [process 1550] will be killed.

Revision history for this message
Sam Hartman (hartmans) wrote : Re: [Bug 1231459] Re: Inconsistency detected by ld.so: dl-close.c: 759: _dl_close: Assertion `map->l_init_called' failed!

Did you update moonshot-gs-eap?,
There's a bad version the produce is that

Stefan Paetow <email address hidden> wrote:
>Sam, I now get a segfault in gss-server:
>
>Reading symbols from /usr/bin/gss-server...(no debugging symbols
>found)...done.
>(gdb) set args -verbose host@localhost
>(gdb) run
>Starting program: /usr/bin/gss-server -verbose host@localhost
>[Thread debugging using libthread_db enabled]
>Using host libthread_db library
>"/lib/x86_64-linux-gnu/libthread_db.so.1".
>
>Program received signal SIGSEGV, Segmentation fault.
>0x000000000001f136 in ?? ()
>(gdb) bt
>#0 0x000000000001f136 in ?? ()
>#1 0x00007ffff7bae8a1 in ?? () from
>/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
>#2 0x00007ffff7baaaee in gss_add_cred () from
>/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
>#3 0x00007ffff7bab187 in gss_acquire_cred () from
>/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
>#4 0x00007ffff7bca624 in ?? () from
>/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
>#5 0x00007ffff7bcadc8 in ?? () from
>/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
>#6 0x00007ffff7baabc3 in gss_add_cred () from
>/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
>#7 0x00007ffff7bab187 in gss_acquire_cred () from
>/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
>#8 0x000000000040182e in ?? ()
>#9 0x00007ffff77fe76d in __libc_start_main () from
>/lib/x86_64-linux-gnu/libc.so.6
>#10 0x0000000000401ad1 in ?? ()
>#11 0x00007fffffffe6c8 in ?? ()
>#12 0x000000000000001c in ?? ()
>#13 0x0000000000000003 in ?? ()
>#14 0x00007fffffffe90a in ?? ()
>#15 0x00007fffffffe91e in ?? ()
>#16 0x00007fffffffe927 in ?? ()
>#17 0x0000000000000000 in ?? ()
>(gdb) quit
>A debugging session is active.
>
> Inferior 1 [process 1550] will be killed.
>
>--
>You received this bug notification because you are a member of Moonshot
>Drivers, which is subscribed to the bug report.
>https://bugs.launchpad.net/bugs/1231459
>
>Title:
> Inconsistency detected by ld.so: dl-close.c: 759: _dl_close: Assertion
> `map->l_init_called' failed!
>
>To manage notifications about this bug go to:
>https://bugs.launchpad.net/ubuntu/+source/krb5/+bug/1231459/+subscriptions

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Revision history for this message
Stefan Paetow (stefan-paetow) wrote : RE: [Bug 1231459] Re: Inconsistency detected by ld.so: dl-close.c: 759: _dl_close: Assertion `map->l_init_called' failed!
Download full text (3.7 KiB)

Moonshot-gss-eap did get updated, yes.

Stefan

> -----Original Message-----
> From: <email address hidden> [mailto:<email address hidden>] On Behalf Of
> Sam Hartman
> Sent: 07 October 2013 16:19
> To: Paetow, Stefan (DLSLtd,RAL,LSCI)
> Subject: Re: [Bug 1231459] Re: Inconsistency detected by ld.so: dl-
> close.c: 759: _dl_close: Assertion `map->l_init_called' failed!
>
> Did you update moonshot-gs-eap?,
> There's a bad version the produce is that
>
> Stefan Paetow <email address hidden> wrote:
> >Sam, I now get a segfault in gss-server:
> >
> >Reading symbols from /usr/bin/gss-server...(no debugging symbols
> >found)...done.
> >(gdb) set args -verbose host@localhost
> >(gdb) run
> >Starting program: /usr/bin/gss-server -verbose host@localhost [Thread
> >debugging using libthread_db enabled] Using host libthread_db library
> >"/lib/x86_64-linux-gnu/libthread_db.so.1".
> >
> >Program received signal SIGSEGV, Segmentation fault.
> >0x000000000001f136 in ?? ()
> >(gdb) bt
> >#0 0x000000000001f136 in ?? ()
> >#1 0x00007ffff7bae8a1 in ?? () from
> >/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
> >#2 0x00007ffff7baaaee in gss_add_cred () from
> >/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
> >#3 0x00007ffff7bab187 in gss_acquire_cred () from
> >/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
> >#4 0x00007ffff7bca624 in ?? () from
> >/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
> >#5 0x00007ffff7bcadc8 in ?? () from
> >/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
> >#6 0x00007ffff7baabc3 in gss_add_cred () from
> >/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
> >#7 0x00007ffff7bab187 in gss_acquire_cred () from
> >/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
> >#8 0x000000000040182e in ?? ()
> >#9 0x00007ffff77fe76d in __libc_start_main () from
> >/lib/x86_64-linux-gnu/libc.so.6
> >#10 0x0000000000401ad1 in ?? ()
> >#11 0x00007fffffffe6c8 in ?? ()
> >#12 0x000000000000001c in ?? ()
> >#13 0x0000000000000003 in ?? ()
> >#14 0x00007fffffffe90a in ?? ()
> >#15 0x00007fffffffe91e in ?? ()
> >#16 0x00007fffffffe927 in ?? ()
> >#17 0x0000000000000000 in ?? ()
> >(gdb) quit
> >A debugging session is active.
> >
> > Inferior 1 [process 1550] will be killed.
> >
> >--
> >You received this bug notification because you are a member of
> Moonshot
> >Drivers, which is subscribed to the bug report.
> >https://bugs.launchpad.net/bugs/1231459
> >
> >Title:
> > Inconsistency detected by ld.so: dl-close.c: 759: _dl_close:
> Assertion
> > `map->l_init_called' failed!
> >
> >To manage notifications about this bug go to:
> >https://bugs.launchpad.net/ubuntu/+source/krb5/+bug/1231459/+subscript
> i
> >ons
>
> --
> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
>
> --
> You received this bug notification because you are subscribed to the
> bug report.
> https://bugs.launchpad.net/bugs/1231459
>
> Title:
> Inconsistency detected by ld.so: dl-close.c: 759: _dl_close:
> Assertion
> `map->l_init_called' failed!
>
> Status in “krb5” package in Ubuntu:
> Confirmed
>
> Bug description:
> When I dynamically load a GSS mechani...

Read more...

Revision history for this message
Sam Hartman (hartmans) wrote :

OK, that's probably the cause of the segfault.
I've deleted the broken packages from our debian and ubuntu archives.
Unfortunately getting fixed packages to reappear is a bit annoying at
the moment.
The packages in
http://repository.project-moonshot.org/debian-moonshot/pool/main/m/moonshot-gss-eap
now sholud be OK.
In particular the deb from April.

Revision history for this message
Stefan Paetow (stefan-paetow) wrote :

Ok, I've reinstalled the moonshot libraries, the error has gone away and there are no more segfaults.

Revision history for this message
Sam Hartman (hartmans) wrote : Re: [Bug 1231459] Re: Inconsistency detected by ld.so: dl-close.c: 759: _dl_close: Assertion `map->l_init_called' failed!

>>>>> "Stefan" == Stefan Paetow <email address hidden> writes:

    Stefan> Ok, I've reinstalled the moonshot libraries, the error has
    Stefan> gone away and there are no more segfaults.

OK.
So, if I'm understanding correctly the libgssapi-krb5-2 from my PPA did
fix the problem.
There was a segfault introduced by an update at the same time that was
unrelated to the ppa change.

If that's all correct, I think we have a solution to the precise
problem.

Revision history for this message
Stefan Paetow (stefan-paetow) wrote :

Confirmed. That is correct as far as I can establish.

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.