Thread Rating:
  • 0 Vote(s) - 0 Average
Solved Issue - Python GIL issues since PR #901

This thread is a followup of an issue I began discussing on a github pull request:

On an addon I'm working on (Spotimc), freezes XBMC for a while when playback is requested, leading to timeout errors on the end.

The issue happens when playback is requested from python to a resource served by an embedded http server (CherryPy for example), started on the same process space as XBMC.

In short, the following chain of events should explain what's going on behind the scenes:
  • Playback is requested from python to an url of the embedded server.
  • XBMC opens an http connection to the embedded server.
  • On another python thread the server should handle the request, but it can't since the python GIL is still owned by (1). As a result the requests always time out.

I've created a simple addon which should help to reproduce the issue easily. It just starts a python server, and pressing the play button tells XBMC to start playing a file served by this server. In the presence of the issue XBMC should freeze for a while like it does with Spotimc. The addon can be downloaded here:

Hope all this info turns useful to resolve the issue.

Thanks in advance.
Sorry for the late reply on this and thanks for the script. Hopefully you can give me another day or two. You're next on my backlog.

Thanks again.
This is *probably* resolved - depending on whether or not I guessed right about what the problem is.
The above comment was for another post. Sorry about that.

Fixed here:

Thanks for the gift wrapped repro-script. That really helped. Sorry for the delay.
The fix works perfectly. Thank you!

Python GIL issues since PR #90100