Text invisible after concurrent ffmpeg invocations

Bug #1756952 reported by Paul Miller on 2018-03-19
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-terminal (Ubuntu)

Bug Description

Repro steps:

Run the attached script in gnome-terminal. (Requires Python and ffmpeg.) After the script finishes, try typing in the same terminal. No text will appear. (The repro is not 100% reliable, so you may have to try the script multiple times.)

The script spawns a couple of concurrent ffmpeg processes. Their stdin must be connected to the terminal for the bug to repro. I've tried other programs in place of ffmpeg which also use stdin, but haven't found any other repro.

Observed behavior:

Typed text doesn't appear after running the script. However, the terminal still seems to receive commands. Ctrl+C still works, but doesn't fix the problem. I have to restart gnome-terminal to fix it.

Expected behavior:

Text input should work normally after the script exits.


Ubuntu 14.04.1 LTS
gnome-terminal 3.26.0
Python 3.5.3
ffmpeg 3.4.1-1

I also repro'd in gnome-terminal under Arch Linux. (But the Gnome bug tracker said to file with Ubuntu first, so here we are.) I wasn't able to repro when using xterm in place of gnome-terminal.

Paul Miller (paulmiller) wrote :
Egmont Koblinger (egmont-gmail) wrote :

Also reproducible in xterm and various other terminal emulators, at least sometimes (not always). So not a gnome-terminal issue.

This is a pretty common phenomenon if a utility doesn't properly restore the terminal (stty?) settings. Blindly typing and executing "reset" should fix it. Not sure what exactly is going on, and if there's anything bash could do to clean up, zsh doesn't seem to suffer from this problem.

Paul Miller (paulmiller) wrote :

I guess we should close this, then?

"reset" works for me. Increasing the amount of concurrency (the "range" values in the script) seems to increase the repro chance. I guess it's some race condition in how ffmpeg cleans up after itself.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments