SpectrumIM / spectrum2

Spectrum 2 IM transports
https://spectrum.im
409 stars 91 forks source link

Strange Segfaults in libpurple backend when using the libmsn-pecan #365

Closed Zombie-Ryushu closed 4 years ago

Zombie-Ryushu commented 4 years ago

Strange Segfaults in libpurple backend when using the libmsn-pecan with the Escargot. spectrum2_libpu[18077]: segfault at 0 ip (null) sp 00007ffe7baaceb8 error 14 in spectrum2_libpurple_backend[400000+3e000]

vitalyster commented 4 years ago

To see full useful backtraces you need to install debug symbols - https://spectrum.im/documentation/management/getting_backtrace.html

Zombie-Ryushu commented 4 years ago

The problem is, my Distribution optomizes out the debug symbols. What I am going to well, try and do, is get you links to the libpurple plugin's github, then try and recompile with debug symbols enabled.

vitalyster commented 4 years ago

Most distributions have special packages with debuginfo

Zombie-Ryushu commented 4 years ago

I'm finding and installing that now.

Zombie-Ryushu commented 4 years ago

0 0x00007fffeab7d6f7 in () at /usr/lib64/purple-2/libmsn-pecan.so

1 0x00007fffeab899f1 in msn_cmdproc_process_cmd () at /usr/lib64/purple-2/libmsn-pecan.so

2 0x00007fffeab8f775 in () at /usr/lib64/purple-2/libmsn-pecan.so

3 0x00007fffeab8f194 in () at /usr/lib64/purple-2/libmsn-pecan.so

4 0x00000036c6261bea in () at /lib64/libgio-2.0.so.0

5 0x00000036c6289d93 in () at /lib64/libgio-2.0.so.0

6 0x00000036c628a6fe in () at /lib64/libgio-2.0.so.0

7 0x00000036c62601f3 in () at /lib64/libgio-2.0.so.0

8 0x00000036c6260269 in () at /lib64/libgio-2.0.so.0

9 0x0000003bf444c60a in g_main_context_dispatch () at /lib64/libglib-2.0.so.0

10 0x0000003bf444c998 in () at /lib64/libglib-2.0.so.0

11 0x0000003bf444ccb2 in g_main_loop_run () at /lib64/libglib-2.0.so.0

12 0x00007ffff7886cb7 in gtk_main () at /usr/lib64/libgtk-x11-2.0.so.0

13 0x0000000000430a51 in main ()

vitalyster commented 4 years ago

All listed libraries should have debug symbols installed and loaded to see code lines, not random numbers

vitalyster commented 4 years ago

Anyway it looks like crash in libmsn-pecan, so you may only need its debug symbols

Zombie-Ryushu commented 4 years ago

0 0x00007fffeab7d6f7 in out_cmd (cmdproc=0x1d16790, cmd=0x230e220) at notification.c:418

1 0x00007fffeab899f1 in msn_cmdproc_process_cmd (cmdproc=0x1d16790, cmd=0x230e220) at cmd/cmdproc.c:412

    cb = <optimized out>
    trans = <optimized out>
    __func__ = "msn_cmdproc_process_cmd"

2 0x00007fffeab89c13 in msn_cmdproc_process_cmd_text (cmdproc=, command=) at cmd/cmdproc.c:432

3 0x00007fffeab8f775 in parse_impl (base_conn=, buf=, bytes_read=) at io/pn_cmd_server.c:150

    cmd_conn = 0xf86e90
    cur = 0x1e60fb0 "OUT"
    next = 0x1e60fb5 ""
    old_rx_buf = 0x1e60fb0 "OUT"
    cur_len = <optimized out>
    __func__ = "parse_impl"

4 0x00007fffeab8f194 in read_cb (source=0x1dbef90, result=, user_data=) at io/pn_node.c:80

    conn = 0xf86e90
    size = 5
    error = 0x0

5 0x00000036c6261bea in () at /lib64/libgio-2.0.so.0

6 0x00000036c6289d93 in () at /lib64/libgio-2.0.so.0

7 0x00000036c628a6fe in () at /lib64/libgio-2.0.so.0

8 0x00000036c62601f3 in () at /lib64/libgio-2.0.so.0

9 0x00000036c6260269 in () at /lib64/libgio-2.0.so.0

10 0x0000003bf444c60a in g_main_context_dispatch () at /lib64/libglib-2.0.so.0

11 0x0000003bf444c998 in () at /lib64/libglib-2.0.so.0

12 0x0000003bf444ccb2 in g_main_loop_run () at /lib64/libglib-2.0.so.0

13 0x00007ffff7886cb7 in gtk_main () at /usr/lib64/libgtk-x11-2.0.so.0

vitalyster commented 4 years ago

awesome! Now you can show this to libmsn-pecan developer and he will clearly understand the bug :) As there are no spectrum symbols it is not a spectrum issue