Print

Print


  Branch: refs/heads/master
  Home:   https://github.com/xrootd/xrootd
  Commit: 69cce3755a07459cd2920364c45e7ea97667e1c3
      https://github.com/xrootd/xrootd/commit/69cce3755a07459cd2920364c45e7ea97667e1c3
  Author: Brian Bockelman <[log in to unmask]>
  Date:   2016-01-28 (Thu, 28 Jan 2016)

  Changed paths:
    M bindings/python/src/PyXRootDFile.cc
    M bindings/python/src/PyXRootDFileSystem.cc

  Log Message:
  -----------
  Fix lock inversion in python bindings.

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.


  Commit: dd54ab63305af9b7c66083a8f279224d88793da9
      https://github.com/xrootd/xrootd/commit/dd54ab63305af9b7c66083a8f279224d88793da9
  Author: Brian Bockelman <[log in to unmask]>
  Date:   2016-01-28 (Thu, 28 Jan 2016)

  Changed paths:
    M bindings/python/src/AsyncResponseHandler.hh

  Log Message:
  -----------
  Check if python interpreter is still initialized.

Try to avoid executing our callback if the python interpreter is
not initialized.

Callbacks can occur after python has been finalized; trying to
access the GIL in this case causes undefined behavior.


  Commit: 37f6a055c0eefc68f7b389f5dea270029d351084
      https://github.com/xrootd/xrootd/commit/37f6a055c0eefc68f7b389f5dea270029d351084
  Author: simonmichal <[log in to unmask]>
  Date:   2016-02-01 (Mon, 01 Feb 2016)

  Changed paths:
    M bindings/python/src/AsyncResponseHandler.hh
    M bindings/python/src/PyXRootDFile.cc
    M bindings/python/src/PyXRootDFileSystem.cc

  Log Message:
  -----------
  Merge pull request #329 from bbockelm/fix_lock_inversion

Fix deadlock due to lock inversion in python bindings.


Compare: https://github.com/xrootd/xrootd/compare/bca35b33637b...37f6a055c0ee

########################################################################
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