With gcc 4.1.x - gcc 4.4.x , on linux-2.6.x (many "x" versions tried over the last few years) , whenever gcc tries to output to a file on a filesystem that does not contain sufficient disk space, the linux kernel silently locks up - I'm not sure if this is a kernel bug or a gcc bug, but a bug it definitely is. I thought it may be because I tend to run a "bleading edge" unstable kernel, but it also happens on the last three stable versions ( 2.6.33, 2.6.32.12, 2.6.32.1 ) with gcc 4.4.2, 4.4.1, 4.3.4, 4.3.3, 4.2.4, 4.2.3, 4.2.1, 4.1.2, 4.1.1, 3.4.6 . There is no kernel crash report or log message, just a total system freeze, necessitating a hard reboot (with potential filesytem damage) when this occurs . This has happened to me too many times when a gcc compilation is the only activity on the system for there to be any other possible cause .
I've now enabled verbose kernel lock debugging, and will post any relevant results here if it happens again. I think gcc should be detecting the case when there is insufficient disk space to complete a write(2) better, and should exit gracefully in that case. It appears to be retrying failed write(2)s infinitely ; but even that should not cause the kernel to hang . Any ideas? -- Summary: linux hard lock-up when gcc output file is on filesystem with insufficient disk space Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jason dot vas dot dias at gmail dot com GCC build triplet: x86_64-linux-gnu GCC host triplet: x86_64-linux-gnu GCC target triplet: x86_64-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43955