> -----Original Message----- > From: Serge Hallyn [mailto:serge.hal...@ubuntu.com] > Sent: den 22 april 2013 17:59 > To: Hans Feldt > Cc: lxc-users@lists.sourceforge.net > Subject: Re: [Lxc-users] Problem with core dumps generated from > containers, apport > > My guess would be similar to this but slightly different. I'd guess that > apport > on the host sees the SEGV in kernel log. That will have the correct pid for > the
Actually the kernel (3.5.0-27 in this case) executes apport with some arguments, one is a PID. It seems like this is container PID from the apport logs: Traceback (most recent call last): File "/usr/share/apport/apport", line 54, in drop_privileges stat = os.stat('/proc/' + pid) OSError: [Errno 2] No such file or directory: '/proc/260' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/share/apport/apport", line 279, in <module> drop_privileges(pid, True) File "/usr/share/apport/apport", line 56, in drop_privileges raise ValueError('Invalid process ID: ' + str(e)) ValueError: Invalid process ID: [Errno 2] No such file or directory: '/proc/260' ERROR: apport (pid 3224) Mon Apr 22 22:03:03 2013: pid: 3224, uid: 0, gid: 0, euid: 0, egid: 0 ERROR: apport (pid 3224) Mon Apr 22 22:03:03 2013: environment: environ({}) 260 is the PID of my test program (sleep 1000) in the container. It of course had another PID on the host... Then it depends on the value of the PID what apport will do. If it gets a PID that exist on the host it will create a crash report for some innocentprogram that is working just perfect.... Since there is a one to many mapping between container PIDs and host PIDs I think this could be a kernel bug. I see no way apport can determine which host PID is the one that relates to a given container PID. Please correct me if I am wrong! Thanks, Hans > kernel to look up the task, however it will crosscheck /proc/$$/maps and > such against userspace on the host, which will cause debug info to be wrong. > > What does the host's apport report actually look like? > > Quoting Hans Feldt (hans.fe...@ericsson.com): > > > > system: x86_64, ubuntu 12.10 with a ubuntu template container > > > > When I enable core dumps in a container and such get generated, apport > > on the host gets confused and creates bogus (it seems) crash reports. > > > > If I speculate it could be that apport gets a non translated container > > pid from the kernel, tries to find a match on the host and create a > > crash report. But since the container pid is something else on the > > host and sometimes it even thinks it is a system program on host and > > tries to send a bug report for it... > > > > Does that make sense? > > > > Thanks, > > Hans > > > > ---------------------------------------------------------------------- > > -------- Precog is a next-generation analytics platform capable of > > advanced analytics on semi-structured data. The platform includes APIs > > for building apps and a phenomenal toolset for data science. > > Developers can use our toolset for easy data analysis & visualization. > > Get a free account! > > http://www2.precog.com/precogplatform/slashdotnewsletter > > _______________________________________________ > > Lxc-users mailing list > > Lxc-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/lxc-users ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr _______________________________________________ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users