GNOME Bugzilla – Bug 629457
Screen switch away stops background app output
Last modified: 2014-01-22 19:36:07 UTC
Created attachment 170098 [details] [review] Fix. Sometimes when you switch from the screen with vte window to a different screen the application should continue its output stream to the (non-visible) window. Sometimes it does not and the applications keeps stopped. Reproducer: gnome-terminal --disable-factory -e /tmp/termlock &>/tmp/out /tmp/termlock is: #! /bin/sh i=0;while :;do echo \ ---------------------------------------------$i;i=$[$i+1];done Always switch away from the screen with this window and run: strace -p <pid of termlock> to see if it still writes there. Sometimes its write() syscall hangs. Debug (/tmp/out) tail in this hanging case (using VTE_DEBUG=all): [...] -].read 8176/4096 bytes, again? no, active? yes removed poll of vte_terminal_io_read Visibility (unobscured -> fully-obscured). change visibility: unobscured -> fully-obscured. Removing terminal from active list Removing update timeout The fix has been tested and makes sense only together with the other fix, going to link the two Bugs together.
Verified on VTE GIT f1676fbe3e91a6e887abf254723b57e841fad0bb: Tue Sep 7
I need to read the active-handling code and fully understand it before I can fix this. It does look very racy though.
I can no longer reproduce it. It has been probably fixed in the meantime.