python-gtk gtk.gdk.threads_enter hangs

Bug #274747 reported by ronny on 2008-09-26
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PIDA
Fix Released
Critical
Unassigned
pida (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: python-gtk2

Im using Ubuntu 8.10 ibex
python-gtk2 version is 2.13.0-0ubuntu4
libgtk2.0-0 version is 2.14.3-0ubuntu2

some days ago it still worked
it affects both, pida 0.5.1 and the current development trunk

they hang on gtk.gdk.threads_enter

it works in hardy
it also works in other distos

it seems to work again when i put gdk.gtk.threads_enter to weird location (i have no idea about the exact implications of that changes)

Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please answer these questions:

 * Is this reproducible?
 * If so, what specific steps should we take to recreate this bug?

 This will help us to find and resolve the problem.

Changed in pygtk:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Incomplete

within our app it is reproducible
basically starting pida will trigger it

so bascially
$ apt-get install pida
$ pida
# watch it hang
will do

i'm still on figuring the exact cause
it works on hardy and other distros in general

i cant yet reproduce it in simple examples (as i don't know the cause)

other devs of pida sugested it might be a race condition in our thread_enter/leave usage
so i'm not sure if its actually a new bug of gtk/pygtk or if a bug of gtk/pygtk did hide the issue

Sebastien Bacher (seb128) wrote :

there is no reason this bug should be distribution specific, did you try the same pygobject, pygtk, glib, gtk, python on other distributions? you might have a better reply upstream where people writting the code will read your bug than on launchpad

ok, pygtk people confirmed this was a recent bug, however they told me its fixed in ubuntu - is there any larger difference betwen pygtk in hardy and pygtk in intrepid? (it works on hardy after all)

after some more analysis we came to the conclusion that the removal of the threads enter/leave pair is the best choice given pida's architecture

we where unable to figure why the different gtk/pygtk versions act so different on that pair,
but the removal of it fixes the issues

due to pida's architecture it shouldn't yield any problems

Changed in pida:
assignee: nobody → ronny-pfannschmidt
importance: Undecided → Critical
status: New → Confirmed
Changed in pida:
status: Confirmed → Fix Committed
Changed in pida:
assignee: desktop-bugs → nobody
Markus Korn (thekorn) wrote :

I can confirm this issue when I run some of my projects on intrepid, examples are the 5-a-day applet [0] and a developing branch of leonov [1]. I can also confirm that the same code works on hardy and removing enter/leave thread "fixes" this issue.

[0] lp:five-a-day
[1] lp:~thekorn/+junk/leonov.dbus.backend

Markus Korn (thekorn) wrote :

I'm sorry, please ignore my last comment, after some more testing & coding gtk.gdk.threads_enter()/gtk.gdk.threads_leave() is working correctly for me.

Please see the attachment for a minimal example on how I'm using threading in pygtk now, which is working on intrepid.

Markus

Ubuntu 8.10, pida 0.5.1-5. On starting it you get the small gray window appear in the centre of the screen, but it stays empty; the "love" message doesn't appear. Nothing ever happens. Closing the window using the menu on the panel icon results in "it's not responding, force quit" which can kill it.

strace suggests it's getting stuck on futex(2). I suspect a race condition as one of the attempts to start it, identical to all the others, succeeded.

Note, a separate issue is choosing Emacs for the embedded editor without having Emacs installed. Then it just stops with "[Errno 2] No such file or directory" because a child process tried "execve("/usr/local/sbin/emacs", ["emacs", "--parent-id", "81789128", "-f", "server-start", "-l", "/home/peter/.pida2/pida_emacs_in"...], [/* 22 vars */]) = -1 ENOENT" for every directory in PATH.

Changed in pida:
status: Incomplete → Confirmed
Changed in pida:
status: Fix Committed → Fix Released

Ubuntu 9.04 jaunty (updated from hardy, not a fresh install)

$ LANG=C apt-cache policy pida
pida:
  Installed: 0.5.1-5ubuntu1
  Candidate: 0.5.1-5ubuntu1
  Version table:
 *** 0.5.1-5ubuntu1 0
        500 http://it.archive.ubuntu.com jaunty/universe Packages
        100 /var/lib/dpkg/status

starting pida from my account, it hangs as described by Ralph Corderoy, even if I remove pida config dir (~/.pida2)
Today I created a new user account and I can run pida without problems.

that sound like there are a few other bugs wrt upgrading ubuntu

thats something i can't debug - i'd apreciate more informations

JC Hulce (soaringsky) wrote :

The version of this program in Ubuntu has been updated and this bug may have been fixed. Can you still reproduce it?

Changed in pida (Ubuntu):
status: Confirmed → Incomplete
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers