Ticket #122 (closed defect: invalid)

Opened 7 years ago

Last modified 5 years ago

gobby + sobby segfault immediately upon starting a session

Reported by: alex Owned by: armin
Priority: high Milestone:
Component: Gobby Version: 0.3.0
Severity: normal Keywords:
Cc: Launchpad Bug:

Description

I'm using the gentoo ebuilds for gobby-0.3.0 etc. If I run sobby, I get this output: Generating RSA key pair... Opening session... Segmentation fault

Gobby opens up fine, but if I try to create a session or join a session, it segfaults immediately. I'm sorry I don't know how to get any more detailed debug information. Please let me know if I can be of more help in debugging this.

Change History

Changed 7 years ago by anonymous

You may use the GNU debugger (GDB) to supply us with a backtrace: Type 'gdb {s|g}obby' in a console and then 'run' (at the gdb prompt, as soon as it appears). Make gobby/sobby crash and enter 'bt' in gdb. Post its output here.

Changed 7 years ago by armin

Oops, I wasn't logged in when I wrote that. Sorry.

Changed 7 years ago by alex

sobby through gdb: enerating RSA key pair... Opening session...

Program received signal SIGSEGV, Segmentation fault. 0xb7bc205c in memcpy () from /lib/libc.so.6

That's using stripped binaries, I'll re-emerge with FEATURES="nostrip". Here's a sobby backtrace: (gdb) bt #0 0xb7bc205c in memcpy () from /lib/libc.so.6 #1 0xb7d1d0c8 in std::string::_Rep::_M_clone () from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6 #2 0xb7d1d1c4 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string ()

from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6

#3 0x080892f4 in obby::serialise::attribute::set_value<unsigned int> () #4 0x0808b81e in obby::serialise::attribute::set_value<unsigned int> () #5 0xb7b6f56d in libc_start_main () from /lib/libc.so.6 #6 0x08050761 in ?? ()

As I said, I'll give non-stripped binaries a go.

Changed 7 years ago by alex

Formatted properly

(gdb) bt
#0  0xb7bc205c in memcpy () from /lib/libc.so.6
#1  0xb7d1d0c8 in std::string::_Rep::_M_clone () from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6
#2  0xb7d1d1c4 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string ()
   from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6
#3  0x080892f4 in obby::serialise::attribute::set_value<unsigned int> ()
#4  0x0808b81e in obby::serialise::attribute::set_value<unsigned int> ()
#5  0xb7b6f56d in __libc_start_main () from /lib/libc.so.6
#6  0x08050761 in ?? ()

Changed 7 years ago by alex

Compiled with -ggdb, unstripped:

(gdb) run
Starting program: /usr/bin/sobby
Generating RSA key pair...
Opening session...

Program received signal SIGSEGV, Segmentation fault.
0xb7c0205c in memcpy () from /lib/libc.so.6
(gdb) bt
#0  0xb7c0205c in memcpy () from /lib/libc.so.6
#1  0xb7d5d0c8 in std::string::_Rep::_M_clone () from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6
#2  0xb7d5d1c4 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string ()
   from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6
#3  0x08087f61 in Server (this=0xbfe86110, argc=1, argv=0xbfe86194) at ustring.h:862
#4  0x0808a50e in main (argc=-1348243436, argv=0xafa37014) at main.cpp:27

Changed 7 years ago by phil

Could you please use "up" until you reach the "Server" part and then issue a "print this"? This should give us a dump of the server object with all member variables.

Changed 7 years ago by phil

Could you by chance step through the program and collect some variables on the way? It is quite difficult for us to track it down remotely.

Changed 7 years ago by alex

I've never used gdb before today, so right now I'm not sure how to go about stepping through the program. I can do some reading tomorrow though. I issued a 'print this' after going 'up' to the server object. It doesn't look very useful at all to me, but what do I know.

(gdb) up
#3  0x08087f61 in Server (this=0xbfdb53d0, argc=1, argv=0xbfdb5454) at ustring.h:862
862     {
(gdb) print this
$1 = (class Sobby::Server * const) 0xbfdb53d0

I I go up again it shows this:

#4  0x0808a50e in main (argc=-1348042732, argv=0xafa68014) at main.cpp:27
27      main.cpp: No such file or directory.
        in main.cpp

Changed 7 years ago by phil

Sorry, "print *this" would be more right.

Could you please compile sobby from source? (It's as easy as ./configure && make -- No need to install it.) Then try if this copy does also segfault. If so invoke gdb on it, it should now present a more meaningful source line. If not you could just use next several times instead of run, until it crashes.

Changed 7 years ago by phil

What's the output of the following command?

 gcc -v 2>&1|tail -n 1

Changed 7 years ago by alex

gcc -v 2>&1|tail -n 1 gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)

I'm currently doing some major library rebuilding, I may have a botched gcc 3.3-3.4 transition, in which case I'm sorry for the false bug report.

#3  0x080887c9 in Server (this=0xbfe49940, argc=1, argv=0xbfe499c4) at ustring.h:862
862     {
(gdb) print *this
$1 = {<> = {<No data fields>}, <sigc::trackable> = {callback_list_ = 0x0}, m_port = 6522, m_interactive = false,
  m_main_loop = {pCppObject_ = 0x809bef0}, m_server = {_M_ptr = 0x809d25c}, m_autosaver = {_M_ptr = 0x0},
  static m_cmd_map = @0x809aa88}

Changed 7 years ago by alex

  • status changed from new to closed
  • resolution set to invalid

gobby+sobby work like a charm now, my system was borked. Apologies for the false bug.

Note: See TracTickets for help on using tickets.