GNU bug report logs - #30591
Vinagre segmentation fault - and gdb cannot find symbols?

Previous Next

Package: guix;

Reported by: Chris Marusich <cmmarusich <at> gmail.com>

Date: Sat, 24 Feb 2018 08:00:02 UTC

Severity: normal

Done: Sarah Morgensen <iskarian <at> mgsn.dev>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30591 in the body.
You can then email your comments to 30591 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#30591; Package guix. (Sat, 24 Feb 2018 08:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Chris Marusich <cmmarusich <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 24 Feb 2018 08:00:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: Vinagre segmentation fault - and gdb cannot find symbols?
Date: Sat, 24 Feb 2018 08:59:16 +0100
[Message part 1 (text/plain, inline)]
Hi,

Recently, I've noticed that Vinagre segfaults when I initiate a
connection.  To reproduce, try doing the following:

1) Install Vinagre.
2) Try to connect to a remote host.
3) Vinagre displays a black screen, and about 10-20 seconds later, it
crashes.

I've obtained a core dump, but it seems I can't get debug symbols from
it.  I'm using a custom version that adds a "debug" output, and my
~/.gdbinit is set up according to what Guix recommends in its manual
((guix) Installing Debugging Files).  What do I need to do to get gdb to
give me useful information?

Example debugging session follows:

--8<---------------cut here---------------start------------->8---
[0] marusich <at> garuda.local:~/debug-vinagre
$ cat ~/.gdbinit 
# Tell GDB where to look for separate debugging files.
set debug-file-directory ~/.guix-profile/lib/debug
# Let GDB auto-load any files it needs.
set auto-load safe-path /
[0] marusich <at> garuda.local:~/debug-vinagre
$ file core 
core: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from '/home/marusich/.guix-profile/bin/vinagre', real uid: 1000, effective uid: 1000, real gid: 998, effective gid: 998, execfn: '/gnu/store/7w9pimrkk7n1f9zxw9va6jkhmgyw8bbv-maru-vinagre-3.22.0/bin/.vinagre-real', platform: 'x86_64'
[0] marusich <at> garuda.local:~/debug-vinagre
$ tree ~/.guix-profile/lib/debug/
/home/marusich/.guix-profile/lib/debug/
└── gnu
    └── store
        ├── 7w9pimrkk7n1f9zxw9va6jkhmgyw8bbv-maru-vinagre-3.22.0 -> /gnu/store/j6nkca3pr1vhbd8bf25pphcwk66fb7nj-maru-vinagre-3.22.0-debug/lib/debug/gnu/store/7w9pimrkk7n1f9zxw9va6jkhmgyw8bbv-maru-vinagre-3.22.0
        └── n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25 -> /gnu/store/z1y36la9q1xkc5i5vcxqm7d995nrngmn-gcc-toolchain-7.2.0/lib/debug/gnu/store/n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25

