-
Notifications
You must be signed in to change notification settings - Fork 4
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
Sometimes mc hangs on directory change #4071
Comments
I get it again, mc hangs
I checked with lldb and mc is waiting in synchronize at common.c:497
Current values
fish subshell actually stopped
I'm not sure how this could be possible |
I'm able to reproduce it like this:
Go to ~/Library folder (I guess any folder with lots subfolders will work) |
Tried to rewrite synchronize with nanosleep and without sig* functions, it works without issues
(and commented out other sig* calls in synchronize function)
So it seems something wrong with this while loop
subshell already stopped, subshell_stopped=1 and sigsuspend waiting for a signal blocking mc |
uh-oh, this whole file is full of race conditions. all access to the two volatile variables while the subshell is running needs to happen with SIGCHLD being blocked - the only function that gets it right is synchronize().
this is a deja-vu from the SIGWINCH episode - we're again left with the choice of using pselect() or the self-pipe trick, preferably again opting for the latter in expectation of using the glib event loop at some point (there is also forkfd() since linux 5.4).
a propos nothing, i found this while reading the code:
|
Just a note |
Issue on fish shell |
I'm updating this issue as it seems to be still reproducible with the latest mc (well, no wonder, not much has changed in our subshell interaction since then) and has become more prevalent with fish 4 as reported by @asl. I think the suggestion in fish-shell/fish-shell#6767 to use OSC-7 is a good one, but I'm afraid it won't solve the race problem, just probably lead to working directory desyncs instead of hangs, unless the races are found and fixed... or the subshell interaction is switched to an event loop, which might be a smaller and more self-contained project than going full on the event loop everywhere? @krobelus, it seems like you did something on the fish side of things almost 5 years ago, so if it's possible to get you interested here, I'd be happy to work with you. I'm also curious what @egmontkob would say about using OSC-7 instead of our own monkey business with PS1 hooks/emulation... /cc @olfway after migrating to GitHub :) |
Important
This issue was migrated from Trac:
olfway
(olfway@….com)I use mc 4.8.24 on mac os 10.15.3
fish shell, version 3.1.0
Sometimes, then I press enter to change directory mc just hangs.
Also, there is a zombie kill process after that
Backtrace from mc:
Backtrace from fish (part of):
The text was updated successfully, but these errors were encountered: