← Back to team overview

touch-packages team mailing list archive

[Bug 1423047] [NEW] Apport throws "Invalid process ID" exception and no coredump output when a program crashes in docker container

 

Public bug reported:

Here are the steps to reproduce the problem
1. Start a docker container by command "docker -t -i <Ubuntu 12.04 docker image> /bin/bash

2. In side the docker container:
     a. set "ulimit -c unlimited"
     b. Compile and execute the following c program 
          ----------------------------
          #include <stdio.h>
          #include <signal.h>
          int main(void)
          {
            raise(SIGABRT);
            return 0;
          }
          ----------------------------
     c. The console output will show "Aborted (core dumped)". However, no coredump file is created.
3. At the host, the /var/log/apport.log shows the following:
----------------------------------------------
ERROR: apport (pid 24902) Wed Feb 18 04:50:49 2015: Unhandled exception:
Traceback (most recent call last):
  File "/usr/share/apport/apport", line 258, in <module>
    drop_privileges(pid, True)
  File "/usr/share/apport/apport", line 54, in drop_privileges
    raise ValueError('Invalid process ID: ' + str(e))
ValueError: Invalid process ID: [Errno 2] No such file or directory: '/proc/408/stat'
ERROR: apport (pid 24902) Wed Feb 18 04:50:49 2015: pid: 24902, uid: 0, gid: 0, euid: 0, egid: 0
ERROR: apport (pid 24902) Wed Feb 18 04:50:49 2015: environment: {}
----------------------------------------------

Expect that apport can process the coredump without exception.

Here are more information about the environment:
- Ubuntu release (host):
    Description:    Ubuntu 12.04.3 LTS
    Release:        12.04

- Ubuntu release (docker image):
    Description:    Ubuntu 12.04.5 LTS
    Release:        12.04

- Apport version:
apport:
  Installed: 2.0.1-0ubuntu17.6
  Candidate: 2.0.1-0ubuntu17.8
  Version table:
     2.0.1-0ubuntu17.8 0
        500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
 *** 2.0.1-0ubuntu17.6 0
        500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.0.1-0ubuntu5 0
        500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

** Affects: apport (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/1423047

Title:
  Apport throws "Invalid process ID" exception and no coredump output
  when a program crashes in docker container

Status in apport package in Ubuntu:
  New

Bug description:
  Here are the steps to reproduce the problem
  1. Start a docker container by command "docker -t -i <Ubuntu 12.04 docker image> /bin/bash

  2. In side the docker container:
       a. set "ulimit -c unlimited"
       b. Compile and execute the following c program 
            ----------------------------
            #include <stdio.h>
            #include <signal.h>
            int main(void)
            {
              raise(SIGABRT);
              return 0;
            }
            ----------------------------
       c. The console output will show "Aborted (core dumped)". However, no coredump file is created.
  3. At the host, the /var/log/apport.log shows the following:
  ----------------------------------------------
  ERROR: apport (pid 24902) Wed Feb 18 04:50:49 2015: Unhandled exception:
  Traceback (most recent call last):
    File "/usr/share/apport/apport", line 258, in <module>
      drop_privileges(pid, True)
    File "/usr/share/apport/apport", line 54, in drop_privileges
      raise ValueError('Invalid process ID: ' + str(e))
  ValueError: Invalid process ID: [Errno 2] No such file or directory: '/proc/408/stat'
  ERROR: apport (pid 24902) Wed Feb 18 04:50:49 2015: pid: 24902, uid: 0, gid: 0, euid: 0, egid: 0
  ERROR: apport (pid 24902) Wed Feb 18 04:50:49 2015: environment: {}
  ----------------------------------------------

  Expect that apport can process the coredump without exception.

  Here are more information about the environment:
  - Ubuntu release (host):
      Description:    Ubuntu 12.04.3 LTS
      Release:        12.04

  - Ubuntu release (docker image):
      Description:    Ubuntu 12.04.5 LTS
      Release:        12.04

  - Apport version:
  apport:
    Installed: 2.0.1-0ubuntu17.6
    Candidate: 2.0.1-0ubuntu17.8
    Version table:
       2.0.1-0ubuntu17.8 0
          500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
   *** 2.0.1-0ubuntu17.6 0
          500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
          100 /var/lib/dpkg/status
       2.0.1-0ubuntu5 0
          500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1423047/+subscriptions


Follow ups

References