Bug 84401

Summary: Misleading error message when running out of RAM
Product: gcc Reporter: sergey.ignatchenko
Component: c++Assignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: marxin, webrown.cpp
Priority: P3    
Version: unknown   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:

Description sergey.ignatchenko 2018-02-15 08:29:50 UTC
Whenever GCC consumes too much RAM (="the box doesn't have enough RAM to compile whatever-is-necessary-to-compile"), GCC is likely to be sent SIGKILL; it leads to an error message along the following lines:

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.

This message is (a) not really helpful for the developer, and (b) causes quite a few non-bugs to be submitted (such as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34882, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36665, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61860 , https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30615 , https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71671 , https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80434 , 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30615, etc. ). 

While there is no _guarantee_ that SIGKILL is caused by lack of RAM, this seems to be the most likely case by far, so simply adjusting the message (just for SIGKILL) to the following, would improve quality-of-life both for devs-using-GCC (who will know what they should do right away), and for GCC devs (who won't need to deal with non-bug reports):

g++: internal compiler error: Killed (program cc1plus)
This error is often caused by lack of RAM on your computer, PLEASE CHECK THAT YOU DIDN'T RAN OUT OF RAM FIRST. 
If it is not the case, please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
Comment 1 Martin Liška 2018-02-21 08:55:00 UTC
Should be fixed starting with r251104.