io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Josef <josef.grieb@gmail.com>,
	io-uring@vger.kernel.org, Pavel Begunkov <asml.silence@gmail.com>
Cc: norman@apache.org
Subject: Re: io_uring process termination/killing is not working
Date: Sat, 15 Aug 2020 20:20:14 -0700	[thread overview]
Message-ID: <689aa6e9-bfff-3353-fc09-d8dec49485bd@kernel.dk> (raw)
In-Reply-To: <CAAss7+o+py+ui=nbW03V_RADxnTE6Dz9q229rnpn+YeWu5GP=w@mail.gmail.com>

On 8/15/20 8:14 PM, Josef wrote:
>>> Hence it'd be helpful if you explain what your expectations are of
>>> the program, and how that differs from how it behaves
> 
> yeah that's true, I'm sorry about that.
> 
>>> Are you sure your code is correct? I haven't looked too closely, but it
>>> doesn't look very solid. There's no error checking, and you seem to be
>>> setting up two rings (one overwriting the other). FWIW, I get the same
>>> behavior on 5.7-stable and the above branch, except that the 5.7 hangs
>>> on exit due to the other bug you found and that is fixed in the 5.9
>>> branch.
>>>
>>
>> Took a closer look, and made a few tweaks. Got rid of the extra links
>> and the nop, and I added a poll+read resubmit when a read completes.
>> Not sure how your program could work without that, if you expect it
>> to continue to echo out what is written on the connection? Also killed
>> that extra ring init.
>>
> 
> sorry my bad.. I will ensure that the code is more self-explanatory
> and better error checking next time. It was supposed to reproduce the
> read event problem in C since I had the same issue in netty, basically
> the idea was just to read the event once to keep it more simple

No worries, it's still better to get something than nothing! And I don't
care about the error handling, but I think providing an explanation of
expectations and reality from the point of view of the reporter is a key
element in a bug report. It just makes sure that the problem description
is as clear as it can be.

>> After that, I made the following tweak to return short reads when
>> the the file is non-blocking. Then it seems to work as expected
>> for me
> 
> yeah I tested and it works in netty & my bad C example, thank you for
> the super fast fix :)

Great, thanks!

-- 
Jens Axboe


  reply	other threads:[~2020-08-16  3:20 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-12 17:58 io_uring process termination/killing is not working Josef
2020-08-12 18:05 ` Jens Axboe
2020-08-12 18:20   ` Pavel Begunkov
2020-08-12 18:22     ` Pavel Begunkov
2020-08-12 18:28       ` Pavel Begunkov
2020-08-12 23:32         ` Jens Axboe
2020-08-13 16:07           ` Josef
2020-08-13 16:09             ` Jens Axboe
2020-08-15  7:45           ` Pavel Begunkov
2020-08-15 15:12             ` Jens Axboe
2020-08-15 16:48               ` Pavel Begunkov
2020-08-15 21:43                 ` Josef
2020-08-15 22:35                   ` Jens Axboe
2020-08-15 23:21                     ` Josef
2020-08-15 23:31                     ` Jens Axboe
2020-08-16  0:36                       ` Josef
2020-08-16  0:41                         ` Jens Axboe
2020-08-16  1:21                           ` Jens Axboe
2020-08-16  3:14                             ` Josef
2020-08-16  3:20                               ` Jens Axboe [this message]
2020-08-16 17:30                                 ` Jens Axboe
2020-08-16 21:09                                   ` Josef
2020-08-16 22:17                                     ` Jens Axboe
2020-08-17  8:58                                       ` Josef
2020-08-17 10:08                                         ` Pavel Begunkov
2020-08-16 13:45                 ` Jens Axboe
2020-08-16 14:53                   ` Jens Axboe
2020-08-16 15:22                     ` Jens Axboe
2020-08-17 10:16                       ` Pavel Begunkov

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=689aa6e9-bfff-3353-fc09-d8dec49485bd@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=asml.silence@gmail.com \
    --cc=io-uring@vger.kernel.org \
    --cc=josef.grieb@gmail.com \
    --cc=norman@apache.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;
as well as URLs for NNTP newsgroup(s).