Bug #6533
openBash script generates "interrupted system call" events on tty window resize
0%
Description
When pasted into an interactive bash shell in a remote tty (ssh/putty) on OI151a7, the attached script generates a
"-bash: echo: write error: Interrupted system call"
event when the window is resized.
Function A simply outputs zero (in hex); function B fills a data file with garbage and then loops infinitely reads the data file one line at a time, passing the line to a shell that reads it, calls A and then outputs 0 to /dev/null using printf. Calling function B and then resizing the terminal window (i.e sending a SIGWINCH signal to the process) causes the "Interrupted system call".
Removing almost any element of the script causes the behaviour to change, suggesting a race condition (which might mean that it may not occur on all systems).
Blocking SIGWINCH events using trap "" 20 inhibits the behaviour.
This is a cut-down version of a real script that exhibited this behaviour, reduced to the point just before the behaviour stops occuring.
Files
Updated by Granville Moore about 7 years ago
Just to clarify, when this interrupted system call occurs in a non-trivial example, any data that should have been written by the interrupted echo statement is lost.
Updated by Nikola M. about 7 years ago
151a7 is older dev release but, it is neded to report bugss in newest possible OI.
Please confirm it it behaves the same in newest /dev , 151a9 ,
also check to see how it behaves in latest updated OI Hipster rolling release (/hipster-2015, dlc.openindiana.org).
Could be nice excuse to test upgrading from dev to hipster or install hipster in Virtualbox and zfs send it to new emptied Boot Eenvironment.
Updated by Nikola M. almost 7 years ago
Newest hipster change publisher address back to pkg.openindiana.org/hipster ,
so running newestOI hipster is needed to test if bug is still happening for you.
To change it, do
pkg set-publisher -G http://pkg.openindiana.org/hipster-2015 -g http://pkg.openindiana.org/hipster openindiana.org
(http://openindiana.org/pipermail/oi-dev/2016-April/004313.html)