public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: Victor Stewart <[email protected]>, io-uring <[email protected]>
Subject: Re: bug with fastpoll accept and sqpoll + IOSQE_FIXED_FILE
Date: Tue, 2 Feb 2021 11:23:32 +0000	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 02/02/2021 11:05, Pavel Begunkov wrote:
> On 02/02/2021 05:36, Victor Stewart wrote:
>> started experimenting with sqpoll and my fastpoll accepts started
>> failing. was banging my head against the wall for a few hours... wrote
>> this test case below....
>>
>> basically fastpoll accept only works without sqpoll, and without
>> adding IOSQE_FIXED_FILE to the sqe. fails with both, fails with
>> either. these must be bugs?
>>
>> I'm running Clear Linux 5.10.10-1017.native.
>>
>> i hope no one here is allergic to C++, haha. compilation command
>> commented in the gist, just replace the two paths. and I can fold
>> these checks if needed into a liburing PR later.
>>
>> https://gist.github.com/victorstewart/98814b65ed702c33480487c05b40eb56
> 
> Please don't forget about checking error codes. At least fixed
> files don't work for you because of
> 
> int fds[10];
> memset(fds, -1, 10); // 10 bytes, not 10 ints
> 
> So io_uring_register_files() silently fails.
> 
> 
> For me, all two "with SQPOLL" tests spit SUCCESS, then it hangs.
> But need to test it with upstream to be sure.

Also you forget to submit, all works with these 2 changes.

When you don't do io_uring_submit(), apparently it gets live-locked
in liburing's _io_uring_get_cqe(), that's a bug.

-- 
Pavel Begunkov

  reply	other threads:[~2021-02-02 11:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02  5:36 bug with fastpoll accept and sqpoll + IOSQE_FIXED_FILE Victor Stewart
2021-02-02 11:05 ` Pavel Begunkov
2021-02-02 11:23   ` Pavel Begunkov [this message]
2021-02-02 16:18     ` Victor Stewart
2021-02-02 16:30       ` Victor Stewart
2021-02-02 16:44         ` Jens Axboe
2021-02-02 17:10           ` Victor Stewart
2021-02-02 17:24             ` Jens Axboe
2021-02-02 17:41               ` Pavel Begunkov
2021-02-02 20:34                 ` Pavel Begunkov
2021-02-02 20:48                   ` Jens Axboe
2021-02-02 20:56                     ` Pavel Begunkov
2021-02-03 11:49                       ` Pavel Begunkov
2021-02-04 16:50                         ` Jens Axboe
2021-02-05 12:46                           ` Pavel Begunkov
2021-02-05 14:42                             ` Jens Axboe
2021-02-05 14:49                               ` Pavel Begunkov
2021-02-02 17:46               ` Jens Axboe
2021-02-02 17:50                 ` Victor Stewart
2021-02-02 17:57                   ` Jens Axboe
2021-02-02 17:46               ` Victor Stewart
2021-02-02 17:21       ` Pavel Begunkov
2021-02-02 17:30         ` Victor Stewart
2021-02-02 17:45           ` Victor Stewart

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 \
    [email protected] \
    [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