public inbox for [email protected]
 help / color / mirror / Atom feed
* happy io_uring_prep_accept_direct() submissions go hiding!
@ 2021-12-08 19:07 jrun
  2021-12-08 19:16 ` [oops!] " jrun
  2021-12-09 15:02 ` Pavel Begunkov
  0 siblings, 2 replies; 6+ messages in thread
From: jrun @ 2021-12-08 19:07 UTC (permalink / raw)
  To: io-uring; +Cc: Pavel Begunkov

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-09 20:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-08 19:07 happy io_uring_prep_accept_direct() submissions go hiding! jrun
2021-12-08 19:16 ` [oops!] " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox