[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Apparent deadlock in processes interacting with /hurd/fifo
From: |
Ludovic Courtès |
Subject: |
Apparent deadlock in processes interacting with /hurd/fifo |
Date: |
Fri, 25 Nov 2022 12:35:58 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hello,
Let’s assume you do this:
mkfifo fifo
rpctrace cat fifo
In another terminal, you find the PID of ‘cat’ and run “kill PID”,
twice. The second ‘kill’ command hangs. The ‘cat’ process, which was
initially stuck in dir_lookup("fifo"), eventually fails to service the
second kill request (‘msg_sig_post_request’):
--8<---------------cut here---------------start------------->8---
task111(pid14902)-> 4205 (227424 0 0);
91<--123(pid14902)->dir_lookup ("fifo" 1 0) ...131
118<--132(pid-1)->msg_get_init_port ( task111(pid14902) 4) ...115
task111(pid14902)-> 4205 (227424 0 0);
task111(pid14902)-> 4205 (227424 0 0);
task111(pid14902)-> 4205 (227424 0 0);
task111(pid14902)-> 3208 (pn{ 12} 0 1) = 0
115... = 0 98<--127(pid14902)
118<--132(pid-1)->msg_sig_post_request (15 0 task111(pid14902)) ...115
task111(pid14902)-> 4205 (227424 0 0);
task111(pid14902)-> 3206 (pn{ 1}) = 0
task111(pid14902)-> 4205 (227424 0 0);
120<--126(pid14902)->proc_dostop_request ( thread128(pid14902)) = 0
task111(pid14902)-> 4205 (227424 0 0);
115... = 0
thread113(pid14902)-> 2064 () = 0
thread113(pid14902)-> 2017 (5 17) = 0 {75 31 31 31 19451904 3 0 0 17007276
1868982630 17007168 268451845 17302849 23 582 17007228 31}
task111(pid14902)-> 4205 (227424 0 0);
thread113(pid14902)-> 3808 (75) = 0 {-127074305 30405123}
task111(pid14902)-> 4205 (227424 0 0);
91<--123(pid14902)->interrupt_operation () = 0
118<--132(pid-1)->msg_sig_post_request (15 0 task111(pid14902))
--8<---------------cut here---------------end--------------->8---
It eventually completes after several seconds:
--8<---------------cut here---------------start------------->8---
task111(pid14902)-> 4205 (227424 0 0);
91<--123(pid14902)->interrupt_operation () = 0
118<--132(pid-1)->msg_sig_post_request (15 0 task111(pid14902)) ...115
task111(pid14902)-> 4205 (227424 0 0);
120<--126(pid14902)->proc_mark_exit_request (15 0) = 0
task111(pid14902)-> 4205 (227424 0 0);
task111(pid14902)-> 2008 () ...137
115-> 71 ();
137... = 0
Child 14902 Terminated
--8<---------------cut here---------------end--------------->8---
Does that ring a bell?
I think there’s at least one bug here: ‘dir_lookup’ should complete
immediately; it’s ‘io_read’ that should block.
Thanks,
Ludo’.
- Apparent deadlock in processes interacting with /hurd/fifo,
Ludovic Courtès <=