From: Sven Schnelle <svens@linux.ibm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
linux-kernel@vger.kernel.org, rjw@rjwysocki.net,
Oleg Nesterov <oleg@redhat.com>,
mingo@kernel.org, vincent.guittot@linaro.org,
dietmar.eggemann@arm.com, mgorman@suse.de, bigeasy@linutronix.de,
Will Deacon <will@kernel.org>,
tj@kernel.org, linux-pm@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Richard Weinberger <richard@nod.at>,
Anton Ivanov <anton.ivanov@cambridgegreys.com>,
Johannes Berg <johannes@sipsolutions.net>,
linux-um@lists.infradead.org, Chris Zankel <chris@zankel.net>,
Max Filippov <jcmvbkbc@gmail.com>,
linux-xtensa@linux-xtensa.org, Kees Cook <keescook@chromium.org>,
Jann Horn <jannh@google.com>,
linux-ia64@vger.kernel.org
Subject: Re: [PATCH v4 12/12] sched,signal,ptrace: Rework TASK_TRACED, TASK_STOPPED state
Date: Tue, 05 Jul 2022 13:47:44 +0000 [thread overview]
Message-ID: <yt9d5ykbekn3.fsf@linux.ibm.com> (raw)
In-Reply-To: <20220628191541.34a073fc@gandalf.local.home> (Steven Rostedt's message of "Tue, 28 Jun 2022 19:15:41 -0400")
[-- Attachment #1: Type: text/plain, Size: 3889 bytes --]
Hi,
Steven Rostedt <rostedt@goodmis.org> writes:
> On Tue, 21 Jun 2022 17:15:47 +0200
> Alexander Gordeev <agordeev@linux.ibm.com> wrote:
>
>> So I assume (checked actually) the return 0 below from kernel/sched/core.c:
>> wait_task_inactive() is where it bails out:
>>
>> 3303 while (task_running(rq, p)) {
>> 3304 if (match_state && unlikely(READ_ONCE(p->__state) != match_state))
>> 3305 return 0;
>> 3306 cpu_relax();
>> 3307 }
>>
>> Yet, the child task is always found in __TASK_TRACED state (as seen
>> in crash dumps):
>>
>> > 101447 11342 13 ce3a8100 RU 0.0 10040 4412 strace
>> 101450 101447 0 bb04b200 TR 0.0 2272 1136 kill_child
>> 108261 101447 2 d0b10100 TR 0.0 2272 532 kill_child
>> crash> task bb04b200 __state
>> PID: 101450 TASK: bb04b200 CPU: 0 COMMAND: "kill_child"
>> __state = 8,
>>
>> crash> task d0b10100 __state
>> PID: 108261 TASK: d0b10100 CPU: 2 COMMAND: "kill_child"
>> __state = 8,
>
> If you are using crash, can you enable all trace events?
>
> Then you should be able to extract the ftrace ring buffer from crash using
> the trace.so extend (https://github.com/fujitsu/crash-trace)
>
> I guess it should still work with s390.
>
> Then you can see the events that lead up to the crash.
Alexander is busy with other stuff, so I took over. I enabled the
sys,signal,sched and task tracepoints and ftrace_dump_on_oops. The last
lines from the trace buffer are:
[ 281.043459] strace-1177215 0d.... 269457070us : sched_waking: comm=kill_child pid=1178157 prio=120 target_cpu=003
[ 281.043463] kill_chi-1177218 1d.... 269457070us : signal_generate: sig=17 errno=0 code=4 comm=strace pid=1177215 grp=1 res=1
[ 281.043467] kill_chi-1177218 1d.... 269457070us : sched_stat_runtime: comm=kill_child pid=1177218 runtime=5299 [ns] vruntime=1830714210855 [ns]
[ 281.043471] kill_chi-1177218 1d.... 269457071us : sched_switch: prev_comm=kill_child prev_pid=1177218 prev_prio=120 prev_state=t ==> next_comm=swapper/1 next_pid=0 next_prio=120
[ 281.043475] strace-1177215 0..... 269457071us : sys_ptrace -> 0x50
[ 281.043478] strace-1177215 0..... 269457071us : sys_write(fd: 2, buf: 2aa15db3ad0, count: 12)
[ 281.043482] strace-1177215 0..... 269457072us : sys_write -> 0x12
[ 281.043485] <idle>-0 3dNh.. 269457072us : sched_wakeup: comm=kill_child pid=1178157 prio=120 target_cpu=003
[ 281.043489] <idle>-0 3d.... 269457073us : sched_switch: prev_comm=swapper/3 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=kill_child next_pid=1178157 next_prio=120
[ 281.043493] strace-1177215 0..... 269457073us : sys_write(fd: 2, buf: 2aa15db3ad0, count: 1a)
[ 281.043496] strace-1177215 0..... 269457073us : sys_write -> 0x1a
[ 281.043500] kill_chi-1178157 3..... 269457073us : sys_sched_yield -> 0xffffffffffffffda
[ 281.043504] strace-1177215 0..... 269457073us : sys_ptrace(request: 18, pid: 11fa2d, addr: 0, data: 0)
[ 281.043508] kill_chi-1178157 3d.... 269457073us : signal_deliver: sig=9 errno=0 code=0 sa_handler=0 sa_flags=0
[ 281.043511] kill_chi-1178157 3d.... 269457074us : signal_generate: sig=17 errno=0 code=4 comm=strace pid=1177215 grp=1 res=1
[ 281.043515] kill_chi-1178157 3d.... 269457074us : sched_stat_runtime: comm=kill_child pid=1178157 runtime=2408 [ns] vruntime=1983050055579 [ns]
[ 281.043519] kill_chi-1178157 3d.... 269457075us : sched_switch: prev_comm=kill_child prev_pid=1178157 prev_prio=120 prev_state=t ==> next_comm=swapper/3 next_pid=0 next_prio=120
I attached the full output to this mail. I haven't yet tried to
understand the problem, i just wanted to send you the requested
information in the hope that it will help you.
Regards
Sven
[-- Attachment #2: dmesg.xz --]
[-- Type: application/x-xz, Size: 29004 bytes --]
next prev parent reply other threads:[~2022-07-05 13:47 UTC|newest]
Thread overview: 144+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220421150248.667412396@infradead.org>
[not found] ` <20220421150654.817117821@infradead.org>
[not found] ` <87czhap9dy.fsf@email.froward.int.ebiederm.org>
[not found] ` <878rrrh32q.fsf_-_@email.froward.int.ebiederm.org>
2022-04-29 21:46 ` [PATCH 0/12] ptrace: cleaning up ptrace_stop Eric W. Biederman
2022-04-29 21:48 ` [PATCH v2 01/12] signal: Rename send_signal send_signal_locked Eric W. Biederman
2022-05-02 7:50 ` Sebastian Andrzej Siewior
2022-04-29 21:48 ` [PATCH v2 02/12] signal: Replace __group_send_sig_info with send_signal_locked Eric W. Biederman
2022-05-02 7:58 ` Sebastian Andrzej Siewior
2022-04-29 21:48 ` [PATCH v2 03/12] ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP Eric W. Biederman
2022-04-29 21:48 ` [PATCH v2 04/12] ptrace/xtensa: Replace PT_SINGLESTEP " Eric W. Biederman
2022-04-29 21:48 ` [PATCH v2 05/12] signal: Use lockdep_assert_held instead of assert_spin_locked Eric W. Biederman
2022-04-29 21:48 ` [PATCH v2 06/12] ptrace: Reimplement PTRACE_KILL by always sending SIGKILL Eric W. Biederman
2022-05-02 14:37 ` Oleg Nesterov
2022-05-03 19:36 ` Eric W. Biederman
2022-04-29 21:48 ` [PATCH v2 07/12] ptrace: Don't change __state Eric W. Biederman
2022-04-29 22:27 ` Peter Zijlstra
2022-05-02 8:59 ` Sebastian Andrzej Siewior
2022-05-02 15:39 ` Oleg Nesterov
2022-05-02 16:35 ` Eric W. Biederman
2022-05-03 13:41 ` Oleg Nesterov
2022-05-03 20:45 ` Eric W. Biederman
2022-05-04 14:02 ` Oleg Nesterov
2022-05-04 17:37 ` Eric W. Biederman
2022-05-04 18:28 ` Eric W. Biederman
2022-05-02 15:47 ` Oleg Nesterov
2022-04-29 21:48 ` [PATCH v2 08/12] ptrace: Remove arch_ptrace_attach Eric W. Biederman
2022-04-29 21:48 ` [PATCH v2 09/12] ptrace: Always take siglock in ptrace_resume Eric W. Biederman
2022-04-29 21:48 ` [PATCH v2 10/12] ptrace: Only return signr from ptrace_stop if it was provided Eric W. Biederman
2022-05-02 10:08 ` Sebastian Andrzej Siewior
2022-04-29 21:48 ` [PATCH v2 11/12] ptrace: Always call schedule in ptrace_stop Eric W. Biederman
2022-04-29 21:48 ` [PATCH v2 12/12] sched,signal,ptrace: Rework TASK_TRACED, TASK_STOPPED state Eric W. Biederman
2022-05-02 10:18 ` Sebastian Andrzej Siewior
2022-05-02 13:38 ` [PATCH 0/12] ptrace: cleaning up ptrace_stop Sebastian Andrzej Siewior
2022-05-04 22:39 ` [PATCH v3 0/11] " Eric W. Biederman
2022-05-04 22:40 ` [PATCH v3 01/11] signal: Rename send_signal send_signal_locked Eric W. Biederman
2022-05-04 22:40 ` [PATCH v3 02/11] signal: Replace __group_send_sig_info with send_signal_locked Eric W. Biederman
2022-05-04 22:40 ` [PATCH v3 03/11] ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP Eric W. Biederman
2022-05-04 22:40 ` [PATCH v3 04/11] ptrace/xtensa: Replace PT_SINGLESTEP " Eric W. Biederman
2022-05-04 22:40 ` [PATCH v3 05/11] ptrace: Remove arch_ptrace_attach Eric W. Biederman
2022-05-04 22:40 ` [PATCH v3 06/11] signal: Use lockdep_assert_held instead of assert_spin_locked Eric W. Biederman
2022-05-04 22:40 ` [PATCH v3 07/11] ptrace: Reimplement PTRACE_KILL by always sending SIGKILL Eric W. Biederman
2022-05-04 22:40 ` [PATCH v3 08/11] ptrace: Admit ptrace_stop can generate spuriuos SIGTRAPs Eric W. Biederman
2022-05-05 14:57 ` Oleg Nesterov
2022-05-05 16:59 ` Eric W. Biederman
2022-05-05 15:01 ` Oleg Nesterov
2022-05-05 17:21 ` Eric W. Biederman
2022-05-05 17:27 ` Oleg Nesterov
2022-05-05 15:28 ` Oleg Nesterov
2022-05-05 17:53 ` Eric W. Biederman
2022-05-05 18:10 ` Oleg Nesterov
2022-05-04 22:40 ` [PATCH v3 09/11] ptrace: Don't change __state Eric W. Biederman
2022-05-05 12:50 ` Sebastian Andrzej Siewior
2022-05-05 16:48 ` Eric W. Biederman
2022-05-04 22:40 ` [PATCH v3 10/11] ptrace: Always take siglock in ptrace_resume Eric W. Biederman
2022-05-04 22:40 ` [PATCH v3 11/11] sched,signal,ptrace: Rework TASK_TRACED, TASK_STOPPED state Eric W. Biederman
2022-05-05 18:25 ` [PATCH v4 0/12] ptrace: cleaning up ptrace_stop Eric W. Biederman
2022-05-05 18:26 ` [PATCH v4 01/12] signal: Rename send_signal send_signal_locked Eric W. Biederman
2022-05-05 18:26 ` [PATCH v4 02/12] signal: Replace __group_send_sig_info with send_signal_locked Eric W. Biederman
2022-05-05 18:26 ` [PATCH v4 03/12] ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP Eric W. Biederman
2022-05-05 18:26 ` [PATCH v4 04/12] ptrace/xtensa: Replace PT_SINGLESTEP " Eric W. Biederman
2022-05-05 18:26 ` [PATCH v4 05/12] ptrace: Remove arch_ptrace_attach Eric W. Biederman
2022-05-05 18:26 ` [PATCH v4 06/12] signal: Use lockdep_assert_held instead of assert_spin_locked Eric W. Biederman
2022-05-05 18:26 ` [PATCH v4 07/12] ptrace: Reimplement PTRACE_KILL by always sending SIGKILL Eric W. Biederman
2022-05-05 18:26 ` [PATCH v4 08/12] ptrace: Document that wait_task_inactive can't fail Eric W. Biederman
2022-05-06 6:55 ` Sebastian Andrzej Siewior
2022-05-05 18:26 ` [PATCH v4 09/12] ptrace: Admit ptrace_stop can generate spuriuos SIGTRAPs Eric W. Biederman
2022-05-05 18:26 ` [PATCH v4 10/12] ptrace: Don't change __state Eric W. Biederman
2022-05-06 15:09 ` Oleg Nesterov
2022-05-06 19:42 ` Eric W. Biederman
2022-05-10 14:23 ` Oleg Nesterov
2022-05-10 15:17 ` Eric W. Biederman
2022-05-10 15:34 ` Oleg Nesterov
2022-05-05 18:26 ` [PATCH v4 11/12] ptrace: Always take siglock in ptrace_resume Eric W. Biederman
2022-05-05 18:26 ` [PATCH v4 12/12] sched,signal,ptrace: Rework TASK_TRACED, TASK_STOPPED state Eric W. Biederman
2022-06-21 13:00 ` Alexander Gordeev
2022-06-21 14:02 ` Eric W. Biederman
2022-06-21 15:15 ` Alexander Gordeev
2022-06-21 17:47 ` Eric W. Biederman
2022-06-25 16:34 ` Eric W. Biederman
2022-06-28 18:36 ` Alexander Gordeev
2022-06-28 22:42 ` Eric W. Biederman
2022-06-28 22:48 ` Steven Rostedt
2022-06-29 3:39 ` Eric W. Biederman
2022-06-29 20:25 ` Alexander Gordeev
2022-07-05 15:44 ` Peter Zijlstra
2022-07-06 6:56 ` Alexander Gordeev
2022-06-28 23:15 ` Steven Rostedt
2022-07-05 13:47 ` Sven Schnelle [this message]
2022-07-05 17:28 ` Sven Schnelle
2022-07-05 19:25 ` Peter Zijlstra
2022-07-06 7:58 ` Sven Schnelle
2022-07-06 8:59 ` Peter Zijlstra
2022-07-06 9:27 ` Sven Schnelle
2022-07-06 10:11 ` Peter Zijlstra
2022-05-06 14:14 ` [PATCH v4 0/12] ptrace: cleaning up ptrace_stop Oleg Nesterov
2022-05-06 14:38 ` Eric W. Biederman
2022-05-06 21:26 ` Kees Cook
2022-05-06 21:59 ` Eric W. Biederman
2022-05-10 14:11 ` Oleg Nesterov
2022-05-10 14:26 ` Eric W. Biederman
2022-05-10 14:45 ` Sebastian Andrzej Siewior
2022-05-10 15:18 ` Eric W. Biederman
2022-05-11 20:00 ` Eric W. Biederman
2022-05-18 22:49 ` [PATCH 00/16] ptrace: cleanups and calling do_cldstop with only siglock Eric W. Biederman
2022-05-18 22:53 ` [PATCH 01/16] signal/alpha: Remove unused definition of TASK_REAL_PARENT Eric W. Biederman
2022-05-18 22:53 ` [PATCH 02/16] signal/ia64: Remove unused definition of IA64_TASK_REAL_PARENT_OFFSET Eric W. Biederman
2022-05-18 22:53 ` [PATCH 03/16] kdb: Use real_parent when displaying a list of processes Eric W. Biederman
2022-05-19 7:56 ` Peter Zijlstra
2022-05-19 18:06 ` Eric W. Biederman
2022-05-19 20:52 ` Doug Anderson
2022-05-19 23:48 ` Eric W. Biederman
2022-05-20 23:01 ` Doug Anderson
2022-05-18 22:53 ` [PATCH 04/16] powerpc/xmon: " Eric W. Biederman
2022-05-18 22:53 ` [PATCH 05/16] ptrace: Remove dead code from __ptrace_detach Eric W. Biederman
2022-05-24 11:42 ` Oleg Nesterov
2022-05-25 14:33 ` Oleg Nesterov
2022-06-06 16:06 ` Eric W. Biederman
2022-05-18 22:53 ` [PATCH 06/16] ptrace: Remove unnecessary locking in ptrace_(get|set)siginfo Eric W. Biederman
2022-05-24 13:25 ` Oleg Nesterov
2022-05-18 22:53 ` [PATCH 07/16] signal: Wake up the designated parent Eric W. Biederman
2022-05-24 13:25 ` Oleg Nesterov
2022-05-24 16:28 ` Oleg Nesterov
2022-05-25 14:28 ` Oleg Nesterov
2022-06-06 22:10 ` Eric W. Biederman
2022-06-07 15:26 ` Oleg Nesterov
2022-05-18 22:53 ` [PATCH 08/16] ptrace: Only populate last_siginfo from ptrace Eric W. Biederman
2022-05-24 15:27 ` Oleg Nesterov
2022-06-06 22:16 ` Eric W. Biederman
2022-06-07 15:29 ` Oleg Nesterov
2022-05-18 22:53 ` [PATCH 09/16] ptrace: In ptrace_setsiginfo deal with invalid si_signo Eric W. Biederman
2022-05-18 22:53 ` [PATCH 10/16] ptrace: In ptrace_signal look at what the debugger did with siginfo Eric W. Biederman
2022-05-18 22:53 ` [PATCH 11/16] ptrace: Use si_sino as the signal number to resume with Eric W. Biederman
2022-05-18 22:53 ` [PATCH 12/16] ptrace: Stop protecting ptrace_set_signr with tasklist_lock Eric W. Biederman
2022-05-18 22:53 ` [PATCH 13/16] ptrace: Document why ptrace_setoptions does not need a lock Eric W. Biederman
2022-05-18 22:53 ` [PATCH 14/16] signal: Protect parent child relationships by childs siglock Eric W. Biederman
2022-05-18 22:53 ` [PATCH 15/16] ptrace: Use siglock instead of tasklist_lock in ptrace_check_attach Eric W. Biederman
2022-05-18 22:53 ` [PATCH 16/16] signal: Always call do_notify_parent_cldstop with siglock held Eric W. Biederman
2022-05-20 16:19 ` kernel test robot
[not found] ` <CALWUPBdFDLuT7JaNGSJ_UXbHf8y9uKdC-SkAqzd=FQC0MX4nNQ@mail.gmail.com>
2022-05-19 6:19 ` [PATCH 00/16] ptrace: cleanups and calling do_cldstop with only siglock Sebastian Andrzej Siewior
2022-05-19 18:05 ` Eric W. Biederman
2022-05-20 5:24 ` Kyle Huey
2022-06-06 16:12 ` Eric W. Biederman
2022-06-09 19:59 ` Kyle Huey
2022-05-20 7:33 ` Sebastian Andrzej Siewior
2022-05-20 19:32 ` Eric W. Biederman
2022-05-20 19:58 ` Peter Zijlstra
2022-05-20 9:19 ` Sebastian Andrzej Siewior
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=yt9d5ykbekn3.fsf@linux.ibm.com \
--to=svens@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=anton.ivanov@cambridgegreys.com \
--cc=bigeasy@linutronix.de \
--cc=chris@zankel.net \
--cc=dietmar.eggemann@arm.com \
--cc=ebiederm@xmission.com \
--cc=jannh@google.com \
--cc=jcmvbkbc@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=keescook@chromium.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=linux-xtensa@linux-xtensa.org \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=richard@nod.at \
--cc=rjw@rjwysocki.net \
--cc=rostedt@goodmis.org \
--cc=tj@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=will@kernel.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