Skip to content

slow midnight commander and broken fish subshell in fish 3.2.0 #7769

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

Closed
chrysos349 opened this issue Mar 3, 2021 · 7 comments
Closed

slow midnight commander and broken fish subshell in fish 3.2.0 #7769

chrysos349 opened this issue Mar 3, 2021 · 7 comments
Labels
regression Something that used to work, but was broken, especially between releases
Milestone

Comments

@chrysos349
Copy link

mc 4.8.25 (or 4.8.26)
fish 3.2.0

With fish 3.2.0 set as a default shell, upon launch midnight commander hangs for about 10 seconds and has a broken subshell.
If launched with --nosubshell (or -u), the problem disappears in mc.
However, the fish subshell worked fine in fish 3.1.2, and mc launched immediately.

@olfway
Copy link

olfway commented Mar 3, 2021

Have the same issue on mac os catalina with mc and fish from homebrew

mc 4.8.26

@ridiculousfish
Copy link
Member

ridiculousfish commented Mar 3, 2021

Thank you for filing this bug. Please do share the information requested in the issue template. The OS and terminal are crucial information.

When I try Midnight Commander 4.8.26 on macOS 11.2.1 with iTerm2 3.4.0, I see reproducible hangs on startup with fish 3.2.0, 3.1.2, and 3.0.2, and also bash 5.1, and zsh 5.8.0.2. I do not see any hangs on Linux. Scratch that, what matters is your $SHELL env value, not what shell is actually running...bleh.

My guess is that this is mc injecting weird commands into fish. mc attempts to detect your shell, and if it's fish, tries to echo to weird file descriptors; this is now an error in fish; maybe we have to try to support that somehow.

@ridiculousfish ridiculousfish added this to the fish 3.2.1 milestone Mar 3, 2021
@olfway
Copy link

olfway commented Mar 3, 2021

I see this issue with fish 3.2.0 and it works fine in fish 3.1.2 (both from homebrew)

mc 4.8.26 (homebrew)
Mac OS 10.15.7
iTerm2 3.4.4

@chrysos349
Copy link
Author

chrysos349 commented Mar 3, 2021

I forgot to say in my case this bug happens on Linux with fish 3.2.0 ONLY if fish shell is set as a default shell.
fish 3.1.2 worked fine.

I tried these configurations:

  1. Void Linux with xfce4-terminal 0.8.10,
  2. Void Linux with Konsole 20.12.2,
  3. Kubuntu 20.10 with Konsole 20.08.2

@faho
Copy link
Member

faho commented Mar 3, 2021

I would imagine just reverting 11a373f should work for the time being? I think mc opens those fds so they should be safe to use (and not some of our internal fds)?

Maybe just error out when the fd is a fish internal one?

@faho faho added the regression Something that used to work, but was broken, especially between releases label Mar 3, 2021
@ridiculousfish
Copy link
Member

ridiculousfish commented Mar 3, 2021

Yeah I think we should just revert 11a373f. I thought redirecting to internal fds was useless, but I didn't consider fds that were inherited; on reflection I think mc's usage here makes sense.

@faho faho closed this as completed in c96a07d Mar 3, 2021
@faho
Copy link
Member

faho commented Mar 3, 2021

Alright, reverted.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
regression Something that used to work, but was broken, especially between releases
Projects
None yet
Development

No branches or pull requests

4 participants