Apport doesn't log when a core dump is ignored because of the limit

Bug #1254804 reported by luca
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

When ulimit -c is 0, apport doesn't report any reason not to skip the dumping. For applications that are not packaged, the last message in /var/log/apport.log is:
ERROR: apport (pid 4415) Mon Nov 25 17:52:11 2013: executable does not belong to a package, ignoring

This makes very confusing diagnosing why the core was not generated, and is very hard to track down how the particular ulimit of the application was configured, so it would be better to add a message telling the core dump won't be generated because the limit is 0.

Basically the suggested change is:

     if limit == '0':
+ error_log('skipping core dump writing, current limit is 0')
         return

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: apport 2.0.1-0ubuntu17.6 [modified: usr/share/apport/apport]
ProcVersionSignature: Ubuntu 3.5.0-41.64~precise1-generic 3.5.7.21
Uname: Linux 3.5.0-41-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.6
Architecture: amd64
CrashReports:
 664:1000:133:0:2013-11-25 11:26:18.943268131 +0100:2013-11-25 11:26:18.943268131 +0100:/var/crash/_usr_bin_pidgin.1000.upload
 640:1000:133:9780109:2013-11-25 11:26:16.687254000 +0100:2013-11-25 11:26:19.963279496 +0100:/var/crash/_usr_bin_pidgin.1000.crash
 600:122:133:0:2013-11-25 18:11:42.092417577 +0100:2013-10-16 17:18:00.112172935 +0200:/var/crash/_usr_bin_pidgin.1000.uploaded
Date: Mon Nov 25 18:16:02 2013
MarkForUpload: True
PackageArchitecture: all
SourcePackage: apport
UpgradeStatus: Upgraded to precise on 2012-05-24 (550 days ago)

Revision history for this message
luca (llucax) wrote :
Revision history for this message
Quinn Balazs (qbalazs) wrote :

That would be nice to have built in. Any application that generates it's own crash report should state why a core dump wasn't created, but it isn't part of apport functionality to report why a core wasn't generated.

summary: - Apport doesn't log when a core dump is ignored because of the limit
+ [wishlist] Apport doesn't log when a core dump is ignored because of the
+ limit
Revision history for this message
luca (llucax) wrote : Re: [wishlist] Apport doesn't log when a core dump is ignored because of the limit

Thanks for the quick reply.

I'm not talking about any "crash report", I'm talking about development, when trying locally something that you just compiled. Also, is apport the one deciding not to generate the core (of course when the limit is 0 that is expected and correct behaviour, but nothing the application can, or should deal with).

Also, even when maybe is not part of apport functionality to report why a core wasn't generated, it is already doing it, as is obviously extremely convenient for diagnosing, and because of how these diagnose messages are generated, it makes very hard to diagnose the ulimit problem (as it looks like the core dump wasn't generated because it's not a packaged app). I even was about to report a bug about apport not generating cores for 3rd party programs because of this, but fortunately I went through the source code and found the limit could be the reason (and it was).

Finally, is a one line change, is a completely unintrusive change and in line with the other diagnose messages generated, and it makes a huge difference when trying to debug something you are developing, so it would be very appreciated if you could add this small change.

Thanks!

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apport (Ubuntu):
status: New → Confirmed
Revision history for this message
Tjd (tjd) wrote :

I got burned by this, too.

It is compounded by the fact that "Segmentation fault (core dumped)" is written to stderr, which actually just means that the dump has been collected and passed on to apport.

Since it is apport that is parsing the ulimit value and deciding whether or not to write out the core file, luca's suggestion seems appropriate and would have been helpful to me.

Changed in apport (Ubuntu):
importance: Undecided → Wishlist
summary: - [wishlist] Apport doesn't log when a core dump is ignored because of the
- limit
+ Apport doesn't log when a core dump is ignored because of the limit
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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