Print

Print


When synchronous operations are performed, the python GIL should be
dropped using the `async` macro.  Otherwise, the following deadlock
can occur:
a) A python thread, holding the GIL, may call out to a XrdCl::File
   object, which takes an XRootD-related lock.
b) A XrdCl callback thread, holding an XRootD-related lock, tries
   to invoke a python callback and tries to acquire the GIL.

Since the python GIL is not needed to invoke an XrdCl operation,
this patch drops it for case (a), avoiding the deadlock.
You can view, comment on, or merge this pull request online at:

  https://github.com/xrootd/xrootd/pull/329

-- Commit Summary --

  * Fix lock inversion in python bindings.

-- File Changes --

    M bindings/python/src/PyXRootDFile.cc (22)
    M bindings/python/src/PyXRootDFileSystem.cc (34)

-- Patch Links --

https://github.com/xrootd/xrootd/pull/329.patch
https://github.com/xrootd/xrootd/pull/329.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/pull/329

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1