public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Uday Shankar <ushankar@purestorage.com>
Cc: Shuah Khan <shuah@kernel.org>, Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] selftests: ublk: kublk: ignore SIGCHLD
Date: Wed, 26 Mar 2025 11:23:25 +0800	[thread overview]
Message-ID: <Z-NzLbW0nAIAUdIN@fedora> (raw)
In-Reply-To: <20250325-ublk_timeout-v1-3-262f0121a7bd@purestorage.com>

On Tue, Mar 25, 2025 at 04:19:33PM -0600, Uday Shankar wrote:
> SIGCHLD from exiting children can arrive during io_uring_wait_cqe and
> cause it to return early with -EINTR. Since we don't have a handler for

Probably -EINTR needs to be handled, and libublksrv retry in case of -EINTR.

> SIGCHLD, avoid this issue by ignoring SIGCHLD.
> 
> Signed-off-by: Uday Shankar <ushankar@purestorage.com>
> ---
>  tools/testing/selftests/ublk/kublk.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/ublk/kublk.c b/tools/testing/selftests/ublk/kublk.c
> index ded1b93e7913011499ae5dae7b40f0e425982ee4..064a5bb6f12f35892065b8dfacb6f57f6fc16aee 100644
> --- a/tools/testing/selftests/ublk/kublk.c
> +++ b/tools/testing/selftests/ublk/kublk.c
> @@ -890,6 +890,7 @@ static int cmd_dev_add(struct dev_ctx *ctx)
>  		exit(-1);
>  	}
>  
> +	signal(SIGCHLD, SIG_IGN);

Reviewed-by: Ming Lei <ming.lei@redhat.com>

BTW, the SIGCHLD signal is ignored by default, looks it is good
to do it explicitly, if the -EINTR from io_uring_enter() can be avoided
in this way.


Thanks,
Ming


  reply	other threads:[~2025-03-26  3:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-25 22:19 [PATCH 0/4] ublk: improve handling of saturated queues when ublk server exits Uday Shankar
2025-03-25 22:19 ` [PATCH 1/4] selftests: ublk: kublk: use ioctl-encoded opcodes Uday Shankar
2025-03-25 22:26   ` Uday Shankar
2025-03-26  3:07   ` Ming Lei
2025-03-25 22:19 ` [PATCH 2/4] selftests: ublk: kublk: fix an error log line Uday Shankar
2025-03-26  3:08   ` Ming Lei
2025-03-25 22:19 ` [PATCH 3/4] selftests: ublk: kublk: ignore SIGCHLD Uday Shankar
2025-03-26  3:23   ` Ming Lei [this message]
2025-03-26 17:17     ` Uday Shankar
2025-03-25 22:19 ` [PATCH 4/4] ublk: improve handling of saturated queues when ublk server exits Uday Shankar
2025-03-26  5:38   ` Ming Lei
2025-03-26 17:54     ` Uday Shankar
2025-03-26 18:56       ` Uday Shankar
2025-03-26 23:08         ` Uday Shankar
2025-03-27  1:38           ` Ming Lei
2025-03-27  1:23       ` Ming Lei
2025-03-31 23:17         ` Uday Shankar
2025-04-02  3:59           ` Ming Lei
2025-04-02 19:41             ` Uday Shankar
2025-03-27  2:06   ` Ming Lei

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=Z-NzLbW0nAIAUdIN@fedora \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=ushankar@purestorage.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