I have been reading about apport and its usage for a week by now. But could not understand the below things.


I have developed an application and packaged it. And its name is MyApp.deb. The binary package name is MyApp .The application is installed in the path /opt/myapplication/bin/MyApp.


  1. When my application crashes, I want to be able to collect core dump.
  2. On each subsequent crash, it has to create a new crash, but not overwriting the existing one. Something like auto renaming with the current time stamp, etc would help me.
  3. When I install my application on a customer machine, my installer must not modify his system wide parameters. Say for example, I must not change the pattern of his core file generation, because the user/customer might hate my application as I would change his system parameters without his consent.
  4. I am ok with the path of core file generation. Either current directory or /var/crash

Things that I have explored till now:

Apport is a nice utility which enables core file generations. Using /proc/sys/kernel/core_pattern I can format core files. This provides flexibility to redirect the core files to a predefined directory, name core files with pid, file path pattern appended or prep-ended to it,etc.. For non Ubuntu packages, I have to write hooks to generate core dumps (reports). Apport after collecting the report it will upload.

Things that I do not understand:

  1. Is Apport the one I must be looking at?? I mean does it suffice my purpose? Or should I be looking at something else?
  2. What kind of package does my application fall under? Do I call it non-ubuntu? 3rd part? what is it? I see different terminologies in documents?
  3. As I mentioned, MyApp runs from /opt/myapplication/bin/MyApp, so where will the core files be generated? Current dir or /var/crash? Does Apport detect crashes trigerred from /opt? Does it interpret it?
  4. Important question: If I have developed the application and if Apport uploads the report to Ubuntu repositories, it does not make sense. So how can I tell Apport to send the report to me.
  5. I get this error: executable does not belong to a package, ignoring. So what am I doing wrong?
  6. For apport to recognise my package, do I need to make it a source package? Is it mandatory? I just want to create a binary package?
  7. I also saw somewhere in the documents that Apport recognises:
    1. Ubuntu packages or
    2. Launchpad applications but my application is neither of these. So how does Apport help me in the current scenario?
  • One of the Apport's limitation right now -- It has to be a package in ubuntu repository or at least a project on Launchpad. Is the latter an option for you?
    – jokerdino
    Feb 27, 2013 at 15:17
  • Thanks for the timely reply and answering with clarity for my lengthy question. BTW, I missed to mention in my previous post, that my application is proprietary. We are planning to host our application on ubuntu repositories. But that may be few months from now. Till then I have to manage core files manually.
    – Sandeep
    Feb 28, 2013 at 6:15
  • What language is the application written in? Also checkout a class conducted for writing Apport package hooks.
    – jokerdino
    Feb 28, 2013 at 6:20
  • App written in C++. The following lines from the link leaves me confused "< openweek4> QUESTION: will apport hooks work with 3rd party applications? openweek4: I'm actually really not certain about that question. If you look at the ubuntuone-client hook - bugs get reported to Launchpad but about the ubuntuone project. So it might very well be possible. However, apport would have to be able to communicate with the appropriate bug tracking system."
    – Sandeep
    Feb 28, 2013 at 7:41
  • The author says, it might be possible for 3rd party applications to make use of apport to get reports as long as a communication is established between apport and the 3rd paty applications' bug tracking system. How can this be achieved? If this can be achieved, then I need not be waiting for my application to get registered with ubuntu repo or launchpad.
    – Sandeep
    Feb 28, 2013 at 7:42

1 Answer 1

  1. It looks close, but might not be what you need. Apport automatically changes /proc/sys/kernel/core_pattern. So if that can't be changed, you're pretty much out of luck. On the other hand, apport is in the default Ubuntu install now, so practically everyone using Ubuntu already has that parameter changed by it. I'm also not aware of any way to tell apport to keep more than the most recent crash from a particular app, but as long as each crash is uploaded, that's not an issue.
  2. I'd refer to it as third-party.
  3. Apport supports executables installed in /opt. You will need to provide a hook in /opt/path/to/your/app/share/apport/package-hooks.
  4. You can set a custom crash database in the package-hook for your package. But if your crash database doesn't act like debbugs or launchpad, you will also need to create a custom crash database connector implementation, which doesn't look like it can be done without installing a python file outside of /opt.
  5. The executable needs to be installed by dpkg, which means you need to package it in a .deb file.
  6. You have to create a source package in order to create a binary package, because binary packages are created from source packages. You do not need to distribute the source package.
  7. Apport works with anything packaged as a .deb file.
  • This looks like it could be a very useful answer, but it leaves several gaps in the explanation: What does "provide a hook" entail? What does "act like debbugs or launchpad" mean exactly? Pointers to refs please? Dec 16, 2014 at 22:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .