From: jrun <[email protected]>
To: io-uring <[email protected]>
Cc: Pavel Begunkov <[email protected]>
Subject: happy io_uring_prep_accept_direct() submissions go hiding!
Date: Wed, 8 Dec 2021 14:07:33 -0500 [thread overview]
Message-ID: <20211208190733.xazgugkuprosux6k@p51> (raw)
hello,
- this may very well be something simple i'm missing so apologies in advance. -
_some_ calls to io_uring_prep_accept_direct() never make it back from
kernel! or they seems so... since io_uring_prep_accept_direct() is a new
introduction to io_uring i thought i check with you first and get some help if
possible.
---------
TEST_PROG:
---------
this msg has a git repo bundled which has the crap i've put together where i
encounter this. to compile/run it do this, save the bundle somewhere, say under
`/tmp/` and then do:
```
cd /tmp/
git clone wsub.git wsub
cd wsub
# maybe have a look at build.sh before running the following
# it will install a single binary under ~/.local/bin
# also it will fire up the binary, the server part, wsub, right away
sh build.sh
# then from a different terminal
cd /tmp/wsub/client
# in zsh, use seq for bash
MAX_CONNECTIONS=4; for i in {0..$MAX_CONNECTIONS}; do ./client foo; done
```
srv starts listening on a *abstract* unix socket, names after the binary which
should turn up in the output of this, if you have ss(8) installed:
`ss -l -x --socket=unix_seqpacket`
it will be called `@wsub` if you don't change anything.
client bit just sends it's first arg, "foo" in this case, to the server, and
srv prints it out into it's stderr.
--------
PROBLEM:
--------
every calls to io_uring_prep_accept_direct() via q_accept(), before entering
event_loop(), main.c:587, get properly completed, but subsequent calls to
io_uring_prep_accept_direct() after entering event_loop(),
main.c:487 `case ACCEPT:`,
never turn up on ring's cq! you will notice that all other submissions inside
event_loop(), to the same ring, get completed fine.
note also that io_uring_prep_accept_direct() completions make it once there is a
new connection!
running the client bit one-by-one might illustrate the point better.
i also experimented with using IORING_SETUP_SQPOLL, different articles but same
result for io_uring_prep_accept_direct() submissions.
thoughts?
- jrun
next reply other threads:[~2021-12-08 19:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-08 19:07 jrun [this message]
2021-12-08 19:16 ` [oops!] happy io_uring_prep_accept_direct() submissions go hiding! jrun
2021-12-09 15:02 ` Pavel Begunkov
2021-12-09 17:56 ` jrun
2021-12-09 19:34 ` possible bug with unix sockets jrun
2021-12-09 20:34 ` jrun
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=20211208190733.xazgugkuprosux6k@p51 \
[email protected] \
[email protected] \
[email protected] \
/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