Modify

#901 closed defect (fixed)

Segfaults with skype-plugin

Reported by: me@… Owned by: Miklos Vajna
Priority: major Milestone:
Component: Skype Version: devel
Keywords: segv, sigsegv, skype, segfault Cc:
IRC client+version: weechat 0.3.7-dev Operating System: Linux
OS version/distro: Arch Linux, Kernel 3.1.7-1-ARCH, x86_64

Description

My bitlbee crashes several times daily with a segfault. Sometimes it's related to actions with the skype plugin (e.g. acc skype on), but they also appear randomly.

This started appearing randomly after I left some groupchats I think.

#0 0x00007ffff699f474 in strftime_internal () from /lib/libc.so.6 #1 0x00007ffff69a07e6 in strftime_l () from /lib/libc.so.6 #2 0x00007ffff6078ae6 in ?? () from /usr/lib/bitlbee/skype.so #3 0x00007ffff6076a82 in ?? () from /usr/lib/bitlbee/skype.so #4 0x0000000000427089 in ?? () #5 0x00007ffff771f84d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #6 0x00007ffff7720048 in ?? () from /usr/lib/libglib-2.0.so.0 #7 0x00007ffff7720582 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #8 0x0000000000412bfb in main ()

Not sure why the backtrace isn't that verbose, I ran ./configure with --debug=1

BitlBee bzr-bitlbee-build-872 API version 030004 skyped 0.1.1 skype 2.2.0.35 glibc 2.15-3 gcc (GCC) 4.6.2 20111223 (prerelease)

Nothing special in the skyped output. Also, sometimes this happens in a loop:

2012-01-20 13:38:25 @root skype - Reconnecting in 5 seconds.. 2012-01-20 13:38:30 @root skype - Logging in: Connecting 2012-01-20 13:38:30 @root skype - Logging in: Connected to server, logging in 2012-01-20 13:38:30 @root skype - Logging in: Logged in --- lots of joins --- 2012-01-20 13:38:35 @root skype - Error: Error while reading from server 2012-01-20 13:38:35 @root skype - Signing off.. --- lots of quits ---

If I can help with any debug information, please let me know. I can also provide a coredump and provide debug logs (BITLEBEE_DEBUG=1 was set) but I won't attach them here because they contain sensitive information. The logs don't seem to have anything special in them though.

Florian

Attachments (0)

Change History (18)

comment:1 Changed at 2012-01-20T22:36:37Z by Miklos Vajna

The plugin is loaded from $prefix/lib/bitlbee/skype.so, did you do a make install after building with debug symbols? Like:

./configure --debug=1 --skype=1
make
make install

comment:2 Changed at 2012-01-20T22:46:37Z by me@…

I use the Arch Linux AUR PKGBUILD (at http://aur.archlinux.org/packages/bi/bitlbee-bzr/PKGBUILD) which seems to do a make install. I think it actually was because makepkg strips the binaries by default. Trned that off now. file says:

/usr/lib/bitlbee/skype.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0x237fc189f18e1f140fe7a4e461101621fce0443a, not stripped

/usr/sbin/bitlbee: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.27, BuildID[sha1]=0x60e7c2be01acbb996f486d17341bbc5c563d8b61, not stripped

However gdb still says

Reading symbols from /usr/sbin/bitlbee...(no debugging symbols found)...done.

Also, using nm I see the symbols.

I'm still waiting for it to crash so I see if anything got better, but I guess not.

comment:3 Changed at 2012-01-20T23:40:56Z by anonymous

nm only lists public symbols, so that's not really interesting - with debug symbols you would get filenames and line numbers as well. Maybe you need something in the PKGBUILD to disable automatic stripping? options=('!strip') or something. Ask the distro guys. :)

comment:4 Changed at 2012-01-21T13:37:22Z by The Compiler

As I said above:

I think it actually was because makepkg strips the binaries by default. Turned that off now.

It did not crash since quite a while now though. As soon as I found out how to make it crash again, I'll compile by hand and hopefully see what goes wrong.

Florian

comment:5 Changed at 2012-01-22T13:21:24Z by The Compiler

Just crashed again. I was invited to a groupchat, got exactly one message, then it crashed. I'm quite sure it's related to groupchats somehow.

That's the gdb output I got this time. A lot more verbose, although doesn't look like a segfault somehow?

http://paste.pocoo.org/show/538699/

Does that help in any way?

Florian

comment:6 Changed at 2012-01-22T14:14:17Z by Wilmer van der Gaast <wilmer@…>

Ah no, that's a double free(). But still without line numbers. :-(

comment:7 Changed at 2012-01-22T17:59:11Z by Miklos Vajna

Yes, I guess Florian should just build manually (without a package manager) so when he runs it in gdb, the sources are not yet removed by the package builder.

Florian, could you please do that?

Thanks.

comment:8 Changed at 2012-01-23T18:53:09Z by me@…

Searched a bit more now and found https://wiki.archlinux.org/index.php/Debug_-_Getting_Traces#One_package_settings_only which finally helped.

Running again now, and gdb says:

Reading symbols from /usr/sbin/bitlbee...done.
(gdb) run -Dnv
Starting program: /usr/sbin/bitlbee -Dnv
[Thread debugging using libthread_db enabled]

And gdb on skype.so also shows:

Reading symbols from /usr/lib/bitlbee/skype.so...done.

So that seems fine.

Running again now and waiting for it to crash. ;)

