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

mintty 2.9.3 stalls/crashes on output while selecting #816

Closed
rmzg opened this issue Nov 5, 2018 · 12 comments
Closed

mintty 2.9.3 stalls/crashes on output while selecting #816

rmzg opened this issue Nov 5, 2018 · 12 comments
Labels

Comments

@rmzg
Copy link

rmzg commented Nov 5, 2018

Version: mintty 2.9.3 (x86_64-pc-cygwin)
Windows 10

Setup:

mintty -> cygwin bash -> ssh -> linux -> tmux -> mysql CLI output

Given the above system if I rapidly click and highlight text from the mysql cli output, mintty will crash by disappearing completely from the screen.

@mintty
Copy link
Owner

mintty commented Nov 5, 2018

I happened to face a similar effect just today; however, a reproducible and minimal test case is always a good idea to assess an issue. Can you reproduce without tmux/ssh, with some simpler creation of output? Can you describe the way you apply selection more precisely?

@rmzg
Copy link
Author

rmzg commented Nov 5, 2018

Sorry, wish I had time to create a better test case.

image

This is how the window looked when it stopped responding (windows greyed it out then popped up the "not responding" dialog.

To cause this all I did was put the mouse in the middle of the window and click and drag a bunch of times in a row.

Edit:
If I disable 'selection copies' then I can't seem to cause a crash.
Edit 2:
Just kidding, crashed 2 seconds after I said that.

@rmzg
Copy link
Author

rmzg commented Nov 5, 2018

I'm fairly confident the problem is unique to tmux, I dont think I can reproduce without being attached to a tmux session.

@mintty
Copy link
Owner

mintty commented Nov 5, 2018

This is inconsistent information. So does the window get grayed (stall) or disappear from the screen (crash)?

@rmzg
Copy link
Author

rmzg commented Nov 5, 2018

Usually it crashes and disappears, this time it stalled out. I can't actually explain why one or the other happens.

@mintty
Copy link
Owner

mintty commented Nov 5, 2018

Test case: while true; do sleep 1; date; ls /etc; done (no ssh or tmux needed). Select a few lines, release mouse, click again.
It's caused by the patches for #799 (2.9.2). Details to be analysed.

@rmzg
Copy link
Author

rmzg commented Nov 5, 2018

Great. I downgraded to 2.9.1 via the cygwin installer, doesn't crash under your test case.

On a related note, as I'm sure you've noticed, when mintty explodes it tends to leave behind bash/ssh processes, any chance of getting those cleaned up?

@mintty
Copy link
Owner

mintty commented Nov 5, 2018

Mintty is not supposed to "explode". This issue is a serious bug that shall be fixed soon.
If mintty is terminated regularly, it kills its child process (normally a shell).

@root42
Copy link

root42 commented Nov 6, 2018

I have the same problem. Also using tmux plus ssh inside tmux. With pure tmux it does not seem to crash. Will also downgrade to 2.9.1 for the time being.

Update: Downgrade indeed provides successful workaround.

@kgraefe
Copy link

kgraefe commented Nov 6, 2018

I think I have the same issue with mintty 2.9.3 (x86_64-pc-cygwin) on Windows 10.

Thanks to tmux I can reproduce the situation: unbenannt

I try to copy the snippet time.clock() - start while I have a candump running on the right pane capturing 1 packet every 1.88 seconds. When the candump changes while I am selecting the text (having the mouse button pressed), mintty crashes or stalls (both happened). When I select the text within the timeframe between two packets, it works.

@mintty mintty changed the title mintty 2.9.3 (x86_64-pc-cygwin) crashes when select to clipboard is enabled mintty 2.9.3 stalls/crashes on output during active selection Nov 6, 2018
@mintty mintty changed the title mintty 2.9.3 stalls/crashes on output during active selection mintty 2.9.3 stalls/crashes on output while selecting Nov 6, 2018
@mintty
Copy link
Owner

mintty commented Nov 9, 2018

The error is an embarassing wrong calculation of the size of memory allocation for the "suspend output while selecting" buffer.
I'll fix that and make the buffer size configurable, including 0 which will disable the buffering.

@mintty
Copy link
Owner

mintty commented Nov 10, 2018

Released 2.9.4.

@mintty mintty closed this as completed Nov 10, 2018
@mintty mintty added the bug label Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants