#639 Deadlock with Loader Lock and GIL

open
nobody
None
5
2013-04-29
2013-04-29
No

FormatMessage could implicit load libraries to read resource strings for the message formatting. For this the windows DLL loader lock is acquired. In an multithreaded application which makes use of native an Python threads a deadlock could happen if these two locks (Loader Lock, GIL) are acquired in wrong order. This fix releases the GIL before a call to FormatMessage is made.

Discussion

  • Stefan Schukat

    Stefan Schukat - 2013-04-29

    Patch to fix loader lock GIL problem.

     
  • Mark Hammond

    Mark Hammond - 2013-04-30

    This patch looks fine, but could you please remove the lines like "// code changed by ssc" - source control can tell us that (and if you upload a patch from a mercurial queue, you will be directly attributed for the change)

    Thanks!

     
  • Stefan Schukat

    Stefan Schukat - 2013-04-30

    I provided a patch in the patch queue with the changes suggested.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks