dCache/dcache — pull request #832 by gbehrmann (2014-09-10 11:03:33+00:00)
Title: srm: Fix deadlock like bug

The CellStub refactoring led to more things being executor on the message
delivery thread, the point being to reduce the number of threads messages have
to hop through to reach the real destination. In this SRM this has however lead
to a deadlock like situation during file upload: If the file is aborted by
the client while the upload directory is prepared, the SRM will issue an abort
once the callback from the creation of the upload directory comes back. The
abort will send a message to the pnfs manager from the message delivery thread,
which blocks the entire cell - until the abort times out (so not a true
deadlock).

The proper fix is more elaborate: Eventually I would like all the SRM callbacks
to execute on the request scheduler's executor. This requires quite some more
refactoring, which obviously isn't applicable to stable branches. Hence the
present patch simply puts those callbacks back on a dedicated thread pool -
similar to the old behaviour.

Target: trunk
Request: 2.10
Request: 2.9
Require-notes: yes
Require-book: no
Acked-by: Paul Millar
Patch: https://rb.dcache.org/r/7292/
(cherry picked from commit 0dfc80eac4703acd629c667e1feaf895812b557d)