Re: [RCU] zombie task hung in synchronize_rcu_expedited
From: Wei Fu
Date: Fri Jun 07 2024 - 11:07:30 EST
Hi!
>
> On 06/07, Wei Fu wrote:
> >
> > All the kernels disable CONFIG_PREEMPT and PREEMPT_RCU.
>
> Ah, this can explain both soft-lockup and synchronize_rcu() hang. If my theory
> is correct.
>
> Can you try the patch I sent?
>
> Oleg.
>
Yes. I applied your patch on v5.15.160 and run reproducer for 5 hours.
I didn't see this issue. Currently, it looks good!. I will continue that test
on this weekend.
In last reply, you mentioned TIF_NOTIFY_SIGNAL related to busy-wait loop.
Would you please explain why flag-clear works here?
Thanks,
Wei
```
➜ linux git:(v5.15.160) ✗ git --no-pager show
commit c61bd26ae81a896c8660150b4e356153da30880a (HEAD, tag: v5.15.160, origin/linux-5.15.y)
Author: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Date: Sat May 25 16:20:19 2024 +0200
Linux 5.15.160
Link: https://lore.kernel.org/r/20240523130327.956341021@xxxxxxxxxxxxxxxxxxx
Tested-by: SeongJae Park <sj@xxxxxxxxxx>
Tested-by: Mark Brown <broonie@xxxxxxxxxx>
Tested-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
Tested-by: Harshit Mogalapalli <harshit.m.mogalapalli@xxxxxxxxxx>
Tested-by: Linux Kernel Functional Testing <lkft@xxxxxxxxxx>
Tested-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
Tested-by: Ron Economos <re@xxxxxxxx>
Tested-by: Kelsey Steele <kelseysteele@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
diff --git a/Makefile b/Makefile
index 5cbfe2be72dd..bfc863d71978 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 15
-SUBLEVEL = 159
+SUBLEVEL = 160
EXTRAVERSION =
NAME = Trick or Treat
➜ linux git:(v5.15.160) ✗ git --no-pager diff .
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
index 259fc4ca0d9c..40b011f88067 100644
--- a/kernel/pid_namespace.c
+++ b/kernel/pid_namespace.c
@@ -214,6 +214,7 @@ void zap_pid_ns_processes(struct pid_namespace *pid_ns)
*/
do {
clear_thread_flag(TIF_SIGPENDING);
+ clear_thread_flag(TIF_NOTIFY_SIGNAL);
rc = kernel_wait4(-1, NULL, __WALL, NULL);
} while (rc != -ECHILD);
```