public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Felix von Leitner <felix-linux@fefe.de>
To: linux-kernel@vger.kernel.org
Subject: problem with rt-sigio: lost events
Date: Thu, 26 Dec 2002 03:52:56 +0100	[thread overview]
Message-ID: <20021226025256.GA21711@codeblau.de> (raw)

Folks,

I am having trouble with sigio.  I tried to integrate it in a event
notification framework of mine that already speaks poll and epoll.
I want sigio for backwards compatibility with 2.4 kernels.

So I used the description from Dan's C10k web site and got it working.
My test application is a trivial web server for static web pages only.

My first problem is that sigio will not signal POLLOUT on freshly
connected connections.  It doesn't change when I read the HTTP header.
So I added a kludge that calls poll() when the application wants to
switch from reading to writing or vice versa.  That is quite ugly but it
works.

The second problem is that once I start hammering the server with
request (as opposed to running wget manually from the command line), the
server just stops serving requests.  strace shows this pattern:

  sigtimedwait signals an event on fd #3 (the listening socket)
  accept is called, returns #4
  fd 4 is set non-blocking
  F_SETOWN, F_SETSIG, SETFL O_ASYNC
  sigtimedwait times out.
  sigtimedwait is called again, times out again.

Why is that?  Googling seemed to indicate that there could be a race
condition here after the accept.  Should I be running poll on the socket
right away?  Or just blindly call the read handler?

Is anyone actually successfully using sigio for anything?  So far it
does not look very reliable to me.

Felix

             reply	other threads:[~2002-12-26  2:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-26  2:52 Felix von Leitner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-12-26  6:00 problem with rt-sigio: lost events Dan Kegel

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=20021226025256.GA21711@codeblau.de \
    --to=felix-linux@fefe.de \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox