Bug 84401 - Misleading error message when running out of RAM
Summary: Misleading error message when running out of RAM
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-15 08:29 UTC by sergey.ignatchenko
Modified: 2018-02-21 08:55 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.