Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

SIGSEGV multiprotocol jabber licq 1.9.0-fb75e8e/SSL #40

Closed
myallod opened this issue Dec 3, 2013 · 2 comments
Closed

SIGSEGV multiprotocol jabber licq 1.9.0-fb75e8e/SSL #40

myallod opened this issue Dec 3, 2013 · 2 comments

Comments

@myallod
Copy link

myallod commented Dec 3, 2013

My licq 1.9.0-fb75e8e/SSL is crashed 2-3 times per day. I use one icq account and eight jabber accounts. i suspect licq is crashing as a whole when one of jabber accounts disconnects suddenly, but not always - sometimes jabber account goes offline and licq continues to work properly.
I made licq with cmake --DCMAKE_BUILD_TYPE=Debug in build-all directory.
Then i run licq under gdb and as usual after some hours of working i've got:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff3a69700 (LWP 20088)]
0x00007ffff6893503 in std::_Rb_tree_increment(std::_Rb_tree_node_base*) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0 0x00007ffff6893503 in std::_Rb_tree_increment(std::_Rb_tree_node_base*) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x0000000000543487 in std::_Rb_tree_iterator<std::pair<int const, Licq::MainLoop::Private::File> >::operator++ (this=0x7ffff3a68c40)

at /usr/include/c++/4.7/bits/stl_tree.h:188

#2 0x00000000005426b7 in Licq::MainLoop::run (this=0x9b7a20) at /home/lek/Downloads/src/licq/licq/src/mainloop.cpp:198
#3 0x00007ffff305312a in LicqJabber::Plugin::run (this=0x9b7a00) at /home/lek/Downloads/src/licq/jabber/src/plugin.cpp:62
#4 0x00000000005c6bc2 in LicqDaemon::PluginInstance::startThreadEntry (plugin=0x9b7b20) at /home/lek/Downloads/src/licq/licq/src/plugin/plugininstance.cpp:175
#5 0x00000000005c704b in pluginThreadEntry (arg=0x859ae0) at /home/lek/Downloads/src/licq/licq/src/plugin/pluginthread.cpp:138
#6 0x00007ffff7bc7b50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7 0x00007ffff62e8a7d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8 0x0000000000000000 in ?? ()

(gdb) quit
A debugging session is active.

Inferior 1 [process 20084] will be killed.

Quit anyway? (y or n) y

Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux

Please help.

Next crash - run without gdb.

licq_backtrace:
time: 1386056749
/usr/local/bin/licq() [0x555346]
/lib/x86_64-linux-gnu/libc.so.6(+0x324f0) [0x7f2ba25124f0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f2ba2512475]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x180) [0x7f2ba25156f0]
/usr/local/bin/licq() [0x554f16]
/lib/x86_64-linux-gnu/libc.so.6(+0x324f0) [0x7f2ba25124f0]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base+0x13) [0x7f2ba2b65503]
/usr/local/bin/licq(_ZNSt17_Rb_tree_iteratorISt4pairIKiN4Licq8MainLoop7Private4FileEEEppEv+0x1b) [0x543487]
/usr/local/bin/licq(_ZN4Licq8MainLoop3runEv+0x4a7) [0x5426b7]
/usr/local/lib/licq/protocol_jabber.so(+0x1512a) [0x7f2b9f32512a]
/usr/local/bin/licq(_ZN10LicqDaemon14PluginInstance16startThreadEntryEPv+0x82) [0x5c6bc2]
/usr/local/bin/licq() [0x5c704b]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x6b50) [0x7f2ba3e99b50]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f2ba25baa7d]

licq.backtrace.gdb http://pastie.org/pastes/8524756/text

licq.debug_rw_mutex
time: 1386057501
Possible deadlock for thread 0x7f2ba08b8700 trying to get a write lock on 'ICQ_277507035'
No thread holds the write lock
These threads hold the read lock: 0x7f2b9e221700

@flynd
Copy link
Member

flynd commented Dec 4, 2013

I see a possible race in the mainloop class. Could you try the following patch and see if it solves your problem?

http://pastebin.com/YwDB4REe

@myallod
Copy link
Author

myallod commented Dec 5, 2013

Hi, patch seems to be working! Licq works perfectrly already 24 hrs, jabber disconnects about 20 times. Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants