Licq crash after sending a message

37 views
Skip to first unread message

Thorsten Bonow

unread,
Mar 18, 2014, 4:26:45 PM3/18/14
to licq...@googlegroups.com
Left alone, Licq runs without problems, but soon after sending a message, it suddenly crashes, displaying the crash dialog.
licq.backtrace
licq.backtrace.gdb

Anders Olofsson

unread,
Mar 18, 2014, 4:53:35 PM3/18/14
to licq...@googlegroups.com
Hi,
looking from your backtrace, I believe this is the same issue that was
reported as https://github.com/licq-im/licq/issues/39, however that
issue was never resolved due to lack of information.

Could you please give us some more details of the problem.

- Which version of Licq are you using? And did you build it yourself or
get it pre-built from a Linux distribution?

- Does this happen every time you send a message or only sometimes?

- Does it matter which contact you try to send the message to?

- Does the crash only happen when sending to ICQ contacts or can you
reproduce it with Jabber contacts as well?

- Is the message received by the contact or does Licq crash before the
message is sent?

- Please run Licq in a terminal with -d15 as argument and copy the last
lines printed before the crash.

/Anders


On 2014-03-18 21:26, Thorsten Bonow wrote:
> Left alone, Licq runs without problems, but soon after sending a
> message, it suddenly crashes, displaying the crash dialog.
>
> --
>
> ---
> You received this message because you are subscribed to the Google
> Groups "Licq Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to licq-dev+u...@googlegroups.com
> <mailto:licq-dev+u...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Thorsten Bonow

unread,
Mar 23, 2014, 9:00:22 AM3/23/14
to licq...@googlegroups.com


On Tuesday, March 18, 2014 9:53:35 PM UTC+1, Anders Olofsson wrote:
Hi,
looking from your backtrace, I believe this is the same issue that was
reported as https://github.com/licq-im/licq/issues/39, however that
issue was never resolved due to lack of information.

Could you please give us some more details of the problem.

- Which version of Licq are you using? And did you build it yourself or
get it pre-built from a Linux distribution?

Hi,

I'm using the Debian Unstable package of Licq 1.8.1/SSL with Qt4 GUI.
The package was updated on March 17. I quote from the ChangeLog:

  * Binary-only non-maintainer upload for i386; no source changes.
  * Rebuild against libgloox11

- Does this happen every time you send a message or only sometimes?

It used to happen every time. After the update of the package only one crash
occured today on my computer at home (since Friday afternoon).  
 
- Does it matter which contact you try to send the message to?

Unfortunately, there is only one friend left who hasn't switched to WhatsApp ;-)
 
- Does the crash only happen when sending to ICQ contacts or can you
reproduce it with Jabber contacts as well?

:-(
 
- Is the message received by the contact or does Licq crash before the
message is sent?

The message is received. It takes a minute or more for Licq to crash.
 
- Please run Licq in a terminal with -d15 as argument and copy the last
lines printed before the crash.

10:59:36.813 [INF] licq: Initializing socket for service 0x10.
10:59:36.813 [INF] licq: Requesting service socket for FAM 0x10 (#2142/#636)...
10:59:36.954 [INF] icq/2: Redirect for service 0x10 received.
10:59:36.957 [INF] licq: Connecting to separate server for service 0x10.
10:59:36.957 [INF] licq: Connecting to 205.188.17.131:0...
11:01:01.317 [INF] icq/2: Sending message through server (#2147).
11:01:02.256 [INF] icq/2: Received updated contact information from server.
11:01:44.173 [WAR] licq: Can't establish service 0x10 socket.
11:01:44.173 [WAR] licq: Initialization of socket for service 0x10 failed, failing event.
Licq Segmentation Violation Detected.

Using gdb to save backtrace to /home/toto/.licq/licq.backtrace.gdb

warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
gdb exited with exit code 0

Backtrace (saved in /home/toto/.licq/licq.backtrace):
licq() [0x80c60aa]
linux-gate.so.1(__kernel_sigreturn+0) [0xb76fd400]
linux-gate.so.1(__kernel_vsyscall+0x10) [0xb76fd424]
/lib/i386-linux-gnu/i686/cmov/libc.so.6(gsignal+0x46) [0xb70834d6]
/lib/i386-linux-gnu/i686/cmov/libc.so.6(abort+0x143) [0xb7086853]
licq() [0x80c5cad]
linux-gate.so.1(__kernel_sigreturn+0) [0xb76fd400]
licq(_ZN4Licq5EventD2Ev+0x32) [0x8095dc2]
/usr/lib/licq/protocol_icq.so(+0x68dd8) [0xb3c44dd8]
/lib/i386-linux-gnu/i686/cmov/libpthread.so.0(+0x6ed9) [0xb76bbed9]
/lib/i386-linux-gnu/i686/cmov/libc.so.6(clone+0x5e) [0xb713f26e]
Attempting to generate core file.

Licq has encountered a fatal error.
Please report this error either by creating a new ticket at http://trac.licq.org/ or by sending an e-mail to the mailing list licq...@googlegroups.com (you must be registered to be able to post, see http://trac.licq.org/wiki/MailingList).

To help us debug the error, please include a full description of what you did when the error occurred. Additionally, please include the following files (if they exist):
/home/toto/.licq/licq.backtrace
/home/toto/.licq/licq.backtrace.gdb

Thanks, The Licq Team
Aborted

/Anders

Tomorrow I will try this at work. I hope this helps.

Thanks for your support

Toto 
licq.backtrace
licq.backtrace.gdb

Anders Olofsson

unread,
Mar 25, 2014, 3:46:40 PM3/25/14
to licq...@googlegroups.com
On 2014-03-23 14:00, Thorsten Bonow wrote:
> It used to happen every time. After the update of the package only one crash
> occured today on my computer at home (since Friday afternoon).

Do you know which was the previous version you were using that had the
crash every time?


> 10:59:36.813 [INF] licq: Initializing socket for service 0x10.
> 10:59:36.813 [INF] licq: Requesting service socket for FAM 0x10
> (#2142/#636)...
> 10:59:36.954 [INF] icq/2: Redirect for service 0x10 received.
> 10:59:36.957 [INF] licq: Connecting to separate server for service 0x10.
> 10:59:36.957 [INF] licq: Connecting to 205.188.17.131:0...
> 11:01:01.317 [INF] icq/2: Sending message through server (#2147).
> 11:01:02.256 [INF] icq/2: Received updated contact information from server.
> 11:01:44.173 [WAR] licq: Can't establish service 0x10 socket.
> 11:01:44.173 [WAR] licq: Initialization of socket for service 0x10
> failed, failing event.
> Licq Segmentation Violation Detected.

The crash is caused by an object being deleted twice. The backtrace only
shows the second time it is deleted, I would like to also find the first
occurance.
I have attached a patch that should make Licq crash on the first delete
instead. Could you please apply it, build Licq, reproduce the fault and
send backtrace.gdb from the crashes. The patch should apply cleanly on
1.8.0, 1.8.1, or current master as those files haven't changed in a while.

There might also be a workaround to avoid the crashes that you can use
until this is fixed. Edit ~./licq/users/<UIN>.ICQ_/<UIN>.conf (where
<UIN> is your account) and set UseBART=0. That should disable the code
where the crash is triggered, however you won't get automatic updates of
profile pictures any longer.

/Anders
licq_debug_event_assert.patch

Thorsten Bonow

unread,
Mar 27, 2014, 2:44:31 AM3/27/14
to licq...@googlegroups.com
Hi, 


On Tuesday, March 25, 2014 8:46:40 PM UTC+1, Anders Olofsson wrote:
On 2014-03-23 14:00, Thorsten Bonow wrote:
> It used to happen every time. After the update of the package only one crash
> occured today on my computer at home (since Friday afternoon).

Do you know which was the previous version you were using that had the
crash every time?

don't worry, everything is back to normal :-) On my work machine, the updated Licq crashes
reliably a short while after I have sent an ICQ message (message gets through, though).
Today I started testing with Jabber, too. This appears to work.  

> 10:59:36.813 [INF] licq: Initializing socket for service 0x10.
> 10:59:36.813 [INF] licq: Requesting service socket for FAM 0x10
> (#2142/#636)...
> 10:59:36.954 [INF] icq/2: Redirect for service 0x10 received.
> 10:59:36.957 [INF] licq: Connecting to separate server for service 0x10.
> 10:59:36.957 [INF] licq: Connecting to 205.188.17.131:0...
> 11:01:01.317 [INF] icq/2: Sending message through server (#2147).
> 11:01:02.256 [INF] icq/2: Received updated contact information from server.
> 11:01:44.173 [WAR] licq: Can't establish service 0x10 socket.
> 11:01:44.173 [WAR] licq: Initialization of socket for service 0x10
> failed, failing event.
> Licq Segmentation Violation Detected.

The crash is caused by an object being deleted twice. The backtrace only
shows the second time it is deleted, I would like to also find the first
occurance.
I have attached a patch that should make Licq crash on the first delete
instead. Could you please apply it, build Licq, reproduce the fault and
send backtrace.gdb from the crashes. The patch should apply cleanly on
1.8.0, 1.8.1, or current master as those files haven't changed in a while.

I've applied the patch and rebuild the Debian package. I've attachted the
backtrace and the console output generated by starting licq with the
'-d15' option. Hope this helps.
 
There might also be a workaround to avoid the crashes that you can use
until this is fixed. Edit ~./licq/users/<UIN>.ICQ_/<UIN>.conf (where
<UIN> is your account) and set UseBART=0. That should disable the code
where the crash is triggered, however you won't get automatic updates of
profile pictures any longer.

Thx. I can live for the moment with Jabber, but will try the workaround if you
don't need any more information concerning the crash from me. 

/Anders

Thx for your help. 

Toto
crash.txt
licq.backtrace
licq.backtrace.gdb

Anders Olofsson

unread,
Mar 27, 2014, 12:11:52 PM3/27/14
to licq...@googlegroups.com
On 2014-03-27 07:44, Thorsten Bonow wrote:
> I've applied the patch and rebuild the Debian package. I've attachted the
> backtrace and the console output generated by starting licq with the
> '-d15' option. Hope this helps.

Thanks, but it looks like you didn't get any debug information so I
can't see exactly where in the ICQ plugin the problem is.

Please re-build the ICQ plugin, but add -DCMAKE_BUILD_TYPE=Debug as
parameter to cmake, and post a new backtrace.
The entries for protocol_icq.so should show fuction and line number
instead of just "No symbol table info available."

/Anders

Thorsten Bonow

unread,
Mar 28, 2014, 3:18:16 AM3/28/14
to licq...@googlegroups.com
Hi, sry for the mess. I think you have to hold my hand and walk me through this.

I'm busy at work till Saturday evening but have time afterwards willing to spend on Sunday
and the rest of next week. I tell you what I've tried and what went wrong.
(I'm a little bit rusty, haven't done this for a long time and can't claim that I was ever
really good at it)
I'm able to rebuild the Debian package, but I'm not able to apply the Debug
option to the rules file (attached). I still get the ' No symbol table info available.' 
messages after a crash in my backtraces.

I got the git repository and tried to compile from source, but that failed. Please
tell me if I did something stupid.

I got the code into totos-licq:

git clone https://github.com/licq-im/licq totos-licq


patched the code via


patch -p1 < licq_debug_event_assert.patch


That worked without a flaw.


Changed into totos-licq/licq, created a build directory, changed into that and called:


cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/opt/licq ..


make && make install


That did work.


Then I created a build directory in totos-licq/icq and changed into that.


Calling 


cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/opt/licq ..


worked again, but make failed:


toto@catweazle:~/src/totos-licq/icq/build$ make

[  5%] Building CXX object src/CMakeFiles/protocol_icq.dir/oscarservice.cpp.o

/home/toto/src/totos-licq/icq/src/oscarservice.cpp: In function ‘void* LicqIcq::OscarServiceSendQueue_tep(void*)’:

/home/toto/src/totos-licq/icq/src/oscarservice.cpp:595:12: error: ‘class Licq::Event’ has no member named ‘myLockCounter’

         e->myLockCounter++;

            ^

/home/toto/src/totos-licq/icq/src/oscarservice.cpp:598:14: error: ‘class Licq::Event’ has no member named ‘myLockCounter’

           e->myLockCounter--;

              ^

/home/toto/src/totos-licq/icq/src/oscarservice.cpp:609:12: error: ‘class Licq::Event’ has no member named ‘myLockCounter’

         e->myLockCounter--;

            ^

make[2]: *** [src/CMakeFiles/protocol_icq.dir/oscarservice.cpp.o] Error 1

make[1]: *** [src/CMakeFiles/protocol_icq.dir/all] Error 2

make: *** [all] Error 2


Do I really have to compile everything separately or did I miss the "make all" feature?
Pressed for time and at al loss. 

Grateful for any advice ;-)
 
/Anders

Have a nice weekend

Toto 
rules.txt

Anders Olofsson

unread,
Mar 29, 2014, 5:04:11 AM3/29/14
to licq...@googlegroups.com
> I'm able to rebuild the Debian package, but I'm not able to apply the Debug
> option to the rules file (attached). I still get the ' No symbol table
> info available.'
> messages after a crash in my backtraces.
>
> I got the git repository and tried to compile from source, but that
> failed. Please
> tell me if I did something stupid.
>
>
> make: *** [all] Error 2
>
>
> Do I really have to compile everything separately or did I miss the
> "make all" feature?
> Pressed for time and at al loss.
>
> Grateful for any advice ;-)

It looks like you're building against unpatched headers. Do you have the
Debian packages for Licq still installed?
Uninstall all the Licq packages first so you only have the patched build
tree.
And yes, you will need to compile everything since the patch changes the
API between Licq and the plugins.

/Anders

Thorsten Bonow

unread,
Mar 31, 2014, 3:17:16 PM3/31/14
to licq...@googlegroups.com


On Saturday, March 29, 2014 10:04:11 AM UTC+1, Anders Olofsson wrote:

It looks like you're building against unpatched headers. Do you have the
Debian packages for Licq still installed?
Uninstall all the Licq packages first so you only have the patched build
tree.
And yes, you will need to compile everything since the patch changes the
API between Licq and the plugins.

/Anders

Hi,

next try :-)

I purged all Licq related Debian packages, got the newest sources from the git repository, patched them
and---with help---even found the build-all directory and the correct way of building from source.

Licq was nice enough to crash after a few minutes...

So I hope this is useful.

Thanks for your patience.

Toto
crash.txt
licq.backtrace
licq.backtrace.gdb

Anders Olofsson

unread,
Apr 1, 2014, 2:34:43 PM4/1/14
to licq...@googlegroups.com
> So I hope this is useful.

Yes it was. I see now what's happening.

It appears you are receiving packets with message id zero. Before the
crash, the log shows this happening a few times (I can only guess the
second and third also have id 0).

19:52:04.144 [INF] icq/2: Auto response from root_42 (#0).
19:52:04.145 [WAR] icq/2: Ack for unknown event.
19:52:04.146 [WAR] icq/2: Ack for unknown event.

After that, Licq attempts to update the buddy picture for your contact.

19:52:28.301 [INF] licq: Initializing socket for service 0x10.
19:52:28.302 [INF] licq: Requesting service socket for FAM 0x10
(#8879/#30)...
19:52:28.574 [INF] icq/2: Redirect for service 0x10 received.
19:52:28.574 [INF] licq: Connecting to separate server for service 0x10.
19:52:28.574 [INF] licq: Connecting to 205.188.17.131:0...

However, the code requesting the buddy picture has no message id so it
is internally set to zero, causing the next incoming message with id 0
to match and cause the event to be deleted by the wrong thread.

I would like to know what packets you are getting with id zero that are
causing this. Could you please run again with -d31 and post the packet
dumps. I don't need the log on messages (which contains your password),
only post packets after "Server says we're now: Online" until the crash.

/Anders

Thorsten Bonow

unread,
Apr 8, 2014, 11:28:52 AM4/8/14
to licq...@googlegroups.com
Hi,

On Tuesday, April 1, 2014 8:34:43 PM UTC+2, Anders Olofsson wrote:
...

I would like to know what packets you are getting with id zero that are
causing this. Could you please run again with -d31 and post the packet
dumps. I don't need the log on messages (which contains your password),
only post packets after "Server says we're now: Online" until the crash.

/Anders

I mailed the data to you (I was unfomfortable sending this data via google groups). Did you get it?

Toto 

Anders Olofsson

unread,
Apr 8, 2014, 11:56:38 AM4/8/14
to licq...@googlegroups.com
On 2014-04-08 17:28, Thorsten Bonow wrote:
> On Tuesday, April 1, 2014 8:34:43 PM UTC+2, Anders Olofsson wrote:
>
> ...
> I would like to know what packets you are getting with id zero that are
> causing this. Could you please run again with -d31 and post the packet
> dumps. I don't need the log on messages (which contains your password),
> only post packets after "Server says we're now: Online" until the
> crash.

>
>
> I mailed the data to you (I was unfomfortable sending this data via
> google groups). Did you get it?


No, I haven't gotten any mail from you other than the ones sent through
the list.
Another way is to use pastebin.com or similar service.

/Anders

Thorsten Bonow

unread,
Apr 8, 2014, 12:21:06 PM4/8/14
to licq...@googlegroups.com


On Tuesday, April 8, 2014 5:56:38 PM UTC+2, Anders Olofsson wrote:

> I mailed the data to you (I was unfomfortable sending this data via
> google groups). Did you get it?


No, I haven't gotten any mail from you other than the ones sent through
the list.
Another way is to use pastebin.com or similar service.

/Anders

Sorry for the delay. I cut off the beginning. I hope there is no sensitive information in the files.
A warning would be appreciated ;-)

Toto

 
licq.backtrace
licq.backtrace.gdb
packages.txt

Anders Olofsson

unread,
Apr 8, 2014, 3:12:33 PM4/8/14
to licq...@googlegroups.com

> Sorry for the delay. I cut off the beginning. I hope there is no
> sensitive information in the files.
> A warning would be appreciated ;-)

Thank you. It looks like the packet was status related. The packet sets
an empty away message for the contact, probably some kind of auto-away
related feature as you're getting it when sending a message.

I believe the following commit should solve the problem. Please test it
and let me know if you have any further problems.
https://github.com/licq-im/licq/commit/066e6e67f1b96decc8d14bd8f46add6c50e38009

Thank you for helping with solving this issue.

/Anders

Thorsten Bonow

unread,
Apr 8, 2014, 4:24:27 PM4/8/14
to licq...@googlegroups.com
Hi,

Licq appears to be working. No crash after a lot of test messages.

I will keep an eye on it and come back to you in case of another problem.
Reply all
Reply to author
Forward
0 new messages