Print

Print


  Branch: refs/heads/stable-4.2.x
  Home:   https://github.com/xrootd/xrootd
  Commit: 0a4e945a83db614c9d27a739f79098b6b4f4a3dc
      https://github.com/xrootd/xrootd/commit/0a4e945a83db614c9d27a739f79098b6b4f4a3dc
  Author: Brian Bockelman <[log in to unmask]>
  Date:   2015-07-13 (Mon, 13 Jul 2015)

  Changed paths:
    M src/XrdCl/XrdClStream.cc

  Log Message:
  -----------
  Release Stream lock before invoking callbacks. #216

OnReadTimeout will call OnError with the Stream's lock held.
This causes OnError to invoke the user's callback with the
Stream lock held, possibly causing a lock ordering issue.

This fixes an observed deadlock within CMSSW over the following
objects:

Thread 1
    FileStateHandler::VectorRead takes FileStateHandler lock
    Stream::Send tries to take Stream lock

Thread 5
    FileTimer::Run takes FileTimer lock
    FileStateHandler::Tick tries to take FileStateHandler

Thread 6
    Stream::OnReadTimeout takes Stream lock
    DelayedClose::HandleResponseWithHosts  (this is callback code in CMSSW); this deletes a File object, which eventually calls
    FileTimer::UnRegisterFileObject tries to take FileTimer lock



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