From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Thu, 13 Sep 2007 16:05:22 -0500 Subject: [Cluster-devel] [PATCH] [GFS2] bz 276631 : GFS2: chmod hung Message-ID: <1189717522.5632.3.camel@technetium.msp.redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit The problem boiled down to a race between the gdlm_init_threads() function initializing thread1 and its setting of blist = 1. Essentially, "if (current == ls->thread1)" was checked by the thread before the thread creator set ls->thread1. Since thread1 is the only thread who is allowed to work on the blocking queue, and since neither thread thought it was thread1, no one was working on the queue. So everything just sat. This patch reuses the ls->async_lock spin_lock to fix the race, and it fixes the problem. I've done more than 2000 iterations of the loop that was recreating the failure and it seems to work. Dave Teigland brought up the question of whether we should do this another way. For example, by checking for the task name "lock_dlm1" instead. I'm open to opinions.