[SRU] Deadlocks in main loop
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glib2.0 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Lucid |
Fix Released
|
Medium
|
Unassigned | ||
Maverick |
Won't Fix
|
Low
|
Unassigned |
Bug Description
Some applications get stuck in a deadlock when utilizing glib. One of examples is lrmadmin, when connecting to lrmd. Upstream provided a fix for this bug and Ubuntu's version 11.04 and newer do not have this issue.
Ubuntu 10.04 and 10.10 do not contain the fix. Upstream fix:
https:/
[Impact]
Remove potential and demonstratable deadlocks in glib code.
[Development Fix]
Bug is fixed in Ubuntu 11.04 and later by the simple fact that these version have newer version of glib2.0 which contains this fix.
[Stable Fix]
Proposed fix is cherry picked from the upstream's, at the time, latest version of glib. This part of the code did not change since then.
[Test Case]
* Install lucid
* Install python-
apt-get install python-
* add ubuntu-
apt-
* Install pacemaker:
apt-get -y install pacemaker
* Enable corosync (/etc/default/
sed -i -e 's/START=
service corosync start
* Open two client->server connections:
lrmadmin -C ; lrmadmin -C
It deadlocks on second run (it actually never finishes the first run).
* Kill lrmd and stop corosync:
killall -9 lrmd ; service corosync stop
* install fix
apt-get update && apt-get install libglib2.0-0
* Start corosync:
service corosync start
* Run the test again:
lrmadmin -C ; lrmadmin -C ; lrmadmin -C ; lrmadmin -C
* It doesn't deadlock.
[Regression Potential]
Regression potential should be very small. This change is still present in almost unmodified upstream code to this day (g_source_
Related branches
- Stéphane Graber: Approve
- Ante Karamatić: Needs Resubmitting
- Dave Walker (community): Needs Fixing
- Ubuntu Sponsors: Pending requested
-
Diff: 61 lines (+41/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/90-context-unlock.patch (+33/-0)
debian/patches/series (+1/-0)
Changed in glib2.0 (Ubuntu Maverick): | |
status: | New → Won't Fix |
importance: | Undecided → Low |
Changed in glib2.0 (Ubuntu Lucid): | |
importance: | Undecided → Medium |
status: | New → Confirmed |
description: | updated |
summary: |
- Deadlocks in main loop + [SRU] Deadlocks in main loop |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Test case:
Install lucid ha-maintainers lucid ppa and update repo:
apt-add- repository ppa:ubuntu- ha-maintainers/ lucid-cluster ; apt-get update corosync) and start it: no/START= yes/' /etc/default/ corosync ; \
add ubuntu-
Install pacemaker:
apt-get -y install pacemaker
Enable corosync (/etc/default/
sed -i -e 's/START=
service corosync start
Open two client->server connections:
lrmadmin -C ; lrmadmin -C
It deadlocks on second run (it actually never finishes the first run).
Kill lrmd and stop corosync:
apt-add- repository ppa:ivoks/glib ; apt-get update ; apt-get -y upgrade
killall -9 lrmd ; service corosync stop
Add ppa:ivoks/glib (contains only the patch from the bzr branch):
Start corosync:
service corosync start
Run the test again:
lrmadmin -C ; lrmadmin -C ; lrmadmin -C ; lrmadmin -C
It doesn't deadlock.