segfault after upgrade

I installed this plugin a few months ago, before any actual release, and things generally worked well. After noticing new releases here, I performed an upgrade from source (from 0dbae61 to 1.4.0+fb31b60), but now the plugin is crashing bitlbee with a segfault after a while:

11:40:04 [bitlbee] -!- ERROR BitlBee crashed! (SIGSEGV received)

the kernel agrees with my guess:

[2635932.507453] traps: bitlbee[24205] trap stack segment ip:7f62b6876556 sp:7ffe4d693490 error:0
[2635932.507472]  in[7f62b6866000+16000]

Here's a backtrace I was able to get by running bitlbee under gdb:

bitlbee@marcos:/var/lib/bitlbee$ gdb /usr/sbin/bitlbee
GNU gdb (Debian 7.12-6)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/bitlbee...(no debugging symbols found)...done.
(gdb) run -nvD
Starting program: /usr/sbin/bitlbee -nvD
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/".
Warning: Warning: Couldn't write PID to `/var/run/'

Program received signal SIGSEGV, Segmentation fault.
mastodon_http_get_filters (req=<optimized out>) at mastodon-lib.c:4080
4080            md->flags |= MASTODON_GOT_FILTERS;
(gdb) bt full
#0  mastodon_http_get_filters (req=<optimized out>) at mastodon-lib.c:4080
        ic = 0x55555584a7e0
        md = 0x0
#1  0x000055555557e1af in ?? ()
No symbol table info available.
#2  0x000055555557cfd1 in ?? ()
No symbol table info available.
#3  0x00007ffff73845a0 in event_base_loop () from /usr/lib/x86_64-linux-gnu/
No symbol table info available.
#4  0x000055555557cb50 in b_main_run ()
No symbol table info available.
#5  0x0000555555566d3d in main ()
No symbol table info available.

I tried to bisect the bug by recompiling, reinstalling and restarting, then waiting 40 seconds (as the crash happens anytime between 2 and 30 seconds after restart). I've been able to identify this commit as the source of the crash:

commit a3bc155b03bec0862835549c37ce3a69d3d39fd0
Author: Alex Schroeder <>
Date:   Wed Aug 29 11:07:55 2018 +0200

    Load filters together with the initial timeline.

More informally, I can confirm that v1.3.1 does not have this bug.

The plugin was compiled and is running on Debian stretch using bitlbee 3.5.1-1. I'm connected to two different Mastodon servers, one of which is failing with a 502 error (when bitlbee doesn't crash of course):

12:13:29 <@root> mastodon - Login error: Stream closed (502 Bad Gateway)

I hope that helps!

I was hoping that this issue was fixed with commit cb329b96 because I've noticed a similar problem with an instance that doesn't support filters. But fb31b60 includes that fix so... I guess not. Hm. – Alex

Tags: Closed

Reopen issue


for what it's worth, i believe this bug is fixed in the latest 1.4.0 release, as I have upgraded and can't reproduce the crash anymore. so this should probably be closed! :)

– Anonymous 2018-12-14 14:44 UTC

OK, cool! :)

– Alex Schroeder 2018-12-14 17:17 UTC

To save this page you must answer this question:

What is 2 + 4?