FS#45629 - [linux] Data written to /dev/pts/x inside SIGINT handler is randomly discarded
Attached to Project:
Arch Linux
Opened by ilya (leniviy) - Sunday, 12 July 2015, 19:50 GMT
Last edited by Eli Schwartz (eschwartz) - Monday, 02 October 2017, 22:25 GMT
Opened by ilya (leniviy) - Sunday, 12 July 2015, 19:50 GMT
Last edited by Eli Schwartz (eschwartz) - Monday, 02 October 2017, 22:25 GMT
|
Details
Description:
Have `Archlinux64` on `VirtualBox` Here's my SIGINT trap: trap 'echo x' INT If I run this command inside an `ssh` session and press Ctrl-c multiple times, only a few times something appears in terminal. Here's a more complex example: [il@vmarch ~]$ n=0; trap 'echo " $n'\''th INT"; n=$((n+1))' INT [il@vmarch ~]$ ^C 0'th INT [il@vmarch ~]$ ^C 7'th INT [il@vmarch ~]$ ^C 8'th INT [il@vmarch ~]$ ^C 9'th INT [il@vmarch ~]$ ^C 18'th INT [il@vmarch ~]$ ^C 21'th INT Only pressing Ctrl-c has such effect. Sending `SIGINT` explicitly does not block the writing. Reproducible in multiple terminal emulators. Never occurs in text console (`/dev/tty1`). Similar symptoms in `zsh` and `dash`. Doing nothing for 5-10 seconds before pressing Ctrl-c increases the chance of data being discarded. $ uname -a Linux vmarch.lan 4.0.4-2-ARCH #1 SMP PREEMPT Fri May 22 03:05:23 UTC 2015 x86_64 GNU/Linux Additional info: * package version(s) # pacman -Q linux linux 4.0.7-2 * config and/or log files etc. Steps to reproduce: download vbox: https://drive.google.com/file/d/0B40Hp1Tx6I6eUVVZUnBydXNjR1U/view?usp=sharing login as root type: ~/test.sh or Install Arch on Vbox. num cpus: 1, ram: 4096. type: n=0; trap 'echo " $n'\''th INT"; n=$((n+1))' INT Start pressing Ctrl-c |
This task depends upon
Closed by Eli Schwartz (eschwartz)
Monday, 02 October 2017, 22:25 GMT
Reason for closing: Fixed
Additional comments about closing: OP no longer has this problem with the current kernel
Monday, 02 October 2017, 22:25 GMT
Reason for closing: Fixed
Additional comments about closing: OP no longer has this problem with the current kernel
https://bbs.archlinux.org/viewtopic.php?pid=1547539#p1547539
Is this issue still valid for you?