4 directories, 0 files
[0] marusich <at> garuda.local:~/debug-vinagre
$ grep -A99 ~/custom-guix-packages/
marusich.scm   marusich.scm~  my-packages/   
[0] marusich <at> garuda.local:~/debug-vinagre
$ grep -A99 maru-vinagre ~/custom-guix-packages/marusich.scm 
(define-public maru-vinagre
  (package (inherit vinagre)
           (name "maru-vinagre")
           (outputs '("out" "debug"))))
[0] marusich <at> garuda.local:~/debug-vinagre
$ guix package --list-installed | grep maru-vinagre
maru-vinagre	3.22.0	debug	/gnu/store/j6nkca3pr1vhbd8bf25pphcwk66fb7nj-maru-vinagre-3.22.0-debug
maru-vinagre	3.22.0	out	/gnu/store/7w9pimrkk7n1f9zxw9va6jkhmgyw8bbv-maru-vinagre-3.22.0
[0] marusich <at> garuda.local:~/debug-vinagre
$ gdb --quiet /gnu/store/7w9pimrkk7n1f9zxw9va6jkhmgyw8bbv-maru-vinagre-3.22.0/bin/.vinagre-real core
Reading symbols from /gnu/store/7w9pimrkk7n1f9zxw9va6jkhmgyw8bbv-maru-vinagre-3.22.0/bin/.vinagre-real...
warning: the debug information found in "/home/marusich/.guix-profile/lib/debug//gnu/store/7w9pimrkk7n1f9zxw9va6jkhmgyw8bbv-maru-vinagre-3.22.0/bin/.vinagre-real.debug" does not match "/gnu/store/7w9pimrkk7n1f9zxw9va6jkhmgyw8bbv-maru-vinagre-3.22.0/bin/.vinagre-real" (CRC mismatch).

(no debugging symbols found)...done.
[New LWP 28789]
[New LWP 28790]
[New LWP 28791]
[New LWP 28792]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/gnu/store/3h31zsqxjjg52da5gp3qmhkh4x8klhah-glibc-2.25/lib/libthread_db.so.1".
Core was generated by `/home/marusich/.guix-profile/bin/vinagre'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f173c081707 in vnc_connection_coroutine () from /gnu/store/slxc1lf23wdzjamn6pfp2inrzy74dbwh-gtk-vnc-0.7.0/lib/libgvnc-1.0.so.0
[Current thread is 1 (Thread 0x7f1741e67500 (LWP 28789))]
(gdb) l
No symbol table is loaded.  Use the "file" command.
(gdb) where
#0  0x00007f173c081707 in vnc_connection_coroutine () from /gnu/store/slxc1lf23wdzjamn6pfp2inrzy74dbwh-gtk-vnc-0.7.0/lib/libgvnc-1.0.so.0
#1  0x00007f173c08489f in coroutine_trampoline () from /gnu/store/slxc1lf23wdzjamn6pfp2inrzy74dbwh-gtk-vnc-0.7.0/lib/libgvnc-1.0.so.0
#2  0x00007f173ae6c990 in ?? () from /gnu/store/3h31zsqxjjg52da5gp3qmhkh4x8klhah-glibc-2.25/lib/libc.so.6
#3  0x000000000101ec08 in ?? ()
#4  0x0000000000000000 in ?? ()
(gdb) 
--8<---------------cut here---------------end--------------->8---

I'm pretty new to debugging C programs in gdb, so if I'm making any
obvious mistakes, I'd really appreciate it if you'd let me know!

Thank you,

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30591; Package guix. (Sat, 24 Feb 2018 08:25:01 GMT) Full text and rfc822 format available.

Message #8 received at 30591 <at> debbugs.gnu.org (full text, mbox):

From: Gábor Boskovits <boskovits <at> gmail.com>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 30591 <at> debbugs.gnu.org
Subject: Re: bug#30591: Vinagre segmentation fault - and gdb cannot find
 symbols?
Date: Sat, 24 Feb 2018 09:24:22 +0100
[Message part 1 (text/plain, inline)]
2018-02-24 8:59 GMT+01:00 Chris Marusich <cmmarusich <at> gmail.com>:

> Hi,
>
> Recently, I've noticed that Vinagre segfaults when I initiate a
> connection.  To reproduce, try doing the following:
>
> 1) Install Vinagre.
> 2) Try to connect to a remote host.
> 3) Vinagre displays a black screen, and about 10-20 seconds later, it
> crashes.
>
> I've obtained a core dump, but it seems I can't get debug symbols from
> it.  I'm using a custom version that adds a "debug" output, and my
> ~/.gdbinit is set up according to what Guix recommends in its manual
> ((guix) Installing Debugging Files).  What do I need to do to get gdb to
> give me useful information?
>
> Example debugging session follows:
>
> --8<---------------cut here---------------start------------->8---
> [0] marusich <at> garuda.local:~/debug-vinagre
> $ cat ~/.gdbinit
> # Tell GDB where to look for separate debugging files.
> set debug-file-directory ~/.guix-profile/lib/debug
> # Let GDB auto-load any files it needs.
> set auto-load safe-path /
> [0] marusich <at> garuda.local:~/debug-vinagre
> $ file core
> core: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from
> '/home/marusich/.guix-profile/bin/vinagre', real uid: 1000, effective
> uid: 1000, real gid: 998, effective gid: 998, execfn: '/gnu/store/
> 7w9pimrkk7n1f9zxw9va6jkhmgyw8bbv-maru-vinagre-3.22.0/bin/.vinagre-real',
> platform: 'x86_64'
> [0] marusich <at> garuda.local:~/debug-vinagre
> $ tree ~/.guix-profile/lib/debug/
> /home/marusich/.guix-profile/lib/debug/
> └── gnu
>     └── store
>         ├── 7w9pimrkk7n1f9zxw9va6jkhmgyw8bbv-maru-vinagre-3.22.0 ->
> /gnu/store/j6nkca3pr1vhbd8bf25pphcwk66fb7nj-maru-vinagre-3.22.0-debug/
> lib/debug/gnu/store/7w9pimrkk7n1f9zxw9va6jkhmgyw8bbv-maru-vinagre-3.22.0
>         └── n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25 -> /gnu/store/
> z1y36la9q1xkc5i5vcxqm7d995nrngmn-gcc-toolchain-7.2.0/lib/debug/gnu/store/
> n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25
>
> 4 directories, 0 files
> [0] marusich <at> garuda.local:~/debug-vinagre
> $ grep -A99 ~/custom-guix-packages/
> marusich.scm   marusich.scm~  my-packages/
> [0] marusich <at> garuda.local:~/debug-vinagre
> $ grep -A99 maru-vinagre ~/custom-guix-packages/marusich.scm
> (define-public maru-vinagre
>   (package (inherit vinagre)
>            (name "maru-vinagre")
>            (outputs '("out" "debug"))))
> [0] marusich <at> garuda.local:~/debug-vinagre
> $ guix package --list-installed | grep maru-vinagre
> maru-vinagre    3.22.0  debug   /gnu/store/j6nkca3pr1vhbd8bf25pphcwk66fb7
> nj-maru-vinagre-3.22.0-debug
> maru-vinagre    3.22.0  out     /gnu/store/7w9pimrkk7n1f9zxw9va6jkhmgyw8b
> bv-maru-vinagre-3.22.0
> [0] marusich <at> garuda.local:~/debug-vinagre
> $ gdb --quiet /gnu/store/7w9pimrkk7n1f9zxw9va6jkhmgyw8b
> bv-maru-vinagre-3.22.0/bin/.vinagre-real core
> Reading symbols from /gnu/store/7w9pimrkk7n1f9zxw9va6jkhmgyw8b
> bv-maru-vinagre-3.22.0/bin/.vinagre-real...
> warning: the debug information found in "/home/marusich/.guix-profile/
> lib/debug//gnu/store/7w9pimrkk7n1f9zxw9va6jkhmgyw8b
> bv-maru-vinagre-3.22.0/bin/.vinagre-real.debug" does not match
> "/gnu/store/7w9pimrkk7n1f9zxw9va6jkhmgyw8bbv-maru-vinagre-3.22.0/bin/.vinagre-real"
> (CRC mismatch).
>
>
I've also seen this before. My workaround was that I created a package
disabling strip-binaries. That worked well enough. I've also added -g3 to
flags, as I needed macro expansions in debug. If you find out anything
useful for the CRC mismatch thing thou, I would be really interested. That
would have saved me lot of time.


> (no debugging symbols found)...done.
> [New LWP 28789]
> [New LWP 28790]
> [New LWP 28791]
> [New LWP 28792]
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/gnu/store/3h31zsqxjjg52da5gp3qmhkh4x8klh
> ah-glibc-2.25/lib/libthread_db.so.1".
> Core was generated by `/home/marusich/.guix-profile/bin/vinagre'.
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0  0x00007f173c081707 in vnc_connection_coroutine () from /gnu/store/
> slxc1lf23wdzjamn6pfp2inrzy74dbwh-gtk-vnc-0.7.0/lib/libgvnc-1.0.so.0
> [Current thread is 1 (Thread 0x7f1741e67500 (LWP 28789))]
> (gdb) l
> No symbol table is loaded.  Use the "file" command.
> (gdb) where
> #0  0x00007f173c081707 in vnc_connection_coroutine () from /gnu/store/
> slxc1lf23wdzjamn6pfp2inrzy74dbwh-gtk-vnc-0.7.0/lib/libgvnc-1.0.so.0
> #1  0x00007f173c08489f in coroutine_trampoline () from /gnu/store/
> slxc1lf23wdzjamn6pfp2inrzy74dbwh-gtk-vnc-0.7.0/lib/libgvnc-1.0.so.0
> #2  0x00007f173ae6c990 in ?? () from /gnu/store/
> 3h31zsqxjjg52da5gp3qmhkh4x8klhah-glibc-2.25/lib/libc.so.6
> #3  0x000000000101ec08 in ?? ()
> #4  0x0000000000000000 in ?? ()
> (gdb)
> --8<---------------cut here---------------end--------------->8---
>
> I'm pretty new to debugging C programs in gdb, so if I'm making any
> obvious mistakes, I'd really appreciate it if you'd let me know!
>
> Thank you,
>
> --
> Chris
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30591; Package guix. (Mon, 26 Feb 2018 06:06:02 GMT) Full text and rfc822 format available.

Message #11 received at 30591 <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: Gábor Boskovits <boskovits <at> gmail.com>
Cc: 30591 <at> debbugs.gnu.org
Subject: Re: bug#30591: Vinagre segmentation fault - and gdb cannot find
 symbols?
Date: Mon, 26 Feb 2018 07:05:06 +0100
[Message part 1 (text/plain, inline)]
Gábor Boskovits <boskovits <at> gmail.com> writes:

> I've also seen this before. My workaround was that I created a package
> disabling strip-binaries. That worked well enough. I've also added -g3 to
> flags, as I needed macro expansions in debug. If you find out anything
> useful for the CRC mismatch thing thou, I would be really interested. That
> would have saved me lot of time.

I was able to work around the problem by defining and then installing
the following custom package into my profile:

--8<---------------cut here---------------start------------->8---
(define-public maru-vinagre
  (package
   (inherit vinagre)
   (name "maru-vinagre")
   (outputs '("out"))
   (arguments
    (append
     (package-arguments vinagre)
     '(#:strip-binaries? #f)))))
--8<---------------cut here---------------end--------------->8---

It does NOT add a debug output; instead, it simply disables the
stripping of binaries.  GDB seems to be unhappy if I strip the symbols
and put them into the debug output.  I guess maybe it's related to the
CRC mismatch mentioned above?

Anyway, here's a little more info about what was going on at the time of
the segmentation fault:

--8<---------------cut here---------------start------------->8---
[0] marusich <at> garuda.local:~/debug-vinagre
$ gdb --quiet /gnu/store/xz88x8dnckvv0ipqfyvj8f2knbyx98lg-maru-vinagre-3.22.0/bin/.vinagre-real core
Reading symbols from /gnu/store/xz88x8dnckvv0ipqfyvj8f2knbyx98lg-maru-vinagre-3.22.0/bin/.vinagre-real...done.
[New LWP 26776]
[New LWP 26778]
[New LWP 26803]
[New LWP 26779]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/gnu/store/n6acaivs0jwiwpidjr551dhdni5kgpcr-glibc-2.26.105-g0890d5379c/lib/libthread_db.so.1".
Core was generated by `/home/marusich/.guix-profile/bin/vinagre'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f8255f06717 in vnc_connection_coroutine () from /gnu/store/pk2ff5244nway4cpirqgm0hm4c39i6xr-gtk-vnc-0.7.0/lib/libgvnc-1.0.so.0
[Current thread is 1 (Thread 0x7f825bd29940 (LWP 26776))]
(gdb) l
156	../vinagre-3.22.0/vinagre/vinagre-main.c: No such file or directory.
(gdb) help directory
Add directory DIR to beginning of search path for source files.
Forget cached info on source file locations and line positions.
DIR can also be $cwd for the current working directory, or $cdir for the
directory in which the source file was compiled into object code.
With no argument, reset the search path to $cdir:$cwd, the default.
(gdb) directory vinagre-3.22.0
Source directories searched: /home/marusich/debug-vinagre/vinagre-3.22.0:$cdir:$cwd
(gdb) l
156	    {
157	      gtk_window_present_with_time (window, GDK_CURRENT_TIME);
158	    }
159	
160	  vinagre_options_process_command_line (GTK_APPLICATION (app), window, &optionstate);
161	
162	out:
163	  g_strfreev (argv);
164	
165	  g_option_context_free (context);
(gdb) where
#0  0x00007f8255f06717 in vnc_connection_coroutine () from /gnu/store/pk2ff5244nway4cpirqgm0hm4c39i6xr-gtk-vnc-0.7.0/lib/libgvnc-1.0.so.0
#1  0x00007f8255f098af in coroutine_trampoline () from /gnu/store/pk2ff5244nway4cpirqgm0hm4c39i6xr-gtk-vnc-0.7.0/lib/libgvnc-1.0.so.0
#2  0x00007f8254c887e0 in ?? () from /gnu/store/n6acaivs0jwiwpidjr551dhdni5kgpcr-glibc-2.26.105-g0890d5379c/lib/libc.so.6
#3  0x0000000000ae3578 in ?? ()
#4  0x0000000000000000 in ?? ()
(gdb) 
--8<---------------cut here---------------end--------------->8---

The backtrace makes it look like maybe the segfault occurred in gtk-vnc,
not vinagre itself, so I guess I'll need to customize more packages to
build more debug outputs and try again...

I'll keep poking at this as I get time.  If anyone has any tips, I'd
really appreciate it.

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Reply sent to Sarah Morgensen <iskarian <at> mgsn.dev>:
You have taken responsibility. (Mon, 13 Sep 2021 00:44:01 GMT) Full text and rfc822 format available.

Notification sent to Chris Marusich <cmmarusich <at> gmail.com>:
bug acknowledged by developer. (Mon, 13 Sep 2021 00:44:01 GMT) Full text and rfc822 format available.

Message #16 received at 30591-done <at> debbugs.gnu.org (full text, mbox):

From: Sarah Morgensen <iskarian <at> mgsn.dev>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 30591-done <at> debbugs.gnu.org,
 Gábor Boskovits <boskovits <at> gmail.com>
Subject: Re: bug#30591: Vinagre segmentation fault - and gdb cannot find
 symbols?
Date: Sun, 12 Sep 2021 17:43:46 -0700
Hi Chris,

Chris Marusich <cmmarusich <at> gmail.com> writes:

> The backtrace makes it look like maybe the segfault occurred in gtk-vnc,
> not vinagre itself, so I guess I'll need to customize more packages to
> build more debug outputs and try again...
>
> I'll keep poking at this as I get time.  If anyone has any tips, I'd
> really appreciate it.

I can't replicate this, and it's rather old, so I'm closing this.  It
looks like this may have been an issue with freerdp [0] which was since
fixed.

Please reopen if this is still an issue.  Thanks,

[0] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=898448

--
Sarah




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 11 Oct 2021 11:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 169 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.