Fisher: `fisher update` hangs forever due to suspended curl

Created on 11 Oct 2017  ·  22Comments  ·  Source: jorgebucaran/fisher

If I run fisher update, it spins forever. Looking at my terminal info, it appears there's a command fish -c curl --max-time 5 -sS 'https://raw.githubusercontent.com/fisherman/fisherman/master/fisher.fish?1507689886' > /Users/me/.config/fish/functions/fisher.fish.1507689886 that's suspended. If I send this SIGCONT the update continues (and if I was updating a single plugin it finishes, otherwise it just spawns more suspended curls).

This is with fisherman version 2.13.2 and fish version 2.6.0-676-ga136bbda in Terminal.app on macOS 10.13 (17A405)

bug

All 22 comments

@kballard Sorry, I can't reproduce this.

screen shot 2017-10-11 at 12 38 01

Hmm, it doesn't reproduce for me on macOS 10.12.6 (16G29) and fish 2.6.0 (from Homebrew). But it happens every time on my iMac with the previously-listed versions.

@kballard Come to think about it, same fisherman, OS and fish versions doesn't guarantee a lot considering how much fisherman relies on concurrency and timeouts for installs / updates.

I wonder if allowing users to tweak --max-time 5 could help prevent similar issues on a system-per-system basis.

I don't think --max-time 5 is relevant. The whole process is literally suspended. As if it received SIGSTOP.

screen shot 2017-10-10 at 11 24 29 pm

I still haven't updated to macOS 10.13, but when I do I hope I bump into this.

I can reproduce this issue. 👎 In the terminal title, I see sleep 0.05 when I do fisher up. I am actually running 10.12.6. After doing ^C, ps spits out:

79732 ttys003    0:00.00 fish -c curl --max-time 5 -sS 'https://raw.githubusercontent.com/fisherman/fisherman/master/fisher.fish?1507819737' > /Users/amirraminfar/.config/fish/functions/fisher.fish.1507819737
84469 ttys003    0:00.00 fish -c curl --max-time 5 -sS 'https://raw.githubusercontent.com/fisherman/fisherman/master/fisher.fish?1507819835' > /Users/amirraminfar/.config/fish/functions/fisher.fish.1507819835
88069 ttys003    0:00.00 fish -c curl --max-time 5 -sS 'https://raw.githubusercontent.com/fisherman/fisherman/master/fisher.fish?1507819948' > /Users/amirraminfar/.config/fish/functions/fisher.fish.1507819948

Not sure what else to try?

@amir20 Relieved in a way it's not the OS version, but still not much I can do to help if I can't repro it. You'll need to debug the script to find out and if you do please let everyone know.

@JorgeBucaran try installing latest HEAD for fish. brew reinstall fish --HEAD. I am willing to bet that is the problem. I haven't actually tried to debug yet. But if I copy and paste the command from above I get fish: unrecognized option--max-time'`.

Instead, this works fish -c "curl --max-time 5 -sS 'https://raw.githubusercontent.com/fisherman/fisherman/master/fisher.fish?1507821008'".

After work today, I'll try to update the fisher script to see if that fixes it. But that's what I have found so far.

Latest HEAD is probably it. I just installed from source on my 10.12 laptop and the problem started happening.

So, last fish broke or changed something that causes the breaking. Maybe @faho could comment on this? :)

I just built a copy of fish 2.6.0 from source and the issue still occurs.

Well, I suppose that the issue could be with the .fish initialization files on disk, because I didn't actually install the 2.6.0, I just ran it in-place.

What could have possibly changed in HEAD? 🤔

This appears to be a problem with fish's job control (of which there is no shortage) - the process receives SIGSTOP, because it's not in the foreground process group yet tries to access the terminal.

The obvious commit that could have broken this is https://github.com/fish-shell/fish-shell/commit/55b3c45f95ba09efa4b9eaad8ec49256a7435823.

@kballard: Can you try to revert that one?

Alternatively, it could be one of the commits in https://github.com/fish-shell/fish-shell/pull/4268, but that's a whole bunch.

Well, I suppose that the issue could be with the .fish initialization files on disk, because I didn't actually install the 2.6.0, I just ran it in-place.

@kballard: Note that that still runs your installed fish with fish -c. So if the issue is in that sub-fish, you wouldn't see if it's any different in 2.6.0. To test that, you'd need to adjust $PATH to put 2.6.0 first or you'd need to modify that line to call 2.6.0.

I can't seem to reproduce this on linux (don't have a mac). I installed fisher, some plugins (bass and fzf) and ran fisher update. That spins for a while, prints a curl error about resolving timing out after 5XXX milliseconds and then a bunch of "OK" lines. No curl process is left hanging. $FISH_VERSION is 2.6.0-688-g0a129475.

Note that that still runs your installed fish with fish -c.

Oh dammit. Thanks for pointing that out. I'll test again.

EDIT: Yeah, mucking with PATH causes 2.6.0 to start working.

Ok, strangely enough, the culprit is fish-shell/fish-shell@93dad29ec670ffdcbb99aee082b2091b84d57e48 (set COLUMNS and LINES earlier).

Filed as fish-shell/fish-shell#4477

@kballard @faho Thank you for filing the issue here, taking the time to understand what was going on and filing it upstream! 👍

Fixed upstream - thanks!

Thanks @zanchey! 👍

@kballard Would you do the honors? :)

🎉

Was this page helpful?
0 / 5 - 0 ratings