coredump in coreos is truncated?

554 views
Skip to first unread message

zhenglin tao

unread,
Dec 17, 2015, 2:05:02 AM12/17/15
to CoreOS User
Hi,

I started a docker container which is centos7 on coreos, When the main process in docker container crashed, the docker container quit. I find the coredump file in /var/lib/systemd/coredump:

core@ip-172-31-5-189 /var/lib/systemd/coredump $ du -sh core*

528K core.cn.0.47dc39223f7a4cefbc3b5bdd766b0815.3313.1450332630000000.xz

528K core.cn.0.47dc39223f7a4cefbc3b5bdd766b0815.3422.1450332657000000.xz


But the filesize is not correct, usually the core should be >200M. Once I find one correct size corefile in this dir, but soon it went away, also it's a hidden file, why???:

-rw-r----- 1 root root 343M Dec 17 06:21 .#core.cn.0.47dc39223f7a4cefbc3b5bdd766b0815.4324.1450333260000000b2a87dbfbf4f0ba1


My coreos info:

core@master ~ $ cat /proc/sys/kernel/core_pattern

|/usr/lib/systemd/systemd-coredump %P %u %g %s %t %e

core@master ~ $ ulimit

unlimited


Anyone can help? Thanks.


Thanks,
Zhenglin

Alex Crawford

unread,
Dec 17, 2015, 1:56:35 PM12/17/15
to zhenglin tao, CoreOS User
On 12/16, zhenglin tao wrote:
> But the filesize is not correct, usually the core should be >200M. Once I
> find one correct size corefile in this dir, but soon it went away, also
> it's a hidden file, why???:
>
> -rw-r----- 1 root root 343M Dec 17 06:21
> .#core.cn.0.47dc39223f7a4cefbc3b5bdd766b0815.4324.1450333260000000b2a87dbfbf4f0ba1

You should use coredumpctl to list and view the coredumps on your system.

-Alex
signature.asc

zhenglin tao

unread,
Dec 17, 2015, 10:00:56 PM12/17/15
to CoreOS User, cnbuil...@gmail.com
Hi Alex,

I do used coredumpctl to list all the coredump info before,I think I find the correct coredump files there. Usually how do you debug or check these coredump files on coreos? For me, I want to use lldb to debug the call stack. But  the corefiles seemed to be zipped to .xz file type. When I tried to unxz them, the size would be 5M more or less, still not correct. Usually my corefile should be larger than 200M. 

Thanks,
Zhenglin

在 2015年12月18日星期五 UTC+8上午2:56:35,Alex Crawford写道:

zhenglin tao

unread,
Dec 17, 2015, 10:13:41 PM12/17/15
to CoreOS User, cnbuil...@gmail.com
Please see the following info. below, I don't know how to read the call stack from the core files? 
core@ip-172-31-8-110 ~ $ coredumpctl info
           PID: 4463 (cn)
           UID: 0 (root)
           GID: 0 (root)
        Signal: 6 (ABRT)
     Timestamp: Fri 2015-12-18 03:07:56 UTC (2min 20s ago)
  Command Line: cn --node_key=dn-cn-controller-wdg0s 
    Executable: /usr/local/myproject/bin/cn
 Control Group: /system.slice/docker-07dc0dab8e549db3e96ccd1ff0814b2cb8e4c6eca7741149642bee20f2d8759e.scop
          Unit: docker-07dc0dab8e549db3e96ccd1ff0814b2cb8e4c6eca7741149642bee20f2d8759e.scope
         Slice: system.slice
       Boot ID: 07f1dedb504348f78e767630c1303ac5
    Machine ID: c41422ce19ed403c88c468c8f543deef
      Hostname: ip-172-31-8-110.us-west-2.cn.internal
       Message: Process 4463 (cn) of user 0 dumped core.

core@ip-172-31-8-110 ~ $ coredumpctl gdb
           PID: 4463 (cn)
           UID: 0 (root)
           GID: 0 (root)
        Signal: 6 (ABRT)
     Timestamp: Fri 2015-12-18 03:07:56 UTC (1min 30s ago)
  Command Line: cn --node_key=dn-cn-controller-wdg0s
    Executable: /usr/local/myproject/bin/cn
 Control Group: /system.slice/docker-07dc0dab8e549db3e96ccd1ff0814b2cb8e4c6eca7741149642bee20f2d8759e.scope
          Unit: docker-07dc0dab8e549db3e96ccd1ff0814b2cb8e4c6eca7741149642bee20f2d8759e.scope
         Slice: system.slice
       Boot ID: 07f1dedb504348f78e767630c1303ac5
    Machine ID: c41422ce19ed403c88c468c8f543deef
      Hostname: ip-172-31-8-110.us-west-2.cn.internal
       Message: Process 4463 (cn) of user 0 dumped core.

Cannot retrieve coredump from journal nor disk.
Failed to retrieve core: No such file or directory

在 2015年12月18日星期五 UTC+8上午11:00:56,zhenglin tao写道:

zhengli...@gmail.com

unread,
Dec 20, 2015, 9:19:05 PM12/20/15
to CoreOS User, cnbuil...@gmail.com
Can anyone help? It blocks my continuous usage of coreos.

zhengli...@gmail.com

unread,
Dec 20, 2015, 11:06:49 PM12/20/15
to CoreOS User, cnbuil...@gmail.com

I used "coredumpctl -o xxx.coredump dump" which is able to dump the original corefile

Reply all
Reply to author
Forward
0 new messages