comment:9 Changed at 2012-01-25T21:17:53Z by me@…

And finally an usable trace:

http://paste.pocoo.org/show/540738/

Didn't crash as long as I wasn't in the groupchat, crashed as soon as I was invited.

Also in the skyped output, I get lots "Bad file descriptor" stuff.

Maybe it's related to people in the groupchat I don't have in my contact list, so it can't get the info? Seems like it crashes at g_free(sd->info_sex);

comment:10 Changed at 2012-01-25T21:35:40Z by me@…

Used -O0 instead of -O1 now. Crashed with a bit different stack trace now which looks more usable:

http://paste.pocoo.org/show/540760/

Sorry for the noise

comment:11 Changed at 2012-01-27T23:10:08Z by anonymous

So, today I spent some time to reproduce your issue: I set up three skype instances, remoteA and remoteB had a normal chat, I made sure remoteB is not in my contact list, I invited bitlbee to the group chat (by remoteA, since remoteB can't invite it, not having it on the contact list), both remoteA and remoteB wrote messages and I can't get a crash.

I could get something similar to the first stacktrace, though - when a user has multiple about lines. I'll fix that in a bit then maybe it'll solve your issue as well.

comment:12 Changed at 2012-01-27T23:37:09Z by anonymous

I've pushed two commits to http://people.freedesktop.org/~vmiklos/bzr/bitlbee/, could you please test if it helps? (Not that those commits are not useful in their own. ;-) ) Especially the first one, that prevents reading uninitialized memory.

comment:13 Changed at 2012-01-30T21:24:56Z by wilmer

Done. That may just work — let's find out.

comment:14 Changed at 2012-02-01T05:38:15Z by me@…

Sorry for the rather late answer, I was a bit busy... Was still running the old code, just crashed again.

This time not connected to groupchats at all, but when I did "root: info cupdidi" where cupdidi is a contact who is offline (just left a minute ago or so)

Branched vmiklos' repo now, let's see how that runs.

comment:15 Changed at 2012-02-11T12:33:06Z by Miklos Vajna

No crash in the last 10 days? Sounds promising.

comment:16 Changed at 2012-02-13T06:17:39Z by me@…

I'm still rather busy, also nobody wants to invite me to the groupchat anymore it seems :P The random crashes I had outside of the groupchat seem to be gone, and I can finally tell you how it goes as soon as I'm invited into the groupchat again. Either they are busy as well, or they got annoyed by all the joining and leaving.

comment:17 Changed at 2012-03-30T14:34:40Z by me@…

This particular conference doesn't exist anymore, but I've been in a few other conferences now, and didn't have any problems. So I'd guess this is indeed fixed.

Thanks a lot! Florian

comment:18 Changed at 2012-03-30T18:04:49Z by Miklos Vajna

Resolution: fixed
Status: newclosed

Excellent! Closing.

Modify Ticket

Action
as closed The owner will remain Miklos Vajna.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.