You are not logged in.

#1 2015-07-12 07:17:43

leniviy
Member
Registered: 2009-05-23
Posts: 177

Ctrl-c when typing command in bash makes terminal freeze

This started recently.
I connect to Arch with putty or cygwin ssh. When I start typing a command and then press Ctrl-c to clear it, sometimes the terminal just freezes: if I try to type again, the window flashes and I hear the bell sound.

Have to press Ctrl-c multiple times to unfreeze it.


Arch 64, xfce4

Offline

#2 2015-07-12 14:20:10

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: Ctrl-c when typing command in bash makes terminal freeze

Could you be a little more specific about the command you run that make the terminal freeze?


pkgs │ hacks │ cfg │ blag

Offline

#3 2015-07-12 14:40:43

leniviy
Member
Registered: 2009-05-23
Posts: 177

Re: Ctrl-c when typing command in bash makes terminal freeze

ayekat wrote:

Could you be a little more specific about the command you run that make the terminal freeze?

I don't run a command. I run bash shell, start typing a command. It doesn't matter what command.

Last edited by leniviy (2015-07-12 14:46:08)


Arch 64, xfce4

Offline

#4 2015-07-12 14:50:55

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: Ctrl-c when typing command in bash makes terminal freeze

Are you running a specific process or application at the time? Is it always the same one?

Also, in putty at least ctrl+s will freeze the screen.  Could you have hit it by accident?  Have you changed the configuration options at all?


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#5 2015-07-12 14:53:45

leniviy
Member
Registered: 2009-05-23
Posts: 177

Re: Ctrl-c when typing command in bash makes terminal freeze

loafer wrote:

Are you running a specific process or application at the time? Is it always the same one?

No.

loafer wrote:

Also, in putty at least ctrl+s will freeze the screen

I know.

loafer wrote:

Could you have hit it by accident?  Have you changed the configuration options at all?

No.

Last edited by leniviy (2015-07-12 15:00:02)


Arch 64, xfce4

Offline

#6 2015-07-12 15:07:37

leniviy
Member
Registered: 2009-05-23
Posts: 177

Re: Ctrl-c when typing command in bash makes terminal freeze

It looked like a terminal freeze, but at closer look it's a problem with bash prompt. When I press ctrl-c, bash sometimes fails to print '^C\n'


Arch 64, xfce4

Offline

#7 2015-07-12 15:27:50

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: Ctrl-c when typing command in bash makes terminal freeze

Does this only happen if you use use Cygwin/Putty, or does this also happen within other terminal emulators?
What happens if you run other shells (sh/dash, zsh, ...)?
Are you using some sort of terminal multiplexer (tmux, screen)?


pkgs │ hacks │ cfg │ blag

Offline

#8 2015-07-12 16:02:20

leniviy
Member
Registered: 2009-05-23
Posts: 177

Re: Ctrl-c when typing command in bash makes terminal freeze

ayekat wrote:

Does this only happen if you use use Cygwin/Putty, or does this also happen within other terminal emulators?

Switched to text console, typed `ssh localhost` and was able to reproduce too.

ayekat wrote:

What happens if you run other shells (sh/dash, zsh, ...)?

Reproduced with zsh. newline and the prompt not printed when I press Ctrl-c.

ayekat wrote:

Are you using some sort of terminal multiplexer (tmux, screen)?

no

Last edited by leniviy (2015-07-12 16:03:05)


Arch 64, xfce4

Offline

#9 2015-07-12 16:14:08

leniviy
Member
Registered: 2009-05-23
Posts: 177

Re: Ctrl-c when typing command in bash makes terminal freeze

Doing nothing for 7 seconds significantly increases the chance to reproduce.

Last edited by leniviy (2015-07-12 16:15:21)


Arch 64, xfce4

Offline

#10 2015-07-12 16:55:02

leniviy
Member
Registered: 2009-05-23
Posts: 177

Re: Ctrl-c when typing command in bash makes terminal freeze

strace shows that bash actually writes all needed characters, however, they do not appear in terminal:

     4.869517 --- SIGINT {si_signo=SIGINT, si_code=SI_KERNEL} ---
     0.000175 write(2, "^C", 2)         = 2
     0.000435 --- SIGINT {si_signo=SIGINT, si_code=SI_USER, si_pid=906, si_uid=1000} ---
     0.001069 write(2, "\n", 1)         = 1
     0.001041 write(2, "[il@vmarch ~]$ ", 15) = 15

Arch 64, xfce4

Offline

#11 2015-07-13 06:53:19

leniviy
Member
Registered: 2009-05-23
Posts: 177

Re: Ctrl-c when typing command in bash makes terminal freeze


Arch 64, xfce4

Offline

#12 2015-07-13 11:07:48

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: Ctrl-c when typing command in bash makes terminal freeze

What is your PS1?  Does changing the PS1 to something bland fix it (eg PS1='$ ')?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB