all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex ter Weele <alex.ter.weele@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Alex ter Weele <alex.ter.weele@gmail.com>, help-guix@gnu.org
Subject: Re: GTK applications crash on start
Date: Sat, 03 Mar 2018 12:32:12 -0600	[thread overview]
Message-ID: <87po4l80yb.fsf@librem.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <87371icday.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 02 Mar 2018 23:39:33 +0100")

ludo@gnu.org (Ludovic Courtès) writes:

> What does this say:
>
>   ldd $(dirname $(readlink -f $(type -P emacs)))/.emacs-25.3-real | grep glibc
>

    $ ldd $(dirname $(readlink -f $(type -P emacs)))/.emacs-25.3-real | grep glibc
            libm.so.6 => /gnu/store/n6acaivs0jwiwpidjr551dhdni5kgpcr-glibc-2.26.105-g0890d5379c/lib/libm.so.6 (0x00007fd969692000)
            librt.so.1 => /gnu/store/n6acaivs0jwiwpidjr551dhdni5kgpcr-glibc-2.26.105-g0890d5379c/lib/librt.so.1 (0x00007fd968869000)
            libpthread.so.0 => /gnu/store/n6acaivs0jwiwpidjr551dhdni5kgpcr-glibc-2.26.105-g0890d5379c/lib/libpthread.so.0 (0x00007fd966b80000)
            libc.so.6 => /gnu/store/n6acaivs0jwiwpidjr551dhdni5kgpcr-glibc-2.26.105-g0890d5379c/lib/libc.so.6 (0x00007fd96617c000)
            libdl.so.2 => /gnu/store/3h31zsqxjjg52da5gp3qmhkh4x8klhah-glibc-2.25/lib/libdl.so.2 (0x00007fd965f78000)
            libresolv.so.2 => /gnu/store/n6acaivs0jwiwpidjr551dhdni5kgpcr-glibc-2.26.105-g0890d5379c/lib/libresolv.so.2 (0x00007fd962529000)
            /gnu/store/n6acaivs0jwiwpidjr551dhdni5kgpcr-glibc-2.26.105-g0890d5379c/lib/ld-linux-x86-64.so.2 (0x00007fd96de85000)

> Is LD_LIBRARY_PATH or LD_PRELOAD set?
>

    $ echo $LD_LIBRARY_PATH

    $ echo $LD_PRELOAD
    /gnu/store/hfz0z0fs14jgl0kzk5hid2msr83lxii1-spectrwm-3.1.0/lib/libswmhack.so.0.0

That's weird, looks like my WM set LD_PRELOAD. I wouldn't have expected
that. And sure enough, with LD_PRELOAD unset:

    $ LD_PRELOAD= emacs -Q --eval "(kill-emacs)"
    ...(GTK warnings omitted)
    $ echo $?
    0

So why and how does spectrwm set LD_PRELOAD? I can't figure this out.

Other than that, I think I know what's going on: my user's compiled
emacs uses a newer glibc than the one injected by LD_PRELOAD:

    $ objdump -p /gnu/store/hfz0z0fs14jgl0kzk5hid2msr83lxii1-spectrwm-3.1.0/lib/libswmhack.so.0.0
    ...
      RUNPATH              /gnu/store/3h31zsqxjjg52da5gp3qmhkh4x8klhah-glibc-2.25/lib:...

    $ objdump -p $(dirname $(readlink -f $(type -P emacs)))/.emacs-25.3-real 
    ...
      RUNPATH              /gnu/store/n6acaivs0jwiwpidjr551dhdni5kgpcr-glibc-2.26.105-g0890d5379c/lib:...

And that's because I've guix-pulled and upgraded my user more recently
than my system.

> Does the beginning of “LD_DEBUG=files emacs” give hints as to why the
> second libc gets picked up?
>

The first paragraph of output looks like this:

     19839:	
     19839:	file=/gnu/store/hfz0z0fs14jgl0kzk5hid2msr83lxii1-spectrwm-3.1.0/lib/libswmhack.so.0.0 [0];  needed by /gnu/store/icz3hd36aqpjz5slyp4hhr8wsfbgiml1-bash-minimal-4.4.12/bin/bash [0]
     19839:	file=/gnu/store/hfz0z0fs14jgl0kzk5hid2msr83lxii1-spectrwm-3.1.0/lib/libswmhack.so.0.0 [0];  generating link map
     19839:	  dynamic: 0x00007f50b9725dc0  base: 0x00007f50b9524000   size: 0x00000000002020e0
     19839:	    entry: 0x00007f50b9524a90  phdr: 0x00007f50b9524040  phnum:                  6
     19839:	
     19839:	

I think that's just further evidence of the LD_PRELOAD injection.

  reply	other threads:[~2018-03-03 18:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-01  3:37 GTK applications crash on start Alex ter Weele
2018-03-02 13:56 ` Ludovic Courtès
2018-03-02 14:05   ` Alex ter Weele
2018-03-02 16:05     ` Ludovic Courtès
2018-03-02 19:42       ` Alex ter Weele
2018-03-02 22:39 ` Ludovic Courtès
2018-03-03 18:32   ` Alex ter Weele [this message]
2018-03-03 18:47     ` Alex ter Weele
2018-03-05  8:34       ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87po4l80yb.fsf@librem.i-did-not-set--mail-host-address--so-tickle-me \
    --to=alex.ter.weele@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.