[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210325164343.807498-1-axboe@kernel.dk>
Date: Thu, 25 Mar 2021 10:43:41 -0600
From: Jens Axboe <axboe@...nel.dk>
To: io-uring@...r.kernel.org
Cc: torvalds@...ux-foundation.org, ebiederm@...ssion.com,
linux-kernel@...r.kernel.org, oleg@...hat.com, metze@...ba.org
Subject: [PATCH 0/2] Don't show PF_IO_WORKER in /proc/<pid>/task/
Hi,
Stefan reports that attaching to a task with io_uring will leave gdb
very confused and just repeatedly attempting to attach to the IO threads,
even though it receives an -EPERM every time. This patchset proposes to
skip PF_IO_WORKER threads as same_thread_group(), except for accounting
purposes which we still desire.
We also skip listing the IO threads in /proc/<pid>/task/ so that gdb
doesn't think it should stop and attach to them. This makes us consistent
with earlier kernels, where these async threads were not related to the
ring owning task, and hence gdb (and others) ignored them anyway.
Seems to me that this is the right approach, but open to comments on if
others agree with this. Oleg, I did see your messages as well on SIGSTOP,
and as was discussed with Eric as well, this is something we most
certainly can revisit. I do think that the visibility of these threads
is a separate issue. Even with SIGSTOP implemented (which I did try as
well), we're never going to allow ptrace attach and hence gdb would still
be broken. Hence I'd rather treat them as separate issues to attack.
--
Jens Axboe
Powered by blists - more mailing lists