io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Drew DeVault <sir@cmpwn.com>, io-uring@vger.kernel.org
Subject: Re: Consistently reproducible deadlock with simple io_uring program
Date: Sat, 15 Aug 2020 19:37:29 -0700	[thread overview]
Message-ID: <839f2d17-0486-b12d-3540-4a8408902492@kernel.dk> (raw)
In-Reply-To: <C4Y22EC7RW97.3K03685KXYM5S@homura>

On 8/15/20 7:12 PM, Drew DeVault wrote:
> Kernel 5.7.12-arch1-1 x86_64, Arch Linux.
> 
> I'm working on a new implementation of the userspace end of io_uring for
> a new programming language under design. The program is pretty simple:
> it sets up an io_uring with flags set to zero, obtains an SQE, prepares
> it to read 1024 bytes from stdin, and then calls io_uring_enter with
> submit and min_complete both set to 1.
> 
> The code is set up to grab the CQE and interpret the data in the buffer
> after this, but I'm not sure if this side ever gets run in userspace,
> because my kernel immediately locks up after I press enter on the
> controlling terminal to submit some data to stdin.
> 
> I have uploaded a binary which reproduces the problem here:
> 
> https://yukari.sr.ht/io_uring-crashme
> 
> If you want to reproduce it from source, reach out to me out of band; it
> will be a challenge. This new programming langauge is technically GPL'd,
> but it hasn't been released to the public, YMMV getting it set up on
> localhost, and it doesn't generate DWARF symbols so you're going to be
> debugging assembly no matter what.

This should be fixed by this one:

https://git.kernel.dk/cgit/linux-block/commit/?h=io_uring-5.9&id=d4e7cd36a90e38e0276d6ce0c20f5ccef17ec38c

which will go into 5.7/5.8 stable shortly. Affected files are the ones
that use double waitqueues at the same time for polling, which are
mostly just tty...

-- 
Jens Axboe


  reply	other threads:[~2020-08-16  2:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-16  2:12 Consistently reproducible deadlock with simple io_uring program Drew DeVault
2020-08-16  2:37 ` Jens Axboe [this message]
2020-08-16  2:38   ` Drew DeVault
2020-08-16  2:40     ` Jens Axboe
2020-08-16  2:41       ` Drew DeVault
2020-08-16 15:17   ` Drew DeVault

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=839f2d17-0486-b12d-3540-4a8408902492@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=sir@cmpwn.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;
as well as URLs for NNTP newsgroup(s).