From: Marcel Holtmann <marcel@holtmann.org>
To: Jean Tourrilhes <jt@hpl.hp.com>
Cc: Max Krasnyansky <maxk@qualcomm.com>,
BlueZ Mailing List <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] Re: L2CAP non-blocking socket nasty race conditions
Date: Wed, 04 Feb 2004 20:58:47 +0100 [thread overview]
Message-ID: <1075924727.2783.47.camel@pegasus> (raw)
In-Reply-To: <20040204175832.GB16590@bougret.hpl.hp.com>
Hi Jean,
> No, the code is not that simple and I don't really want it
> out. However, I think any trivial program using non-blocking sockets
> will show that.
> Anyway, I think the bug report was detailed enough.
code is always better ;) I have written some stuff by myself now.
> After around 500 iterations, it will succeed. I guess it
> depend on your CPU speed.
It seems that we signal the socket readable after the L2CAP connect
req/resp is handled. But the socket is first usable after we had a
two-way L2CAP config req/resp for MTU negotiation. And this takes some
time depending on if we have to do a role change, authenticate etc.
> Yes, listen() will not block. However I also want the accept()
> to be non-blocking, because I don't want it to prevent it servincing
> my other socekts. What's the point of writting all the rest of my code
> non-blocking if accept() take 100ms to complete ? The only way to get
> a non-blocking accept() is to have the listen socket in non-blocking
> mode.
Actually I don't know how to change this and I even don't know if this
is a good idea, because the return code of accept() seems right.
Comments?
> The sendmsg() problem is on the other side, the client, so a
> simply connected socket. But I've got a much harder time to reproduce
> it.
Haven't looked at it. We need a reliable way do reproduce it.
Regards
Marcel
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2004-02-04 19:58 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-04 1:58 L2CAP non-blocking socket nasty race conditions Jean Tourrilhes
2004-02-04 7:17 ` [Bluez-devel] " Marcel Holtmann
2004-02-04 17:58 ` Jean Tourrilhes
2004-02-04 19:58 ` Marcel Holtmann [this message]
2004-02-04 21:45 ` Jean Tourrilhes
2004-02-05 1:00 ` [Bluez-devel] " Marcel Holtmann
2004-02-05 1:11 ` Jean Tourrilhes
2004-02-05 1:30 ` [Bluez-devel] " Marcel Holtmann
2004-02-05 1:40 ` Jean Tourrilhes
2004-02-05 2:21 ` [Bluez-devel] " Marcel Holtmann
2004-02-05 2:26 ` Jean Tourrilhes
2004-02-05 2:36 ` [Bluez-devel] " Marcel Holtmann
2004-02-05 2:42 ` Jean Tourrilhes
2004-02-05 3:30 ` Jean Tourrilhes
2004-02-05 13:49 ` [Bluez-devel] " Marcel Holtmann
2004-02-05 17:19 ` Jean Tourrilhes
2004-02-05 18:17 ` [Bluez-devel] " Marcel Holtmann
2004-02-05 23:13 ` Jean Tourrilhes
2004-02-05 23:37 ` [Bluez-devel] " Marcel Holtmann
2004-02-05 23:43 ` Jean Tourrilhes
2004-02-04 11:23 ` [Bluez-devel] bluez & qos Mauro Tortonesi
2004-02-04 11:36 ` Marcel Holtmann
2004-02-04 17:46 ` [Bluez-devel] " Jean Tourrilhes
2004-02-05 10:46 ` Mauro Tortonesi
2004-02-05 17:22 ` Jean Tourrilhes
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=1075924727.2783.47.camel@pegasus \
--to=marcel@holtmann.org \
--cc=bluez-devel@lists.sourceforge.net \
--cc=jt@hpl.hp.com \
--cc=maxk@qualcomm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox