Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel: Running test-pthread repeatedly leaks processes #6474

Closed
ADKaster opened this issue Apr 19, 2021 · 4 comments
Closed

Kernel: Running test-pthread repeatedly leaks processes #6474

ADKaster opened this issue Apr 19, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@ADKaster
Copy link
Member

ADKaster commented Apr 19, 2021

This can cause the system to hang. Hitting Andreas's new Alt+Shift+F12 hotkey shows that there are two Threads that are Dead, but the Finalizer is not being scheduled.

See below in the comments for how it was narrowed down to test-pthread

Tests were run using branch #6459

$ loop { ./tests/run-tests-and-shutdown.sh }

hung

Debug console log below vvvvv

Debug Console Log
Shell(921): Job entry 'echo ==== Running test 47 out of 88 -- /usr/Tests/AK/TestHex ====' deleted in 440 ms
Shell(921): Job entry 'echo ::group::/usr/Tests/AK/TestHex' deleted in 218 ms
TestHex(1409): Completed test 'should_decode_hex_digit' in 0ms
TestHex(1409): Completed test 'should_constexpr_decode_hex_digit' in 0ms
TestHex(1409): Finished 2 tests and 0 benchmarks in 27ms (0ms tests, 0ms benchmarks, 27ms other).
TestHex(1409): Out of 2 tests, 2 passed and 0 failed.
Shell(921): Job entry '/usr/Tests/AK/TestHex' deleted in 432 ms
[#0 colonel(0:0)]:   Selecting      Pr:10 DHCPClient(13:13)              @ 001b:294a71bb (nsched: 142)
[#0 colonel(0:0)]:   Queue          Pr:30 IO WorkQueue(1:1)              @ 0008:c0551ac5 (nsched: 6130)
[#0 colonel(0:0)]:   Running        Pr: 1 colonel(0:0)                   @ 0008:c0390567 (nsched: 140656)
[#0 colonel(0:0)]:   Futex          Pr:30 AudioServer(10:21)             @ 001b:575a21bb (nsched: 4)
[#0 colonel(0:0)]:   Selecting      Pr:50 WindowServer(12:12)            @ 001b:9f0011bb (nsched: 22776)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(22:22)                   @ 001b:7e2351bb (nsched: 1037)
[#0 colonel(0:0)]:   Inode          Pr:30 FileManager (Desktop)(11:11)   @ 001b:7a50a1bb (nsched: 1532)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(1415:1415)               @ 001b:34bcb1bb (nsched: 61)
[#0 colonel(0:0)]:   Sleeping       Pr:30 UHCIHotplug(5:5)               @ 0008:c0551ac5 (nsched: 1147)
[#0 colonel(0:0)]:   FS             Pr:30 SyncTask(3:3)                  @ 0008:c0551ac5 (nsched: 1694)
[#0 colonel(0:0)]:   FS             Pr:30 SystemMonitor(855:855)         @ 001b:0f5ab1bb (nsched: 1870)
[#0 colonel(0:0)]:   Selecting      Pr:10 Clipboard(14:14)               @ 001b:5228e1bb (nsched: 160)
[#0 colonel(0:0)]:   Selecting      Pr:50 SystemServer(6:6)              @ 001b:059e71bb (nsched: 301)
[#0 colonel(0:0)]:   Selecting      Pr:30 Taskbar(16:16)                 @ 001b:044d91bb (nsched: 4683)
[#0 colonel(0:0)]:   Selecting      Pr:30 Terminal(18:18)                @ 001b:9f6f11bb (nsched: 23030)
[#0 colonel(0:0)]:   Selecting      Pr:10 ClipboardHistory.Applet(17:17) @ 001b:3ac6f1bb (nsched: 403)
[#0 colonel(0:0)]:   Dead           Pr:30 echo(822:822)                  @ 001b:95a4e1bb (nsched: 23)
[#0 ResourceGraph.Applet(9:9)]: Scheduler thread list for processor 0:
[#0 ResourceGraph.Applet(9:9)]:   Inode          Pr:30 mkdir(1420:1420)               @ 001b:3ab9b1e2 (nsched: 23)
[#0 ResourceGraph.Applet(9:9)]:   FinalizerTask  Pr:10 FinalizerTask(4:4)             @ 0008:c0551ac5 (nsched: 1824)
[#0 ResourceGraph.Applet(9:9)]:   NetworkTask    Pr:30 NetworkTask(7:7)               @ 0008:c0551ac5 (nsched: 7)   
[#0 ResourceGraph.Applet(9:9)]:   Running        Pr:10 ResourceGraph.Applet(9:9)      @ 001b:1168a1e2 (nsched: 9407) 
[#0 ResourceGraph.Applet(9:9)]:   Dead           Pr:30 test-pthread(938:938)          @ 001b:0bc6a1bb (nsched: 44)   
[#0 ResourceGraph.Applet(9:9)]:   Reading        Pr:30 CrashDaemon(15:15)             @ 001b:7ab461e2 (nsched: 12783)
[#0 ResourceGraph.Applet(9:9)]:   Selecting      Pr:10 Audio.Applet(20:20)            @ 001b:9f6ab1bb (nsched: 327) 
[#0 ResourceGraph.Applet(9:9)]:   Inode          Pr:10 Network.Applet(19:19)          @ 001b:add8e1bb (nsched: 1498)
[#0 ResourceGraph.Applet(9:9)]:   Selecting      Pr:30 Shell(921:921)                 @ 001b:756451bb (nsched: 1152)
[#0 ResourceGraph.Applet(9:9)]:   Selecting      Pr:50 AudioServer(10:10)             @ 001b:575a21bb (nsched: 190)
[#0 ResourceGraph.Applet(9:9)]:   Selecting      Pr:10 DHCPClient(13:13)              @ 001b:294a71bb (nsched: 142)
[#0 ResourceGraph.Applet(9:9)]:   Queue          Pr:30 IO WorkQueue(1:1)              @ 0008:c0551ac5 (nsched: 6130)  
[#0 ResourceGraph.Applet(9:9)]:   Runnable       Pr: 1 colonel(0:0)                   @ 0008:c0390567 (nsched: 153169)
[#0 ResourceGraph.Applet(9:9)]:   Futex          Pr:30 AudioServer(10:21)             @ 001b:575a21bb (nsched: 4)     
[#0 ResourceGraph.Applet(9:9)]:   Runnable       Pr:50 WindowServer(12:12)            @ 001b:9f0011bb (nsched: 23180)
[#0 ResourceGraph.Applet(9:9)]:   Selecting      Pr:30 Shell(22:22)                   @ 001b:7e2351bb (nsched: 1037) 
[#0 ResourceGraph.Applet(9:9)]:   Inode          Pr:30 FileManager (Desktop)(11:11)   @ 001b:7a50a1bb (nsched: 1532)
[#0 ResourceGraph.Applet(9:9)]:   Selecting      Pr:30 Shell(1415:1415)               @ 001b:34bcb1bb (nsched: 61)  
[#0 ResourceGraph.Applet(9:9)]:   Sleeping       Pr:30 UHCIHotplug(5:5)               @ 0008:c0551ac5 (nsched: 1177)
[#0 ResourceGraph.Applet(9:9)]:   FS             Pr:30 SyncTask(3:3)                  @ 0008:c0551ac5 (nsched: 1694)
[#0 ResourceGraph.Applet(9:9)]:   FS             Pr:30 SystemMonitor(855:855)         @ 001b:0f5ab1bb (nsched: 1870)
[#0 ResourceGraph.Applet(9:9)]:   Selecting      Pr:10 Clipboard(14:14)               @ 001b:5228e1bb (nsched: 160) 
[#0 ResourceGraph.Applet(9:9)]:   Selecting      Pr:50 SystemServer(6:6)              @ 001b:059e71bb (nsched: 301)
[#0 ResourceGraph.Applet(9:9)]:   Selecting      Pr:30 Taskbar(16:16)                 @ 001b:044d91bb (nsched: 4785)
[#0 ResourceGraph.Applet(9:9)]:   Runnable       Pr:30 Terminal(18:18)                @ 001b:9f6f11bb (nsched: 23556)
[#0 ResourceGraph.Applet(9:9)]:   Selecting      Pr:10 ClipboardHistory.Applet(17:17) @ 001b:3ac6f1bb (nsched: 403)
[#0 ResourceGraph.Applet(9:9)]:   Dead           Pr:30 echo(822:822)                  @ 001b:95a4e1bb (nsched: 23)
[#0 colonel(0:0)]: Scheduler thread list for processor 0:
[#0 colonel(0:0)]:   Inode          Pr:30 mkdir(1420:1420)               @ 001b:3ab9b1e2 (nsched: 23)
[#0 colonel(0:0)]:   FinalizerTask  Pr:10 FinalizerTask(4:4)             @ 0008:c0551ac5 (nsched: 1824)
[#0 colonel(0:0)]:   NetworkTask    Pr:30 NetworkTask(7:7)               @ 0008:c0551ac5 (nsched: 7)
[#0 colonel(0:0)]:   Selecting      Pr:10 ResourceGraph.Applet(9:9)      @ 001b:1168a1bb (nsched: 9787)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(938:938)          @ 001b:0bc6a1bb (nsched: 44)
[#0 colonel(0:0)]:   Reading        Pr:30 CrashDaemon(15:15)             @ 001b:7ab461e2 (nsched: 12783)
[#0 colonel(0:0)]:   Selecting      Pr:10 Audio.Applet(20:20)            @ 001b:9f6ab1bb (nsched: 327)
[#0 colonel(0:0)]:   Inode          Pr:10 Network.Applet(19:19)          @ 001b:add8e1bb (nsched: 1498)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(921:921)                 @ 001b:756451bb (nsched: 1152)
[#0 colonel(0:0)]:   Selecting      Pr:50 AudioServer(10:10)             @ 001b:575a21bb (nsched: 190)
[#0 colonel(0:0)]:   Selecting      Pr:10 DHCPClient(13:13)              @ 001b:294a71bb (nsched: 142)
[#0 colonel(0:0)]:   Queue          Pr:30 IO WorkQueue(1:1)              @ 0008:c0551ac5 (nsched: 6130)
[#0 colonel(0:0)]:   Running        Pr: 1 colonel(0:0)                   @ 0008:c0390567 (nsched: 173971)
[#0 colonel(0:0)]:   Futex          Pr:30 AudioServer(10:21)             @ 001b:575a21bb (nsched: 4)
[#0 colonel(0:0)]:   Selecting      Pr:50 WindowServer(12:12)            @ 001b:9f0011bb (nsched: 24147)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(22:22)                   @ 001b:7e2351bb (nsched: 1037)
[#0 colonel(0:0)]:   Inode          Pr:30 FileManager (Desktop)(11:11)   @ 001b:7a50a1bb (nsched: 1532)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(1415:1415)               @ 001b:34bcb1bb (nsched: 61)
[#0 colonel(0:0)]:   Sleeping       Pr:30 UHCIHotplug(5:5)               @ 0008:c0551ac5 (nsched: 1228)
[#0 colonel(0:0)]:   FS             Pr:30 SyncTask(3:3)                  @ 0008:c0551ac5 (nsched: 1694)
[#0 colonel(0:0)]:   FS             Pr:30 SystemMonitor(855:855)         @ 001b:0f5ab1bb (nsched: 1870)
[#0 colonel(0:0)]:   Selecting      Pr:10 Clipboard(14:14)               @ 001b:5228e1bb (nsched: 160)
[#0 colonel(0:0)]:   Selecting      Pr:50 SystemServer(6:6)              @ 001b:059e71bb (nsched: 301)
[#0 colonel(0:0)]:   Selecting      Pr:30 Taskbar(16:16)                 @ 001b:044d91bb (nsched: 4947)
[#0 colonel(0:0)]:   Selecting      Pr:30 Terminal(18:18)                @ 001b:9f6f11bb (nsched: 24435)
[#0 colonel(0:0)]:   Selecting      Pr:10 ClipboardHistory.Applet(17:17) @ 001b:3ac6f1bb (nsched: 403)
[#0 colonel(0:0)]:   Dead           Pr:30 echo(822:822)                  @ 001b:95a4e1bb (nsched: 23)
[#0 colonel(0:0)]: Scheduler thread list for processor 0:
[#0 colonel(0:0)]:   Inode          Pr:30 mkdir(1420:1420)               @ 001b:3ab9b1e2 (nsched: 23)
[#0 colonel(0:0)]:   FinalizerTask  Pr:10 FinalizerTask(4:4)             @ 0008:c0551ac5 (nsched: 1824)
[#0 colonel(0:0)]:   NetworkTask    Pr:30 NetworkTask(7:7)               @ 0008:c0551ac5 (nsched: 7)
[#0 colonel(0:0)]:   Selecting      Pr:10 ResourceGraph.Applet(9:9)      @ 001b:1168a1bb (nsched: 9794)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(938:938)          @ 001b:0bc6a1bb (nsched: 44)
[#0 colonel(0:0)]:   Reading        Pr:30 CrashDaemon(15:15)             @ 001b:7ab461e2 (nsched: 12783)
[#0 colonel(0:0)]:   Selecting      Pr:10 Audio.Applet(20:20)            @ 001b:9f6ab1bb (nsched: 327)
[#0 colonel(0:0)]:   Inode          Pr:10 Network.Applet(19:19)          @ 001b:add8e1bb (nsched: 1498)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(921:921)                 @ 001b:756451bb (nsched: 1152)
[#0 colonel(0:0)]:   Selecting      Pr:50 AudioServer(10:10)             @ 001b:575a21bb (nsched: 190)
[#0 colonel(0:0)]:   Selecting      Pr:10 DHCPClient(13:13)              @ 001b:294a71bb (nsched: 142)
[#0 colonel(0:0)]:   Queue          Pr:30 IO WorkQueue(1:1)              @ 0008:c0551ac5 (nsched: 6130)
[#0 colonel(0:0)]:   Running        Pr: 1 colonel(0:0)                   @ 0008:c0390567 (nsched: 174267)
[#0 colonel(0:0)]:   Futex          Pr:30 AudioServer(10:21)             @ 001b:575a21bb (nsched: 4)
[#0 colonel(0:0)]:   Selecting      Pr:50 WindowServer(12:12)            @ 001b:9f0011bb (nsched: 24161)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(22:22)                   @ 001b:7e2351bb (nsched: 1037)
[#0 colonel(0:0)]:   Inode          Pr:30 FileManager (Desktop)(11:11)   @ 001b:7a50a1bb (nsched: 1532)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(1415:1415)               @ 001b:34bcb1bb (nsched: 61)
[#0 colonel(0:0)]:   Sleeping       Pr:30 UHCIHotplug(5:5)               @ 0008:c0551ac5 (nsched: 1228)
[#0 colonel(0:0)]:   FS             Pr:30 SyncTask(3:3)                  @ 0008:c0551ac5 (nsched: 1694)
[#0 colonel(0:0)]:   FS             Pr:30 SystemMonitor(855:855)         @ 001b:0f5ab1bb (nsched: 1870)
[#0 colonel(0:0)]:   Selecting      Pr:10 Clipboard(14:14)               @ 001b:5228e1bb (nsched: 160)
[#0 colonel(0:0)]:   Selecting      Pr:50 SystemServer(6:6)              @ 001b:059e71bb (nsched: 301)
[#0 colonel(0:0)]:   Selecting      Pr:30 Taskbar(16:16)                 @ 001b:044d91bb (nsched: 4947)
[#0 colonel(0:0)]:   Selecting      Pr:30 Terminal(18:18)                @ 001b:9f6f11bb (nsched: 24448)
[#0 colonel(0:0)]:   Selecting      Pr:10 ClipboardHistory.Applet(17:17) @ 001b:3ac6f1bb (nsched: 403)
[#0 colonel(0:0)]:   Dead           Pr:30 echo(822:822)                  @ 001b:95a4e1bb (nsched: 23)
[#0 colonel(0:0)]: Scheduler thread list for processor 0:
[#0 colonel(0:0)]:   Inode          Pr:30 mkdir(1420:1420)               @ 001b:3ab9b1e2 (nsched: 23)
[#0 colonel(0:0)]:   FinalizerTask  Pr:10 FinalizerTask(4:4)             @ 0008:c0551ac5 (nsched: 1824)
[#0 colonel(0:0)]:   NetworkTask    Pr:30 NetworkTask(7:7)               @ 0008:c0551ac5 (nsched: 8)
[#0 colonel(0:0)]:   Selecting      Pr:10 ResourceGraph.Applet(9:9)      @ 001b:1168a1bb (nsched: 10109)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(938:938)          @ 001b:0bc6a1bb (nsched: 44)
[#0 colonel(0:0)]:   Reading        Pr:30 CrashDaemon(15:15)             @ 001b:7ab461e2 (nsched: 12783)
[#0 colonel(0:0)]:   Selecting      Pr:10 Audio.Applet(20:20)            @ 001b:9f6ab1bb (nsched: 327)
[#0 colonel(0:0)]:   Inode          Pr:10 Network.Applet(19:19)          @ 001b:add8e1bb (nsched: 1498)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(921:921)                 @ 001b:756451bb (nsched: 1152)
[#0 colonel(0:0)]:   Selecting      Pr:50 AudioServer(10:10)             @ 001b:575a21bb (nsched: 190)
[#0 colonel(0:0)]:   Selecting      Pr:10 DHCPClient(13:13)              @ 001b:294a71bb (nsched: 142)
[#0 colonel(0:0)]:   Queue          Pr:30 IO WorkQueue(1:1)              @ 0008:c0551ac5 (nsched: 6130)
[#0 colonel(0:0)]:   Running        Pr: 1 colonel(0:0)                   @ 0008:c0390567 (nsched: 192589)
[#0 colonel(0:0)]:   Futex          Pr:30 AudioServer(10:21)             @ 001b:575a21bb (nsched: 4)
[#0 colonel(0:0)]:   Selecting      Pr:50 WindowServer(12:12)            @ 001b:9f0011bb (nsched: 24708)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(22:22)                   @ 001b:7e2351bb (nsched: 1037)
[#0 colonel(0:0)]:   Inode          Pr:30 FileManager (Desktop)(11:11)   @ 001b:7a50a1bb (nsched: 1532)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(1415:1415)               @ 001b:34bcb1bb (nsched: 61)
[#0 colonel(0:0)]:   Sleeping       Pr:30 UHCIHotplug(5:5)               @ 0008:c0551ac5 (nsched: 1272)
[#0 colonel(0:0)]:   FS             Pr:30 SyncTask(3:3)                  @ 0008:c0551ac5 (nsched: 1694)
[#0 colonel(0:0)]:   FS             Pr:30 SystemMonitor(855:855)         @ 001b:0f5ab1bb (nsched: 1870)
[#0 colonel(0:0)]:   Selecting      Pr:10 Clipboard(14:14)               @ 001b:5228e1bb (nsched: 160)
[#0 colonel(0:0)]:   Selecting      Pr:50 SystemServer(6:6)              @ 001b:059e71bb (nsched: 301)
[#0 colonel(0:0)]:   Selecting      Pr:30 Taskbar(16:16)                 @ 001b:044d91bb (nsched: 5107)
[#0 colonel(0:0)]:   Selecting      Pr:30 Terminal(18:18)                @ 001b:9f6f11bb (nsched: 25221)
[#0 colonel(0:0)]:   Selecting      Pr:10 ClipboardHistory.Applet(17:17) @ 001b:3ac6f1bb (nsched: 403)
[#0 colonel(0:0)]:   Dead           Pr:30 echo(822:822)                  @ 001b:95a4e1bb (nsched: 23)
[#0 colonel(0:0)]: Scheduler thread list for processor 0:
[#0 colonel(0:0)]:   Inode          Pr:30 mkdir(1420:1420)               @ 001b:3ab9b1e2 (nsched: 23)
[#0 colonel(0:0)]:   FinalizerTask  Pr:10 FinalizerTask(4:4)             @ 0008:c0551ac5 (nsched: 1824)
[#0 colonel(0:0)]:   NetworkTask    Pr:30 NetworkTask(7:7)               @ 0008:c0551ac5 (nsched: 8)
[#0 colonel(0:0)]:   Selecting      Pr:10 ResourceGraph.Applet(9:9)      @ 001b:1168a1bb (nsched: 10301)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(938:938)          @ 001b:0bc6a1bb (nsched: 44)
[#0 colonel(0:0)]:   Reading        Pr:30 CrashDaemon(15:15)             @ 001b:7ab461e2 (nsched: 12783)
[#0 colonel(0:0)]:   Selecting      Pr:10 Audio.Applet(20:20)            @ 001b:9f6ab1bb (nsched: 327)
[#0 colonel(0:0)]:   Inode          Pr:10 Network.Applet(19:19)          @ 001b:add8e1bb (nsched: 1498)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(921:921)                 @ 001b:756451bb (nsched: 1152)
[#0 colonel(0:0)]:   Selecting      Pr:50 AudioServer(10:10)             @ 001b:575a21bb (nsched: 190)
[#0 colonel(0:0)]:   Selecting      Pr:10 DHCPClient(13:13)              @ 001b:294a71bb (nsched: 143)
[#0 colonel(0:0)]:   Queue          Pr:30 IO WorkQueue(1:1)              @ 0008:c0551ac5 (nsched: 6130)
[#0 colonel(0:0)]:   Running        Pr: 1 colonel(0:0)                   @ 0008:c0390567 (nsched: 203580)
[#0 colonel(0:0)]:   Futex          Pr:30 AudioServer(10:21)             @ 001b:575a21bb (nsched: 4)
[#0 colonel(0:0)]:   Selecting      Pr:50 WindowServer(12:12)            @ 001b:9f0011bb (nsched: 25046)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(22:22)                   @ 001b:7e2351bb (nsched: 1037)
[#0 colonel(0:0)]:   Inode          Pr:30 FileManager (Desktop)(11:11)   @ 001b:7a50a1bb (nsched: 1532)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(1415:1415)               @ 001b:34bcb1bb (nsched: 61)
[#0 colonel(0:0)]:   Sleeping       Pr:30 UHCIHotplug(5:5)               @ 0008:c0551ac5 (nsched: 1299)
[#0 colonel(0:0)]:   FS             Pr:30 SyncTask(3:3)                  @ 0008:c0551ac5 (nsched: 1694)
[#0 colonel(0:0)]:   FS             Pr:30 SystemMonitor(855:855)         @ 001b:0f5ab1bb (nsched: 1870)
[#0 colonel(0:0)]:   Selecting      Pr:10 Clipboard(14:14)               @ 001b:5228e1bb (nsched: 160)
[#0 colonel(0:0)]:   Selecting      Pr:50 SystemServer(6:6)              @ 001b:059e71bb (nsched: 301)
[#0 colonel(0:0)]:   Selecting      Pr:30 Taskbar(16:16)                 @ 001b:044d91bb (nsched: 5194)
[#0 colonel(0:0)]:   Selecting      Pr:30 Terminal(18:18)                @ 001b:9f6f11bb (nsched: 25687)
[#0 colonel(0:0)]:   Selecting      Pr:10 ClipboardHistory.Applet(17:17) @ 001b:3ac6f1bb (nsched: 403)
[#0 colonel(0:0)]:   Dead           Pr:30 echo(822:822)                  @ 001b:95a4e1bb (nsched: 23)
@ADKaster
Copy link
Member Author

ADKaster commented Apr 19, 2021

When keeping this running for a long time after, it seems the IO WorkQueue and SyncTask most threads are never being scheduled at all, just colonel, Terminal, Shell and One or two cycles to random kernel threads..

Log enclosed
[#0 colonel(0:0)]: Scheduler thread list for processor 0:
[#0 colonel(0:0)]:   Inode          Pr:30 mkdir(1420:1420)               @ 001b:3ab9b1e2 (nsched: 23)
[#0 colonel(0:0)]:   FinalizerTask  Pr:10 FinalizerTask(4:4)             @ 0008:c0551ac5 (nsched: 1824)
[#0 colonel(0:0)]:   NetworkTask    Pr:30 NetworkTask(7:7)               @ 0008:c0551ac5 (nsched: 11)
[#0 colonel(0:0)]:   Inode          Pr:30 Taskbar(1421:1421)             @ 001b:044d91ce (nsched: 1)
[#0 colonel(0:0)]:   Selecting      Pr:10 ResourceGraph.Applet(9:9)      @ 001b:1168a1bb (nsched: 16089)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(938:938)          @ 001b:0bc6a1bb (nsched: 44)
[#0 colonel(0:0)]:   Reading        Pr:30 CrashDaemon(15:15)             @ 001b:7ab461e2 (nsched: 12783)
[#0 colonel(0:0)]:   Selecting      Pr:10 Audio.Applet(20:20)            @ 001b:9f6ab1bb (nsched: 327)
[#0 colonel(0:0)]:   Inode          Pr:10 Network.Applet(19:19)          @ 001b:add8e1bb (nsched: 1498)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(921:921)                 @ 001b:756451bb (nsched: 1152)
[#0 colonel(0:0)]:   Selecting      Pr:50 AudioServer(10:10)             @ 001b:575a21bb (nsched: 190)
[#0 colonel(0:0)]:   Selecting      Pr:10 DHCPClient(13:13)              @ 001b:294a71bb (nsched: 144)
[#0 colonel(0:0)]:   Queue          Pr:30 IO WorkQueue(1:1)              @ 0008:c0551ac5 (nsched: 6130)
[#0 colonel(0:0)]:   Running        Pr: 1 colonel(0:0)                   @ 0008:c0390567 (nsched: 626391)
[#0 colonel(0:0)]:   Futex          Pr:30 AudioServer(10:21)             @ 001b:575a21bb (nsched: 4)
[#0 colonel(0:0)]:   FS             Pr:50 WindowServer(12:12)            @ 001b:74e17010 (nsched: 35017)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(22:22)                   @ 001b:7e2351bb (nsched: 1037)
[#0 colonel(0:0)]:   Inode          Pr:30 FileManager (Desktop)(11:11)   @ 001b:7a50a1bb (nsched: 1532)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(1415:1415)               @ 001b:34bcb1bb (nsched: 61)
[#0 colonel(0:0)]:   Sleeping       Pr:30 UHCIHotplug(5:5)               @ 0008:c0551ac5 (nsched: 2332)
[#0 colonel(0:0)]:   FS             Pr:30 SyncTask(3:3)                  @ 0008:c0551ac5 (nsched: 1694)
[#0 colonel(0:0)]:   FS             Pr:30 SystemMonitor(855:855)         @ 001b:0f5ab1bb (nsched: 1870)
[#0 colonel(0:0)]:   Selecting      Pr:10 Clipboard(14:14)               @ 001b:5228e1bb (nsched: 160)
[#0 colonel(0:0)]:   Selecting      Pr:50 SystemServer(6:6)              @ 001b:059e71bb (nsched: 301)
[#0 colonel(0:0)]:   Selecting      Pr:30 Taskbar(16:16)                 @ 001b:044d91bb (nsched: 6656)
[#0 colonel(0:0)]:   Selecting      Pr:30 Terminal(18:18)                @ 001b:9f6f11bb (nsched: 44211)
[#0 colonel(0:0)]:   Selecting      Pr:10 ClipboardHistory.Applet(17:17) @ 001b:3ac6f1bb (nsched: 403)
[#0 colonel(0:0)]:   Dead           Pr:30 echo(822:822)                  @ 001b:95a4e1bb (nsched: 23)
=====================
[#0 colonel(0:0)]: Scheduler thread list for processor 0:
[#0 colonel(0:0)]:   Inode          Pr:30 mkdir(1420:1420)               @ 001b:3ab9b1e2 (nsched: 23)
[#0 colonel(0:0)]:   FinalizerTask  Pr:10 FinalizerTask(4:4)             @ 0008:c0551ac5 (nsched: 1824)
[#0 colonel(0:0)]:   NetworkTask    Pr:30 NetworkTask(7:7)               @ 0008:c0551ac5 (nsched: 11)
[#0 colonel(0:0)]:   Inode          Pr:30 Taskbar(1421:1421)             @ 001b:044d91ce (nsched: 1)
[#0 colonel(0:0)]:   Writing        Pr:10 ResourceGraph.Applet(9:9)      @ 001b:1168a1e2 (nsched: 16967)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(938:938)          @ 001b:0bc6a1bb (nsched: 44)
[#0 colonel(0:0)]:   Reading        Pr:30 CrashDaemon(15:15)             @ 001b:7ab461e2 (nsched: 12783)
[#0 colonel(0:0)]:   Selecting      Pr:10 Audio.Applet(20:20)            @ 001b:9f6ab1bb (nsched: 327)
[#0 colonel(0:0)]:   Inode          Pr:10 Network.Applet(19:19)          @ 001b:add8e1bb (nsched: 1498)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(921:921)                 @ 001b:756451bb (nsched: 1152)
[#0 colonel(0:0)]:   Selecting      Pr:50 AudioServer(10:10)             @ 001b:575a21bb (nsched: 190)
[#0 colonel(0:0)]:   Selecting      Pr:10 DHCPClient(13:13)              @ 001b:294a71bb (nsched: 145)
[#0 colonel(0:0)]:   Queue          Pr:30 IO WorkQueue(1:1)              @ 0008:c0551ac5 (nsched: 6130)
[#0 colonel(0:0)]:   Running        Pr: 1 colonel(0:0)                   @ 0008:c0390567 (nsched: 756141)
[#0 colonel(0:0)]:   Futex          Pr:30 AudioServer(10:21)             @ 001b:575a21bb (nsched: 4)
[#0 colonel(0:0)]:   FS             Pr:50 WindowServer(12:12)            @ 001b:74e17010 (nsched: 35017)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(22:22)                   @ 001b:7e2351bb (nsched: 1037)
[#0 colonel(0:0)]:   Inode          Pr:30 FileManager (Desktop)(11:11)   @ 001b:7a50a1bb (nsched: 1532)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(1415:1415)               @ 001b:34bcb1bb (nsched: 61)
[#0 colonel(0:0)]:   Sleeping       Pr:30 UHCIHotplug(5:5)               @ 0008:c0551ac5 (nsched: 2629)
[#0 colonel(0:0)]:   FS             Pr:30 SyncTask(3:3)                  @ 0008:c0551ac5 (nsched: 1694)
[#0 colonel(0:0)]:   FS             Pr:30 SystemMonitor(855:855)         @ 001b:0f5ab1bb (nsched: 1870)
[#0 colonel(0:0)]:   Selecting      Pr:10 Clipboard(14:14)               @ 001b:5228e1bb (nsched: 160)
[#0 colonel(0:0)]:   Selecting      Pr:50 SystemServer(6:6)              @ 001b:059e71bb (nsched: 301)
[#0 colonel(0:0)]:   Selecting      Pr:30 Taskbar(16:16)                 @ 001b:044d91bb (nsched: 6656)
[#0 colonel(0:0)]:   Selecting      Pr:30 Terminal(18:18)                @ 001b:9f6f11bb (nsched: 49392)
[#0 colonel(0:0)]:   Selecting      Pr:10 ClipboardHistory.Applet(17:17) @ 001b:3ac6f1bb (nsched: 403)
[#0 colonel(0:0)]:   Dead           Pr:30 echo(822:822)                  @ 001b:95a4e1bb (nsched: 23)
==================
[#0 colonel(0:0)]: Scheduler thread list for processor 0:
[#0 colonel(0:0)]:   Inode          Pr:30 mkdir(1420:1420)               @ 001b:3ab9b1e2 (nsched: 23)
[#0 colonel(0:0)]:   FinalizerTask  Pr:10 FinalizerTask(4:4)             @ 0008:c0551ac5 (nsched: 1824)
[#0 colonel(0:0)]:   NetworkTask    Pr:30 NetworkTask(7:7)               @ 0008:c0551ac5 (nsched: 12)
[#0 colonel(0:0)]:   Inode          Pr:30 Taskbar(1421:1421)             @ 001b:044d91ce (nsched: 1)
[#0 colonel(0:0)]:   Writing        Pr:10 ResourceGraph.Applet(9:9)      @ 001b:1168a1e2 (nsched: 16967)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(938:938)          @ 001b:0bc6a1bb (nsched: 44)
[#0 colonel(0:0)]:   Reading        Pr:30 CrashDaemon(15:15)             @ 001b:7ab461e2 (nsched: 12783)
[#0 colonel(0:0)]:   Selecting      Pr:10 Audio.Applet(20:20)            @ 001b:9f6ab1bb (nsched: 327)
[#0 colonel(0:0)]:   Inode          Pr:10 Network.Applet(19:19)          @ 001b:add8e1bb (nsched: 1498)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(921:921)                 @ 001b:756451bb (nsched: 1152)
[#0 colonel(0:0)]:   Selecting      Pr:50 AudioServer(10:10)             @ 001b:575a21bb (nsched: 190)
[#0 colonel(0:0)]:   Selecting      Pr:10 DHCPClient(13:13)              @ 001b:294a71bb (nsched: 146)
[#0 colonel(0:0)]:   Queue          Pr:30 IO WorkQueue(1:1)              @ 0008:c0551ac5 (nsched: 6130)
[#0 colonel(0:0)]:   Running        Pr: 1 colonel(0:0)                   @ 0008:c0390567 (nsched: 1009382)
[#0 colonel(0:0)]:   Futex          Pr:30 AudioServer(10:21)             @ 001b:575a21bb (nsched: 4)
[#0 colonel(0:0)]:   FS             Pr:50 WindowServer(12:12)            @ 001b:74e17010 (nsched: 35017)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(22:22)                   @ 001b:7e2351bb (nsched: 1037)
[#0 colonel(0:0)]:   Inode          Pr:30 FileManager (Desktop)(11:11)   @ 001b:7a50a1bb (nsched: 1532)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(1415:1415)               @ 001b:34bcb1bb (nsched: 61)
[#0 colonel(0:0)]:   Sleeping       Pr:30 UHCIHotplug(5:5)               @ 0008:c0551ac5 (nsched: 3136)
[#0 colonel(0:0)]:   FS             Pr:30 SyncTask(3:3)                  @ 0008:c0551ac5 (nsched: 1694)
[#0 colonel(0:0)]:   FS             Pr:30 SystemMonitor(855:855)         @ 001b:0f5ab1bb (nsched: 1870)
[#0 colonel(0:0)]:   Selecting      Pr:10 Clipboard(14:14)               @ 001b:5228e1bb (nsched: 160)
[#0 colonel(0:0)]:   Selecting      Pr:50 SystemServer(6:6)              @ 001b:059e71bb (nsched: 301)
[#0 colonel(0:0)]:   Selecting      Pr:30 Taskbar(16:16)                 @ 001b:044d91bb (nsched: 6656)
[#0 colonel(0:0)]:   Selecting      Pr:30 Terminal(18:18)                @ 001b:9f6f11bb (nsched: 59156)
[#0 colonel(0:0)]:   Selecting      Pr:10 ClipboardHistory.Applet(17:17) @ 001b:3ac6f1bb (nsched: 403)
[#0 colonel(0:0)]:   Dead           Pr:30 echo(822:822)                  @ 001b:95a4e1bb (nsched: 23)

@ADKaster
Copy link
Member Author

ADKaster commented Apr 19, 2021

Looks like test-pthread is a common theme, here's another run, but this time with WHPX Acceleration enabled:

run2-graphs
run2-processes

Debug console
Shell(6250): Job entry 'echo ==== Running test 2 out of 88 -- test-pthread ====' deleted in 18 ms
Shell(6250): Job entry 'echo ::group::test-pthread' deleted in 18 ms
test-pthread(6267): Started thread "", tid = 6268
test-pthread(6267): Started thread "", tid = 6269
test-pthread(6267): Started thread "", tid = 6270
test-pthread(6267): Started thread "", tid = 6271
test-pthread(6267): Started thread "", tid = 6272
test-pthread(6267): Started thread "", tid = 6273
test-pthread(6267): Started thread "", tid = 6274
test-pthread(6267): Started thread "", tid = 6275
test-pthread(6267): Started thread "", tid = 6276
test-pthread(6267): Started thread "", tid = 6277
[#0 test-pthread(6267:6267)]: test-pthread(6267:6268) Should already die
[#0 test-pthread(6267:6267)]: test-pthread(6267:6269) Should already die
[#0 test-pthread(6267:6267)]: test-pthread(6267:6270) Should already die
[#0 test-pthread(6267:6267)]: test-pthread(6267:6271) Should already die
[#0 test-pthread(6267:6267)]: test-pthread(6267:6272) Should already die
[#0 test-pthread(6267:6267)]: test-pthread(6267:6273) Should already die
[#0 test-pthread(6267:6267)]: test-pthread(6267:6274) Should already die
[#0 test-pthread(6267:6267)]: test-pthread(6267:6275) Should already die
[#0 test-pthread(6267:6267)]: test-pthread(6267:6276) Should already die
[#0 test-pthread(6267:6267)]: test-pthread(6267:6277) Should already die
Shell(6250): Job entry 'test-pthread' deleted in 1167 ms
Shell(6250): Job entry 'echo ::debug file=test-pthread:: test-pthread passed!' deleted in 12 ms
Shell(6250): Job entry 'echo ::endgroup::' deleted in 22 ms
Shell(625Shell(6281): Job entry 'expr 2 + 1' deleted in 48 ms
0): Job entry 'expr 2 + 1' deleted in 46 ms
Shell(6250): Job entry 'echo ==== Running test 3 out of 88 -- test-compress ====' deleted in 28 ms
Shell(6250): Job entry 'echo ::group::test-compress' deleted in 20 ms
test-compress(6283): Completed test 'canonical_code_simple' in 0ms
test-compress(6283): Completed test 'canonical_code_complex' in 0ms
test-compress(6283): Completed test 'deflate_decompress_compressed_block' in 0ms
test-compress(6283): Completed test 'deflate_decompress_uncompressed_block' in 0ms
test-compress(6283): Completed test 'deflate_decompress_multiple_blocks' in 0ms
test-compress(6283): Completed test 'deflate_decompress_zeroes' in 0ms
test-compress(6283): Completed test 'deflate_round_trip_store' in 0ms
test-compress(6283): Completed test 'deflate_round_trip_compress' in 0ms
test-compress(6283): Completed test 'deflate_round_trip_compress_large' in 7ms
test-compress(6283): Completed test 'deflate_compress_literals' in 0ms
test-compress(6283): Completed test 'zlib_decompress_simple' in 0ms
test-compress(6283): Completed test 'gzip_decompress_simple' in 0ms
test-compress(6283): Completed test 'gzip_decompress_multiple_members' in 0ms
test-compress(6283): Completed test 'gzip_decompress_zeroes' in 8ms
test-compress(6283): Completed test 'gzip_decompress_repeat_around_buffer' in 0ms
test-compress(6283): Completed test 'gzip_round_trip' in 0ms
test-compress(6283): Finished 16 tests and 0 benchmarks in 150ms (15ms tests, 0ms benchmarks, 135ms other).
test-compress(6283): Out of 16 tests, 16 passed and 0 failed.
Shell(6250): Job entry 'test-compress' deleted in 185 ms
Shell(6250): Job entry 'echo ::debug file=test-compress:: test-compress passed!' deleted in 22 ms
Shell(6250): Job entry 'echo ::endgroup::' deleted in 14 ms
Shell(6287): Job entry 'expr 3 + 1' deleted in 26 ms
Shell(6250): Job entry 'expr 3 + 1' deleted in 33 ms
Shell(6250): Job entry 'echo ==== Running test 4 out of 88 -- test-crypto -t bigint ====' deleted in 28 ms
Shell(6250): Job entry 'echo ::group::test-crypto -t bigint' deleted in 30 ms
Shell(6250): Job entry 'test-crypto -t bigint' deleted in 37 ms
Shell(6250): Job entry 'echo ::debug file=test-crypto -t bigint:: test-crypto -t bigint passed!' deleted in 42 ms
Shell(6250): Job entry 'echo ::endgroup::' deleted in 13 ms
Shell(6250): Job enShell(6293): Job entry 'expr 4 + 1' deleted intry 'expr 4 + 1' deleted in 25 ms
 29 ms
Shell(6250): Job entry 'echo ==== Running test 5 out of 88 -- /usr/Tests/Shell/control-structure-as-command.sh ====' deleted in 30 ms
Shell(6250): Job entry 'echo ::group::/usr/Tests/Shell/control-structure-as-command.sh' deleted in 9 ms
Shell(6295): Job entry 'id -u' dShell(6297): Job entry 'id -u' deleted in 32 ms
eleted in 28 ms
Shell(6295): Job entry '[ 100 = 0 ]' deleted in 19 ms
Shell(6295): Job entry 'dirname /usr/Tests/Shell/conShell(6299): Job entry 'dirname /usr/Tests/Shell/control-structure-as-commtrol-structure-as-command.sh' deleted in 27 ms
and.sh' deleted in 32 ms
Shell(6295): Job entry 'rm -rf shell-test' deleted in 43 ms
Shell(6295): Job entry 'mkdir shell-test' deleted in 15 ms
Shell(6295): Job entry 'touch a b c' deleted in 24 ms
Shell(6295): Job entry 'echo yes' deleted in 23 ms
Shell(6295): Job entry 'seq 1' deleted in 49 ms
Shell(6295): Job entry 'ls' deleted in 83 ms
Shell(6295)Shell(6306): Job entry 'cat listing' deleted in 15 ms
m: Job entry 'cat listing' deleted in 7 ms
Shell(6295): Job entry 'test yes = yes' deleted in 30 ms
Shell(6295): Job entry 'rm listing' deleted in 23 ms
[#0 SyncTask(3:3)]: Ext2FS: Flushed 8 blocks to disk
Shell(6308): Job entry 'echo 1' deleted in 47 ms
Shell(6308): Job entry 'echo 2' deleted in 31 ms
Shell(6308): Job entry 'echo 3' deleted in 35 ms
Shell(6308): Job entry 'echo 4' deleted in 35 ms
Shell(6308): Job entry 'seq 4' deleted in 219 ms
[#0 SyncTask(3:3)]: Ext2FS: Flushed 6 blocks to disk
[#0 colonel(0:0)]: Scheduler thread list for processor 0:
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(6250:6250)               @ 001b:437631bb (nsched: 95)
[#0 colonel(0:0)]:   NetworkTask    Pr:30 NetworkTask(7:7)               @ 0008:c0551ac5 (nsched: 4)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(1822:1822)        @ 001b:bb9381bb (nsched: 10)
[#0 colonel(0:0)]:   Reading        Pr:30 CrashDaemon(15:15)             @ 001b:331a51e2 (nsched: 78)
[#0 colonel(0:0)]:   Selecting      Pr:10 DHCPClient(13:13)              @ 001b:196561bb (nsched: 130)
[#0 colonel(0:0)]:   Sleeping       Pr:30 SyncTask(3:3)                  @ 0008:c0551ac5 (nsched: 1249)
[#0 colonel(0:0)]:   Selecting      Pr:50 SystemServer(6:6)              @ 001b:ab6d91bb (nsched: 239)
[#0 colonel(0:0)]:   Selecting      Pr:10 Audio.Applet(20:20)            @ 001b:4c20a1bb (nsched: 256)
[#0 colonel(0:0)]:   Selecting      Pr:10 Network.Applet(19:19)          @ 001b:b0dd61bb (nsched: 726)
[#0 colonel(0:0)]:   Queue          Pr:30 IO WorkQueue(1:1)              @ 0008:c0551ac5 (nsched: 5614)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(22:22)                   @ 001b:8b5b01bb (nsched: 424)
[#0 colonel(0:0)]:   Selecting      Pr:30 FileManager (Desktop)(11:11)   @ 001b:453911bb (nsched: 2036)
[#0 colonel(0:0)]:   Sleeping       Pr:30 UHCIHotplug(5:5)               @ 0008:c0551ac5 (nsched: 418)
[#0 colonel(0:0)]:   Selecting      Pr:10 Clipboard(14:14)               @ 001b:193141bb (nsched: 80)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(6295:6295)               @ 001b:af55e1bb (nsched: 35)
[#0 colonel(0:0)]:   Selecting      Pr:30 Taskbar(16:16)                 @ 001b:505f61bb (nsched: 2323)
[#0 colonel(0:0)]:   Selecting      Pr:30 Terminal(18:18)                @ 001b:171a11bb (nsched: 17797)
[#0 colonel(0:0)]:   Selecting      Pr:30 SystemMonitor(741:741)         @ 001b:6c1f81bb (nsched: 2943)
[#0 colonel(0:0)]:   Selecting      Pr:10 ResourceGraph.Applet(9:9)      @ 001b:572b31bb (nsched: 2859)
[#0 colonel(0:0)]:   Running        Pr: 1 colonel(0:0)                   @ 0008:c0390567 (nsched: 93647)
[#0 colonel(0:0)]:   Selecting      Pr:50 WindowServer(12:12)            @ 001b:0d4f21bb (nsched: 20615)
[#0 colonel(0:0)]:   FinalizerTask  Pr:10 FinalizerTask(4:4)             @ 0008:c0551ac5 (nsched: 6215)
[#0 colonel(0:0)]:   Selecting      Pr:50 AudioServer(10:10)             @ 001b:34a4e1bb (nsched: 115)
[#0 colonel(0:0)]:   Futex          Pr:30 AudioServer(10:21)             @ 001b:34a4e1bb (nsched: 4)
[#0 colonel(0:0)]:   Selecting      Pr:10 ClipboardHistory.Applet(17:17) @ 001b:299df1bb (nsched: 236)
[#0 colonel(0:0)]: Scheduler thread list for processor 0:
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(6250:6250)               @ 001b:437631bb (nsched: 95)
[#0 colonel(0:0)]:   NetworkTask    Pr:30 NetworkTask(7:7)               @ 0008:c0551ac5 (nsched: 4)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(1822:1822)        @ 001b:bb9381bb (nsched: 10)
[#0 colonel(0:0)]:   Reading        Pr:30 CrashDaemon(15:15)             @ 001b:331a51e2 (nsched: 78)
[#0 colonel(0:0)]:   Selecting      Pr:10 DHCPClient(13:13)              @ 001b:196561bb (nsched: 130)
[#0 colonel(0:0)]:   Sleeping       Pr:30 SyncTask(3:3)                  @ 0008:c0551ac5 (nsched: 1253)
[#0 colonel(0:0)]:   Selecting      Pr:50 SystemServer(6:6)              @ 001b:ab6d91bb (nsched: 239)
[#0 colonel(0:0)]:   Selecting      Pr:10 Audio.Applet(20:20)            @ 001b:4c20a1bb (nsched: 256)
[#0 colonel(0:0)]:   Selecting      Pr:10 Network.Applet(19:19)          @ 001b:b0dd61bb (nsched: 730)
[#0 colonel(0:0)]:   Queue          Pr:30 IO WorkQueue(1:1)              @ 0008:c0551ac5 (nsched: 5614)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(22:22)                   @ 001b:8b5b01bb (nsched: 424)
[#0 colonel(0:0)]:   Selecting      Pr:30 FileManager (Desktop)(11:11)   @ 001b:453911bb (nsched: 2036)
[#0 colonel(0:0)]:   Sleeping       Pr:30 UHCIHotplug(5:5)               @ 0008:c0551ac5 (nsched: 422)
[#0 colonel(0:0)]:   Selecting      Pr:10 Clipboard(14:14)               @ 001b:193141bb (nsched: 80)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(6295:6295)               @ 001b:af55e1bb (nsched: 35)
[#0 colonel(0:0)]:   Selecting      Pr:30 Taskbar(16:16)                 @ 001b:505f61bb (nsched: 2335)
[#0 colonel(0:0)]:   Selecting      Pr:30 Terminal(18:18)                @ 001b:171a11bb (nsched: 17865)
[#0 colonel(0:0)]:   Selecting      Pr:30 SystemMonitor(741:741)         @ 001b:6c1f81bb (nsched: 2953)
[#0 colonel(0:0)]:   Selecting      Pr:10 ResourceGraph.Applet(9:9)      @ 001b:572b31bb (nsched: 2878)
[#0 colonel(0:0)]:   Running        Pr: 1 colonel(0:0)                   @ 0008:c0390567 (nsched: 95327)
[#0 colonel(0:0)]:   Selecting      Pr:50 WindowServer(12:12)            @ 001b:0d4f21bb (nsched: 20654)
[#0 colonel(0:0)]:   FinalizerTask  Pr:10 FinalizerTask(4:4)             @ 0008:c0551ac5 (nsched: 6215)
[#0 colonel(0:0)]:   Selecting      Pr:50 AudioServer(10:10)             @ 001b:34a4e1bb (nsched: 115)
[#0 colonel(0:0)]:   Futex          Pr:30 AudioServer(10:21)             @ 001b:34a4e1bb (nsched: 4)
[#0 colonel(0:0)]:   Selecting      Pr:10 ClipboardHistory.Applet(17:17) @ 001b:299df1bb (nsched: 236)
[#0 colonel(0:0)]: Scheduler thread list for processor 0:
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(6250:6250)               @ 001b:437631bb (nsched: 95)
[#0 colonel(0:0)]:   NetworkTask    Pr:30 NetworkTask(7:7)               @ 0008:c0551ac5 (nsched: 4)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(1822:1822)        @ 001b:bb9381bb (nsched: 10)
[#0 colonel(0:0)]:   Reading        Pr:30 CrashDaemon(15:15)             @ 001b:331a51e2 (nsched: 78)
[#0 colonel(0:0)]:   Selecting      Pr:10 DHCPClient(13:13)              @ 001b:196561bb (nsched: 130)
[#0 colonel(0:0)]:   Sleeping       Pr:30 SyncTask(3:3)                  @ 0008:c0551ac5 (nsched: 1258)
[#0 colonel(0:0)]:   Selecting      Pr:50 SystemServer(6:6)              @ 001b:ab6d91bb (nsched: 239)
[#0 colonel(0:0)]:   Selecting      Pr:10 Audio.Applet(20:20)            @ 001b:4c20a1bb (nsched: 256)
[#0 colonel(0:0)]:   Selecting      Pr:10 Network.Applet(19:19)          @ 001b:b0dd61bb (nsched: 734)
[#0 colonel(0:0)]:   Queue          Pr:30 IO WorkQueue(1:1)              @ 0008:c0551ac5 (nsched: 5614)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(22:22)                   @ 001b:8b5b01bb (nsched: 424)
[#0 colonel(0:0)]:   Selecting      Pr:30 FileManager (Desktop)(11:11)   @ 001b:453911bb (nsched: 2036)
[#0 colonel(0:0)]:   Sleeping       Pr:30 UHCIHotplug(5:5)               @ 0008:c0551ac5 (nsched: 427)
[#0 colonel(0:0)]:   Selecting      Pr:10 Clipboard(14:14)               @ 001b:193141bb (nsched: 80)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(6295:6295)               @ 001b:af55e1bb (nsched: 35)
[#0 colonel(0:0)]:   Selecting      Pr:30 Taskbar(16:16)                 @ 001b:505f61bb (nsched: 2350)
[#0 colonel(0:0)]:   Selecting      Pr:30 Terminal(18:18)                @ 001b:171a11bb (nsched: 17963)
[#0 colonel(0:0)]:   Selecting      Pr:30 SystemMonitor(741:741)         @ 001b:6c1f81bb (nsched: 2961)
[#0 colonel(0:0)]:   Selecting      Pr:10 ResourceGraph.Applet(9:9)      @ 001b:572b31bb (nsched: 2900)
[#0 colonel(0:0)]:   Running        Pr: 1 colonel(0:0)                   @ 0008:c0390567 (nsched: 97759)
[#0 colonel(0:0)]:   Selecting      Pr:50 WindowServer(12:12)            @ 001b:0d4f21bb (nsched: 20698)
[#0 colonel(0:0)]:   FinalizerTask  Pr:10 FinalizerTask(4:4)             @ 0008:c0551ac5 (nsched: 6215)
[#0 colonel(0:0)]:   Selecting      Pr:50 AudioServer(10:10)             @ 001b:34a4e1bb (nsched: 115)
[#0 colonel(0:0)]:   Futex          Pr:30 AudioServer(10:21)             @ 001b:34a4e1bb (nsched: 4)
[#0 colonel(0:0)]:   Selecting      Pr:10 ClipboardHistory.Applet(17:17) @ 001b:299df1bb (nsched: 236)
[#0 colonel(0:0)]: Scheduler thread list for processor 0:
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(6250:6250)               @ 001b:437631bb (nsched: 95)
[#0 colonel(0:0)]:   NetworkTask    Pr:30 NetworkTask(7:7)               @ 0008:c0551ac5 (nsched: 4)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(1822:1822)        @ 001b:bb9381bb (nsched: 10)
[#0 colonel(0:0)]:   Reading        Pr:30 CrashDaemon(15:15)             @ 001b:331a51e2 (nsched: 78)
[#0 colonel(0:0)]:   Selecting      Pr:10 DHCPClient(13:13)              @ 001b:196561bb (nsched: 130)
[#0 colonel(0:0)]:   Sleeping       Pr:30 SyncTask(3:3)                  @ 0008:c0551ac5 (nsched: 1278)
[#0 colonel(0:0)]:   Selecting      Pr:50 SystemServer(6:6)              @ 001b:ab6d91bb (nsched: 239)
[#0 colonel(0:0)]:   Selecting      Pr:10 Audio.Applet(20:20)            @ 001b:4c20a1bb (nsched: 256)
[#0 colonel(0:0)]:   Selecting      Pr:10 Network.Applet(19:19)          @ 001b:b0dd61bb (nsched: 751)
[#0 colonel(0:0)]:   Queue          Pr:30 IO WorkQueue(1:1)              @ 0008:c0551ac5 (nsched: 5614)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(22:22)                   @ 001b:8b5b01bb (nsched: 424)
[#0 colonel(0:0)]:   Selecting      Pr:30 FileManager (Desktop)(11:11)   @ 001b:453911bb (nsched: 2290)
[#0 colonel(0:0)]:   Sleeping       Pr:30 UHCIHotplug(5:5)               @ 0008:c0551ac5 (nsched: 447)
[#0 colonel(0:0)]:   Selecting      Pr:10 Clipboard(14:14)               @ 001b:193141bb (nsched: 80)
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(6295:6295)               @ 001b:af55e1bb (nsched: 35)
[#0 colonel(0:0)]:   Selecting      Pr:30 Taskbar(16:16)                 @ 001b:505f61bb (nsched: 2413)
[#0 colonel(0:0)]:   Selecting      Pr:30 Terminal(18:18)                @ 001b:171a11bb (nsched: 18334)
[#0 colonel(0:0)]:   Selecting      Pr:30 SystemMonitor(741:741)         @ 001b:6c1f81bb (nsched: 3509)
[#0 colonel(0:0)]:   Selecting      Pr:10 ResourceGraph.Applet(9:9)      @ 001b:572b31bb (nsched: 2992)
[#0 colonel(0:0)]:   Running        Pr: 1 colonel(0:0)                   @ 0008:c0390567 (nsched: 107378)
[#0 colonel(0:0)]:   Selecting      Pr:50 WindowServer(12:12)            @ 001b:0d4f21bb (nsched: 21794)
[#0 colonel(0:0)]:   FinalizerTask  Pr:10 FinalizerTask(4:4)             @ 0008:c0551ac5 (nsched: 6215)
[#0 colonel(0:0)]:   Selecting      Pr:50 AudioServer(10:10)             @ 001b:34a4e1bb (nsched: 115)
[#0 colonel(0:0)]:   Futex          Pr:30 AudioServer(10:21)             @ 001b:34a4e1bb (nsched: 4)
[#0 colonel(0:0)]:   Selecting      Pr:10 ClipboardHistory.Applet(17:17) @ 001b:299df1bb (nsched: 236)

@bgianfo bgianfo added the bug Something isn't working label Apr 19, 2021
@ADKaster ADKaster changed the title Kernel: System hangs intermittently when running tests for a long time Kernel: Running test-pthread repeatedly leaks processes Apr 22, 2021
@ADKaster
Copy link
Member Author

test-pthread creates 10 threads, and verifies that only one of them can trigger a pthread_once call.

However, running it many times in quick succession can cause processes (but not threads!) to be leaked, and never finalized.

leaked

Kernel scheduler dump from the above
[#0 colonel(0:0)]: Scheduler thread list for processor 0:
[#0 colonel(0:0)]:   Selecting      Pr:30 Shell(22:22)                   @ 001b:8d9db1bb (nsched: 791)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(170:170)          @ 001b:a58731bb (nsched: 36)
[#0 colonel(0:0)]:   FinalizerTask  Pr:10 FinalizerTask(4:4)             @ 0008:c05503f1 (nsched: 127)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(368:368)          @ 001b:b7cb81bb (nsched: 45)
[#0 colonel(0:0)]:   NetworkTask    Pr:30 NetworkTask(7:7)               @ 0008:c05503f1 (nsched: 6)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(148:148)          @ 001b:b61bd1bb (nsched: 34)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(247:247)          @ 001b:4976a1bb (nsched: 33)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(214:214)          @ 001b:412f91bb (nsched: 37)
[#0 colonel(0:0)]:   Selecting      Pr:30 FileManager (Desktop)(11:11)   @ 001b:af15f1bb (nsched: 1307)
[#0 colonel(0:0)]:   Selecting      Pr:30 SystemMonitor(26:26)           @ 001b:5af131bb (nsched: 3756)
[#0 colonel(0:0)]:   Sleeping       Pr:30 UHCIHotplug(5:5)               @ 0008:c05503f1 (nsched: 534)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(38:38)            @ 001b:32d1a1bb (nsched: 40)
[#0 colonel(0:0)]:   Selecting      Pr:10 ResourceGraph.Applet(9:9)      @ 001b:8e3ac1bb (nsched: 5413)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(60:60)            @ 001b:837171bb (nsched: 38)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(346:346)          @ 001b:223df1bb (nsched: 35)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(71:71)            @ 001b:a8adb1bb (nsched: 37)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(104:104)          @ 001b:8d9341bb (nsched: 39)
[#0 colonel(0:0)]:   Sleeping       Pr:30 SyncTask(3:3)                  @ 0008:c05503f1 (nsched: 567)
[#0 colonel(0:0)]:   Selecting      Pr:10 Clipboard(14:14)               @ 001b:504cb1bb (nsched: 118)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(335:335)          @ 001b:a38f91bb (nsched: 35)
[#0 colonel(0:0)]:   Reading        Pr:30 CrashDaemon(15:15)             @ 001b:4ba351e2 (nsched: 147)
[#0 colonel(0:0)]:   Selecting      Pr:10 Audio.Applet(20:20)            @ 001b:979bb1bb (nsched: 348)
[#0 colonel(0:0)]:   Selecting      Pr:10 Network.Applet(19:19)          @ 001b:7eee61bb (nsched: 966)
[#0 colonel(0:0)]:   Selecting      Pr:50 SystemServer(6:6)              @ 001b:1998f1bb (nsched: 290)
[#0 colonel(0:0)]:   Selecting      Pr:50 AudioServer(10:10)             @ 001b:79dbe1bb (nsched: 199)
[#0 colonel(0:0)]:   Selecting      Pr:10 DHCPClient(13:13)              @ 001b:125491bb (nsched: 168)
[#0 colonel(0:0)]:   Selecting      Pr:30 Taskbar(16:16)                 @ 001b:11f001bb (nsched: 2831)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(82:82)            @ 001b:6df621bb (nsched: 39)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(236:236)          @ 001b:766011bb (nsched: 35)
[#0 colonel(0:0)]:   Selecting      Pr:30 Terminal(18:18)                @ 001b:4469d1bb (nsched: 11401)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(434:434)          @ 001b:519de1bb (nsched: 40)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(203:203)          @ 001b:6db181bb (nsched: 31)
[#0 colonel(0:0)]:   Queue          Pr:30 IO WorkQueue(1:1)              @ 0008:c05503f1 (nsched: 2264)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(280:280)          @ 001b:616741bb (nsched: 33)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(159:159)          @ 001b:5373f1bb (nsched: 34)
[#0 colonel(0:0)]:   Running        Pr: 1 colonel(0:0)                   @ 0008:c038eac9 (nsched: 175055)
[#0 colonel(0:0)]:   Selecting      Pr:10 ClipboardHistory.Applet(17:17) @ 001b:13e8f1bb (nsched: 372)
[#0 colonel(0:0)]:   Futex          Pr:30 AudioServer(10:21)             @ 001b:79dbe1bb (nsched: 6)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(423:423)          @ 001b:0c4241bb (nsched: 35)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(302:302)          @ 001b:8da9c1bb (nsched: 32)
[#0 colonel(0:0)]:   Dead           Pr:30 test-pthread(93:93)            @ 001b:71a081bb (nsched: 37)
[#0 colonel(0:0)]:   Selecting      Pr:50 WindowServer(12:12)            @ 001b:a67911bb (nsched: 13281)

In another test, I ran

$ loop { test-pthread }

And ended up with 75 processes, but only 21 showing up in system monitor.

thonk

The pastebin here is to the /proc/all listing from the run, which shows that there are in fact, 76 entries in g_processes.

https://pastebin.com/H74djXEP

@ADKaster
Copy link
Member Author

ADKaster commented Jun 6, 2021

Fixed by 3c2a6a2

@ADKaster ADKaster closed this as completed Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants