[Click] NotifierQueue on multi-threaded Click problem.

Eddie Kohler kohler at cs.ucla.edu
Thu Sep 6 14:14:18 EDT 2007


Well, actually, I found a potential race condition even in 
one-push/one-pull scenarios, described by the comment in the attached 
diff.  This diff is checked in; any improvements?

Eddie


Eddie Kohler wrote:
> Hi Joonwoo,
> 
> I'm really glad that we are making progress!!
> 
> Now, for the Queue.  I agree that a simple test should be sufficient to 
> test race conditions.
> 
> Can you verify that in your configuration, there are *never* two threads 
> pushing into a Queue at the same time, and there are *never* two threads 
> pulling from a Queue at the same time?  NotifierQueue and FullNoteQueue 
> are designed for *at most one* pushing thread and *at most one* pulling 
> thread at a time.  The pushing thread can be different from the pulling 
> thread, but NotifierQueue and FullNoteQueue don't support multiple 
> threads pushing at once (or pulling at once).  Send your configuration 
> to the list for us to check.
> 
> If you are sure that there aren't multiple pushing threads (or pulling 
> threads), then take a look at the code.  What do you think the race 
> condition is?  Locking the full bodies of those push and pull functions 
> is not required.  Can you help me figure it out?
> 
> Eddie

-------------- next part --------------
A non-text attachment was scrubbed...
Name: notifierrace.diff
Type: text/x-patch
Size: 3235 bytes
Desc: not available
Url : https://pdos.csail.mit.edu/pipermail/click/attachments/20070906/b82bfc0a/notifierrace.bin


More information about the click mailing list