Bug 216054 - proc: Fix a dentry lock race between release_task and lookup
Summary: proc: Fix a dentry lock race between release_task and lookup
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: fs_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-31 07:32 UTC by Zhihao Cheng
Modified: 2022-05-31 07:42 UTC (History)
0 users

See Also:
Kernel Version: 5.18-rc7
Subsystem:
Regression: No
Bisected commit-id:


Attachments
a.c (1.23 KB, text/plain)
2022-05-31 07:42 UTC, Zhihao Cheng
Details
access.sh (231 bytes, application/x-shellscript)
2022-05-31 07:42 UTC, Zhihao Cheng
Details
run.sh (276 bytes, application/x-shellscript)
2022-05-31 07:42 UTC, Zhihao Cheng
Details

Description Zhihao Cheng 2022-05-31 07:32:10 UTC
Process systemd can take long period high cpu usage during releasing task, which can be reproduced by following steps:
1. gcc -o aa a.c
2. ./run.sh # Termial 1
3. ./access.sh # Termial 2, after run.sh finish
4. time killall -wq aa


$ top # during killall

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                 
    1 root      20   0   73152   8144   6348 S  99.7  0.0   0:22.56 systemd                                                                 
 5117 root      20   0  145096   1688   1448 R  99.7  0.0   0:04.86 ps
Comment 1 Zhihao Cheng 2022-05-31 07:36:42 UTC
(In reply to Zhihao Cheng from comment #0)
> Process systemd can take long period high cpu usage during releasing task,
> which can be reproduced by following steps:
> 1. gcc -o aa a.c
> 2. ./run.sh # Termial 1
> 3. ./access.sh # Termial 2, after run.sh finish
> 4. time killall -wq aa
> 
real	4m40.946s
user	0m0.010s
sys	0m0.052s
> 
> $ top # during killall
> 
>   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND 
> 
>     1 root      20   0   73152   8144   6348 S  99.7  0.0   0:22.56 systemd 
> 
>  5117 root      20   0  145096   1688   1448 R  99.7  0.0   0:04.86 ps
Comment 2 Zhihao Cheng 2022-05-31 07:42:30 UTC
Created attachment 301081 [details]
a.c
Comment 3 Zhihao Cheng 2022-05-31 07:42:43 UTC
Created attachment 301082 [details]
access.sh
Comment 4 Zhihao Cheng 2022-05-31 07:42:57 UTC
Created attachment 301083 [details]
run.sh

Note You need to log in before you can comment on or make changes to this bug.