Bug 989531 - choqok: using "show conversation" leads to eventual spontaneous-seeming crash
Summary: choqok: using "show conversation" leads to eventual spontaneous-seeming crash
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: choqok
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tejas Dinkar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-29 13:09 UTC by Benedikt Gollatz
Modified: 2013-09-14 02:41 UTC (History)
3 users (show)

Fixed In Version: choqok-1.4-1.fc18
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-14 02:34:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Add primitive reference counting to Post/PostWidget (982 bytes, patch)
2013-07-29 13:09 UTC, Benedikt Gollatz
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
KDE Software Compilation 321307 0 None None None Never

Description Benedikt Gollatz 2013-07-29 13:09:01 UTC
Description of problem:

Due to a memory management bug in libchoqok/ui/postwidget.cpp, in certain situations, data of deleted Choqok::UI::Post objects is periodically accessed and dereferenced, which can result in a segmentation fault. The issue has been investigated in <https://bugs.kde.org/show_bug.cgi?id=321307>.

Version-Release number of selected component (if applicable):

choqok-1.3.1-0.2.20130624.fc19
choqok-libs-1.3.1-0.2.20130624.fc19

How reproducible:

Sometimes. (Or always, eventually.)

Steps to Reproduce:

1. Use a PostWidget's "show conversation" button.
2. Wait for the used PostWidget to disappear from the timeline due to age.
3. Wait for UI update.

Actual results:

If unlucky, choqok will crash with a segmentation fault in Choqok::UI::PostWidget::updateUi -> Choqok::UI::PostWidget::formatDateTime. (The probability for a crash increases with time as choqok is dereferencing freed memory every minute from now on.)

Expected results:

No crash.

Additional info:

I have attached a patch against F19-packaged sources which mitigates the problem by adding primitive reference counting to Post/PostWidget relations. This is a quickfix: since choqok apparently never deletes certain PostWidgets, this patch also keeps the associated Posts around and thus increases the footprint of the (already existing) memory leak. I also don't expect the patch to be thread-safe, and in any case it is pretty ugly overall.

As such, I don't expect this patch to be incorporated upstream. However, it fixes the crash and with it user experience. I therefore propose to ship this patch with Fedora until the bug gets fixed properly upstream.

Note that the patch changes libchoqok API and ABI, but according to "repoquery -q --whatrequires `rpm -q --provides choqok-libs | cut -d' ' -f1`" actually only chokoq and choqok-devel depend on choqok-libs.

Comment 1 Benedikt Gollatz 2013-07-29 13:09:58 UTC
Created attachment 779889 [details]
Add primitive reference counting to Post/PostWidget

Comment 2 Benedikt Gollatz 2013-08-31 09:38:40 UTC
My patch has in fact now been added to the official git repository: <https://projects.kde.org/projects/extragear/network/choqok/repository/revisions/26d2c2a50ee7a6e5c4d5309a8abfba6ea00709b7>

Comment 3 Fedora Update System 2013-09-04 19:07:44 UTC
choqok-1.4-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/choqok-1.4-1.fc18

Comment 4 Fedora Update System 2013-09-04 19:07:45 UTC
choqok-1.4-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/choqok-1.4-1.fc19

Comment 5 Fedora Update System 2013-09-06 05:16:14 UTC
Package choqok-1.4-1.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 choqok-1.4-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-15894/choqok-1.4-1.fc19
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-09-14 02:34:38 UTC
choqok-1.4-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2013-09-14 02:41:49 UTC
choqok-1.4-1.fc18 has been pushed to the Fedora 18 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.