bitlbee / bitlbee-facebook

Facebook protocol plugin for BitlBee
GNU General Public License v2.0
279 stars 49 forks source link

Segfault when dealing with group chats #142

Closed runfalk closed 7 years ago

runfalk commented 7 years ago

I tried using the group chat feature in bitlbee-facebook but I am getting segfault for pretty much everything.

If I type fbchats in my &facebook channel I get the following when running under GDB as specified on https://wiki.bitlbee.org/DebuggingCrashes:

Thread 1 "bitlbee" received signal SIGSEGV, Segmentation fault.
0x00007fffe036de2c in ?? () from /usr/lib/bitlbee/facebook.so
#0  0x00007fffe036de2c in ?? () from /usr/lib/bitlbee/facebook.so
#1  0x00007fffe036e2cd in ?? () from /usr/lib/bitlbee/facebook.so
#2  0x000055555557079e in ?? ()
#3  0x000055555556c390 in ?? ()
#4  0x000055555556876e in irc_process ()
#5  0x000055555556437f in bitlbee_io_current_client_read ()
#6  0x0000555555578624 in ?? ()
#7  0x00007ffff760304a in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007ffff76033f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x00007ffff7603712 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x0000555555563557 in main ()

I also get a segfault if I set group_chat_open to all and then receive a message from a group chat.

I run this on Linux Mint using the official packages:

dequis commented 7 years ago

I can reproduce this when using 3.4.2-0ubuntu1 but not when using the bitlbee nightly repo as stated in the instructions in http://jgeboski.github.io/

The bitlbee packages must be used with the nightly repository.

It's a documented requirement because those are the versions these binaries are built against, but I would have expected it to work with 3.4.2 (don't remember any relevant changes since then), so I'm curious what happened there.

runfalk commented 7 years ago

Thank you for the quick reply! Switching to the nightlies repository fixes the problem.

I think it would be beneficial to add the nightly repository as the first step of the instructions. When it's that far down as a note I find it easier to miss. Another alternative would be to make the package depend on the at build time version of the nightly repository. That way I can't install potentially incompatible versions.

dequis commented 7 years ago

There, bumped the version requirement for those packages.

As the commit message says, the culprit turned out to be https://github.com/bitlbee/bitlbee/commit/8e6ecfe23ff985e57675bd00b94860edb62de9ad adding auth_backend in the middle of the irc struct. My bad. Sucks that 3.4.x and 3.5.x turned out to not be fully ABI compatible, but oh well. At least the ABI breakages are in sync with version bumps (previous one was from 3.2.x to 3.4)

In other words: bitlbee 3.4.x is still supported, but the plugin needs to be built specifically for that version and builds made for 3.5.x (such as the ones from that repo) used in 3.4.x will get this crash.