Bug 922447 - bitlbee crashes on disconnection due to a memory problem
Summary: bitlbee crashes on disconnection due to a memory problem
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: bitlbee
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robert Scheck
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 918816 951867 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-16 23:25 UTC by Felix Dewaleyne
Modified: 2018-04-11 13:42 UTC (History)
7 users (show)

Fixed In Version: bitlbee-3.2-6.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-12 22:28:58 UTC


Attachments (Terms of Use)
screen output generated with gdb --batch -ex run -ex bt --args /usr/sbin/bitlbee -Dnvc /etc/bitlbee/bitlbee.conf (8.50 KB, text/plain)
2013-03-16 23:25 UTC, Felix Dewaleyne
no flags Details
Fix bitlbee crash disconnecting SSL (417 bytes, patch)
2013-03-21 13:08 UTC, Aron Griffis
no flags Details | Diff
result of the valgrind --tool=memcheck --leak-check=yes (96.26 KB, text/plain)
2013-04-02 14:58 UTC, Matěj Cepl
no flags Details

Description Felix Dewaleyne 2013-03-16 23:25:51 UTC
Created attachment 711228 [details]
screen output generated with gdb --batch -ex run -ex bt --args /usr/sbin/bitlbee -Dnvc /etc/bitlbee/bitlbee.conf

Description of problem:
when closing an open connection or disconnecting from bitlbee, the output is generated.

Version-Release number of selected component (if applicable):
bitlbee.x86_64                        3.2-1.fc18              @updates          
bitlbee-debuginfo.x86_64              3.2-1.fc18              @updates-debuginfo
bitlbee-devel.x86_64                  3.2-1.fc18              @updates          
bitlbee-otr.x86_64                    3.2-1.fc18              @updates  

How reproducible:
all the time

Steps to Reproduce:
1. configure a jabber account using gtalk
2. start bitlbee, connect as usual
3. issue account gtalk off or disconnect
  
Actual results:
*** glibc detected *** /usr/sbin/bitlbee: munmap_chunk(): invalid pointer: 0x0000555555814f21 ***

Expected results:
bitlbee does not crash

Additional info:
script output of gdb --batch -ex run -ex bt --args /usr/sbin/bitlbee -Dnvc /etc/bitlbee/bitlbee.conf

I am able to reproduce this with just gtalk but in the test may have had also the aim and yahoo plugins enabled.

I was tracking another bug when I noticed this one.

Comment 1 Aron Griffis 2013-03-21 13:07:42 UTC
The problem is that conn->hostname is strdup'd in one code path but not another.  I'll attach the patch.  See also http://bugs.bitlbee.org/bitlbee/ticket/1038

Comment 2 Aron Griffis 2013-03-21 13:08:34 UTC
Created attachment 713833 [details]
Fix bitlbee crash disconnecting SSL

Comment 3 Robert Scheck 2013-03-25 13:10:23 UTC
*** Bug 918816 has been marked as a duplicate of this bug. ***

Comment 4 Robert Scheck 2013-03-25 13:11:00 UTC
Did somebody already have the chance to play with that patch?

Comment 5 Pekka Pietikäinen 2013-03-25 14:35:34 UTC
Seems to work (connect msn & fb jabber and then account off) + patch looks correct. I'll let it run (it randomly crashed previously every few hours-days and occasionally failed to connect at all) and let you know if it still fails, but +1 for a build with this fix.

Comment 6 Matěj Cepl 2013-04-02 12:02:17 UTC
Works for me and patch pushed to the master branch. Unfortunately, koji is broken ATM, so I cannot provide a scratch build.

Comment 7 Matěj Cepl 2013-04-02 14:58:16 UTC
Created attachment 730821 [details]
result of the valgrind --tool=memcheck --leak-check=yes

Comment 8 Aron Griffis 2013-04-02 15:03:37 UTC
Matěj, checking leaks seems orthoganol to this ticket... Something to fix, sure, but shouldn't block fixing the crash?

Comment 9 Matěj Cepl 2013-04-02 16:28:17 UTC
(In reply to comment #8)
> Matěj, checking leaks seems orthoganol to this ticket... Something to fix,
> sure, but shouldn't block fixing the crash?

This crash is the result of double-free(http://en.wikipedia.org/wiki/Double_free#Common_errors), so memory management is very much on spot for checking we haven't overlooked anything else.

Comment 10 Matěj Cepl 2013-04-02 18:54:24 UTC
Reporter, could you please check that the package from http://koji.fedoraproject.org/koji/taskinfo?taskID=5199260 (that's for Fedora 18) fixes the problem?

Comment 11 Pekka Pietikäinen 2013-04-02 19:03:05 UTC
+1 from here (no issues with self-compiled version since previous comment + quick test with koji build handled account off just fine).

Comment 12 Felix Dewaleyne 2013-04-03 07:22:30 UTC
+1 from me too, the problem seems solved with the koji packages.

Comment 13 Fedora Update System 2013-04-03 09:28:56 UTC
bitlbee-3.2-3.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/bitlbee-3.2-3.fc17

Comment 14 Fedora Update System 2013-04-03 09:30:17 UTC
bitlbee-3.2-3.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/bitlbee-3.2-3.fc18

Comment 15 Fedora Update System 2013-04-03 09:31:34 UTC
bitlbee-3.2-3.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/bitlbee-3.2-3.fc19

Comment 16 Fedora Update System 2013-04-03 09:32:35 UTC
bitlbee-3.2-3.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/bitlbee-3.2-3.el5

Comment 17 Fedora Update System 2013-04-03 09:33:44 UTC
bitlbee-3.2-3.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/bitlbee-3.2-3.el6

Comment 18 Fedora Update System 2013-04-03 16:10:43 UTC
Package bitlbee-3.2-3.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing bitlbee-3.2-3.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-4759/bitlbee-3.2-3.fc19
then log in and leave karma (feedback).

Comment 19 Fedora Update System 2013-04-12 22:29:00 UTC
bitlbee-3.2-3.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2013-04-12 22:29:48 UTC
bitlbee-3.2-3.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2013-04-20 20:04:50 UTC
bitlbee-3.2-3.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2013-05-23 19:43:20 UTC
bitlbee-3.2-3.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 23 Fedora Update System 2013-05-23 19:45:03 UTC
bitlbee-3.2-3.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 24 Matěj Cepl 2013-08-05 11:30:43 UTC
*** Bug 951867 has been marked as a duplicate of this bug. ***

Comment 25 Fedora Update System 2013-08-16 13:47:28 UTC
bitlbee-3.2-6.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/bitlbee-3.2-6.fc19

Comment 26 Fedora Update System 2013-08-16 13:48:13 UTC
bitlbee-3.2-6.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/bitlbee-3.2-6.fc18

Comment 27 Fedora Update System 2013-08-16 13:48:55 UTC
bitlbee-3.2-6.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/bitlbee-3.2-6.el6

Comment 28 Fedora Update System 2013-08-16 14:03:18 UTC
bitlbee-3.2-6.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/bitlbee-3.2-6.el5

Comment 29 Fedora Update System 2013-08-24 22:27:40 UTC
bitlbee-3.2-6.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 30 Fedora Update System 2013-08-24 22:29:17 UTC
bitlbee-3.2-6.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 31 Fedora Update System 2013-08-26 16:49:46 UTC
bitlbee-3.2-6.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 32 Fedora Update System 2013-09-05 19:12:14 UTC
bitlbee-3.2-6.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.