Error message "Your computer does not have enough free memory" when core dump or stacktrace failed to be created is misleading

Bug #718635 reported by Jean-Baptiste Lallement
128
This bug affects 26 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Binary package hint: apport

On Unity fully updated, when I login there is a X crash (attached), an apport dialog is displayed but complains about:
---
Sorry, the program "Xorg" closed unexpectedly

Your computer does not have enough free memory to automatically analyze the problem and send a report to the developers.
---

You can only close and the report is canceled.

Of course there's enough memory

This message is displayed when the core dump or stacktrace can't be attached to the report. This should be changed to something closer to the real issue.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: apport 1.17.2-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.38-3.30-generic 2.6.38-rc4
Uname: Linux 2.6.38-3-generic i686
ApportLog:
 ERROR: apport (pid 8213) Mon Feb 14 10:17:49 2011: called for pid 741, signal 6
 ERROR: apport (pid 8213) Mon Feb 14 10:17:49 2011: executable: /usr/bin/Xorg (command line "/usr/bin/X :0 -br -verbose -auth /var/run/gdm/auth-for-gdm-ics1IG/database -nolisten tcp vt7")
Architecture: i386
Date: Mon Feb 14 10:54:38 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha i386 (20110209)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_US.UTF-8:en
 LANG=en_US.UTF-8
 LC_MESSAGES=en_AG.utf8
 SHELL=/bin/bash
SourcePackage: apport

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :

Might this be that the core dump file size exceeded the default value as set in /etc/default/apport?

# set maximum core dump file size (default: 209715200 bytes == 200 MB)
maxsize=209715200

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Looking at the code you're certainly right but the cause is that the core file is not created because of the limit set for root to 100MB in /etc/security/limits.conf

But in this case the error message is misleading.

summary: - apport says that "Your computer does not have enough free memory" to
- proceed with the report but it does
+ Error message "Your computer does not have enough free memory" when core
+ dump or stacktrace failed to be created is misleading
description: updated
Changed in apport (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Kees Cook (kees) wrote :

I think there is too much speculation happening in this bug report. :)

- /etc/default/apport's maxsize value isn't used anywhere since commit 1195 (and should be removed from this config file -- this is a separate issue, bug 719564).
- /etc/security/limits.conf is only used by PAM. X running as root from /etc/init (gdm) will not end up with these rlimits applied (and, regardless, coredump limits are ignored for the /proc/sys/kernel/core_pattern handler except when _not_ catching the crash (i.e. coredump writing pass-through)).

The error message given here relates strictly to size of the coredump vs available physical memory. If the coredump is larger than 3/4 of available memory, it will not attach it to the crash report, so this error message is accurate.

So, the question remains: how large is the X coredump, and how much free memory do you have?

As an example, on my system, I could catch an X crash. I have about 5GB of memory available, and X's memory footprint is about 128MB:

$ echo $(cat /proc/meminfo | egrep '^(MemFree|Cached|Writeback):' | awk '{print $2}') - + p | dc
4993428
$ grep ^VmSize /proc/$(pidof X)/status
VmSize: 128796 kB

Changed in apport (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Here is what I get on this system:

$ echo $( cat /proc/meminfo | egrep '^(MemFree|Cached|Writeback):' |awk '{print $2}') - + p | dc
1835104
$ grep ^VmSize /proc/$( pidof X)/status
VmSize: 18640 kB

Once again the crash occurred immediately after login, without any special process running other that those launched by a default Unity session.

Revision history for this message
penalvch (penalvch) wrote :

This bug is confirmed in Ubuntu 11.04, during a LibreOffice Draw crash.

Changed in apport (Ubuntu):
status: Incomplete → Confirmed
tags: added: oneiric
Revision history for this message
Chris Bainbridge (chris-bainbridge) wrote :

Running Oneiric I have seen several crashes like this:

'Sorry, the program "gnome-panel" closed unexpectedly Your computer does not have enough free memory to automatically analyse the problem and send a report to the developers.'

# echo $(cat /proc/meminfo | egrep '^(MemFree|Cached|Writeback):' | awk '{print $2}') - + p | dc
2807408
# grep ^VmSize /proc/$(pidof X)/status
VmSize: 193676 kB

Revision history for this message
Michael Vorburger (mike-vorburger) wrote :

I'm hitting this too, on a 12.04 with an OpenJDK v7 64-bit crash... attaching my _usr_lib_jvm_java-7-openjdk-amd64_jre_bin_java.1000.crash if that is of any use to you guys? If I do /usr/share/apport/apport-gtk _usr_lib_jvm_java-7-openjdk-amd64_jre_bin_java.1000.crash it shows that "Sorry, the program "java" closed unexpectedly. Your computer does not have enough free memory to automatically analyze the problem and send a report to the developers." which others also reported regularly seeing (I've just duplicated two other bugs to this one).

Is any of the above a suggested workaround or solution? Based on latest comment, ignore the maxsize in /etc/default/apport (on 12.04 certainly)... what should one put in /etc/security/limits.conf ?!

Revision history for this message
Harald Rudell (harald-rudell) wrote :

12.10 has it
apport 2.6.1-0ubuntu10

penalvch (penalvch)
tags: added: precise quantal
Revision history for this message
penalvch (penalvch) wrote :

Kees Cook, just to clarify your comments in https://bugs.launchpad.net/ubuntu/+source/apport/+bug/718635/comments/4 , as a potential WORKAROUND, would increasing the swap size to a large enough value, where the core dump size > (3/4) * (physical+swap) allow one to avoid this problem, or is this a hard limit on physical memory?

Changed in apport (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
penalvch (penalvch) wrote :

Screenshot of problem from Vivid.

Revision history for this message
penalvch (penalvch) wrote :

Marking Medium as no advised WORKAROUND and reproducible in Vivid.

Changed in apport (Ubuntu):
importance: Low → Medium
tags: added: vivid
Revision history for this message
Simon Reed (xubuntu-o) wrote :

I got this running warzone2100 (at the very end of the campaign, BTW). I am using 4.5GB of my 7.8GB available and using 120KB of my 16GB swap file.

Xubuntu 14.04

Linux simonX64 3.13.0-46-generic #77-Ubuntu SMP Mon Mar 2 18:23:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

(Incidentally, I re-loaded the last saved game, finished the campaign again and there was no crash.)

tags: added: yakkety
tags: added: zesty
Revision history for this message
zzarko (zzarko-gmail) wrote :

I'm seeing this message ("Your computer does not have enough free memory to automatically analyze the problem and send a report to the developers") almost every time I do an update (14.04, 64bit), although I have gigabytes of free space on system partition and in RAM. Last couple of times it was caused by:
Sorry, the program "gtk-update-icon-cache-3.0" closed unexpectedly

Revision history for this message
hackel (hackel) wrote :

I'm still seeing this problem trying to report a crash of gnome-shell on Ubuntu 17.10 (wayland). I even tried adding an 8GB swapfile, but it didn't help.
228K /var/crash/_usr_bin_gnome-shell.1000.crash
I'm showing 5.8G of physical RAM free, plus 15G swap.

tags: added: bionic
Revision history for this message
Lyubomir (mystiquewolf) wrote :

I too have this problem. I have 9.5 GBs of SWAP

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.