All of lore.kernel.org
 help / color / mirror / Atom feed
From: Teemu Koponen <tkoponen@iki.fi>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Opening of blocking FIFOs not reliable?
Date: Sun, 14 Aug 2005 03:40:34 -0700	[thread overview]
Message-ID: <5dd81f5a65eb47acb87fcf4953c88bf1@iki.fi> (raw)
In-Reply-To: <42FF19AC.6010502@colorfullife.com>

On Aug 14, 2005, at 3:15, Manfred Spraul wrote:

>> Opening a FIFO for WR_ONLY should release a previously blocked 
>> RD_ONLY open. I suspect this is not guaranteed on a heavily loaded 
>> Linux box.
>>
> Do you have a test case?
> IIRC we had that bug, and it was fixed by adding PIPE_WCOUNTER:
> PIPE_WRITERS counts the number of writers. This one is decreased 
> during close(). PIPE_WCOUNTER counts how often a writer was seen. It's 
> never decreased. Readers that wait for a writer wait until 
> PIPE_WCOUNTER changes, they do not look at PIPE_WRITERS.

Ah, I missed the semantics of WCOUNTER.  True, writer's open should 
always release the reader' s open (as Alan pointed out).

I do have a test application, which experienced dead-locked readers' 
opens before I artificially delayed writers' closes. The application 
runs on PlanetLab, which uses VServer, though. I'll try to construct 
next a minimal test case based on the application and reproduce the 
behavior on a vanilla box...

Teemu

--


  reply	other threads:[~2005-08-14 10:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-14 10:15 Opening of blocking FIFOs not reliable? Manfred Spraul
2005-08-14 10:40 ` Teemu Koponen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-08-13  3:18 Teemu Koponen
2005-08-14  0:49 ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5dd81f5a65eb47acb87fcf4953c88bf1@iki.fi \
    --to=tkoponen@iki.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.