The following commit has been merged in the openafs-stable-1_6_x branch: commit 1922a30c3d793b0fa401f1c5048637ffc5ae5a87 Author: Michael Meffie <mmef...@sinenomine.net> Date: Fri Jul 7 11:11:12 2017 -0400
afs: fix afs_xserver deadlock in afsdb refresh When setting up a new volume, the cache manager calls afs_GetServer() to setup the server object for each fileserver associated with the volume. The afs_GetServer() function locks afs_xserver and then, among other things, calls afs_GetCell() to lookup the cell info by cell number. When the cache manager is running in afsdb mode, afs_GetCell() will attempt to refresh the cell info if the time-to-live has been exceeded since the last call to afs_GetCell(). During this refresh the AFSDB calls afs_GetServer() to update the vlserver information. The afsdb handler thread and the thread processing the volume setup become deadlocked since the afs_xserver lock is already held at this point. This bug will manifest when the DNS SRV record TTL is smaller than the time the fileservers respond to the GetCapabilities RPC within afs_GetServer() and there are multiple read-only servers for a volume. Avoid the deadlock by using the afs_GetCellStale() variant within afs_GetServer(). This variant returns the memory resident cell info without the afsdb upcall and the subsequent afs_GetServer() call. Reviewed-on: https://gerrit.openafs.org/12652 Tested-by: BuildBot <build...@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <ka...@mit.edu> (cherry picked from commit 030a9849e22f443492342794f436e2c86c98a903) Change-Id: I01ad0c3fd042a818a9387db2d847208da6d7689a Reviewed-on: https://gerrit.openafs.org/12667 Tested-by: BuildBot <build...@rampaginggeek.com> Reviewed-by: Michael Meffie <mmef...@sinenomine.net> Reviewed-by: Mark Vitale <mvit...@sinenomine.net> Reviewed-by: Stephan Wiesand <stephan.wies...@desy.de> src/afs/afs_server.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) -- OpenAFS Master Repository _______________________________________________ OpenAFS-cvs mailing list OpenAFS-cvs@openafs.org https://lists.openafs.org/mailman/listinfo/openafs-cvs