Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751935AbaLQMwN (ORCPT ); Wed, 17 Dec 2014 07:52:13 -0500 Received: from mail.univention.de ([82.198.197.8]:1710 "EHLO mail.univention.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750829AbaLQMwM (ORCPT ); Wed, 17 Dec 2014 07:52:12 -0500 X-Greylist: delayed 540 seconds by postgrey-1.27 at vger.kernel.org; Wed, 17 Dec 2014 07:52:11 EST Message-ID: <54917A5B.1050909@univention.de> Date: Wed, 17 Dec 2014 13:43:07 +0100 From: Philipp Hahn Organization: Univention GmbH User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 MIME-Version: 1.0 To: linux-kernel@vger.kernel.org, Al Viro CC: Frediano Ziglio , Ian Campbell , Xen-devel@lists.xen.org, Ian Jackson Subject: core dump files do not include all CPU registers? References: <546461A2.2070908@univention.de> <1415869951.31613.26.camel@citrix.com> <548B1472.5080302@univention.de> <1418401932.16425.34.camel@citrix.com> <548B1BA8.3090504@univention.de> <1418403387.16425.38.camel@citrix.com> <548B23FA.6070108@univention.de> <1418407116.16425.53.camel@citrix.com> <1418649458.16425.108.camel@citrix.com> <548EEDF5.20808@univention.de> <1418655014.16425.138.camel@citrix.com> <1418665524.16425.171.camel@citrix.com> <548F60BF.4020901@univention.de> <1418726712.16425.213.camel@citrix.com> <1418727970.16425.217.camel@citrix.com> <1418732635.16425.221.camel@citrix.com> <1418747029.16425.238.camel@citrix.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Linux folk, while investigating some strange process crashes (SIGSEGV) we noticed that the core files generated by the Linux kernel (3.10-amd64) do not include all CPU registers; here namely the SSE2 (FPREGSET?) related registers: # eu-readelf --notes core ... CORE 336 PRSTATUS info.si_signo: 11, info.si_code: 0, info.si_errno: 0, cursig: 11 sigpend: <> sighold: <> pid: 6918, ppid: 18764, pgrp: 6918, sid: 18764 utime: 1.116000, stime: 0.004000, cutime: 0.000000, cstime: 0.000000 orig_rax: -1, fpvalid: 0 r15: 0 r14: 0 r13: 140734211556208 r12: 4195248 rbp: 0x0000000000000000 rbx: 0 r11: 140504440818576 r10: 0 r9: 140504444297440 r8: 140504444220160 rax: 80000 rcx: 0 rdx: 100000 rsi: 140734211556216 rdi: 1 rip: 0x00000000004004e7 rflags: 0x0000000000010246 rsp: 0x00007fff3cb00298 fs.base: 0x00007fc9bd9df700 gs.base: 0x0000000000000000 cs: 0x0033 ss: 0x002b ds: 0x0000 es: 0x0000 fs: 0x0000 gs: 0x0000 ... In contrast to that "gdb generate-core-file" contains an additional note: # eu-readelf --notes core.7335 ... CORE 512 FPREGSET xmm0: 0x00000000000000000000000000000000 xmm1: 0x2f2f2f2f2f2f2f2f2f2f2f2f2f2f2f2f xmm2: 0x00000000000000000000000000000000 xmm3: 0x00000000000000000000ff0000000000 xmm4: 0x00000000000000000000000000000000 xmm5: 0x00000000000000000000000000000000 xmm6: 0x00000000000000000000000000000000 xmm7: 0x00000000000000000000000000000000 xmm8: 0x00000000000000000000000000000000 xmm9: 0x00000000000000000000000000000000 xmm10: 0x00000000000000000000000000000000 xmm11: 0x00000000000000000000000000000000 xmm12: 0x00000000000000000000000000000000 xmm13: 0x00000000000000000000000000000000 xmm14: 0x00000000000000000000000000000000 xmm15: 0x00000000000000000000000000000000 st0: 0x00000000000000000000 st1: 0x00000000000000000000 st2: 0x00000000000000000000 st3: 0x00000000000000000000 st4: 0x00000000000000000000 st5: 0x00000000000000000000 st6: 0x00000000000000000000 st7: 0x00000000000000000000 mxcsr: 0x0000000000001f80 fcw: 0x037f fsw: 0x0000 ... Is there some way to include all CPU registers into the core dump, as the current information is not enough to diagnose the cause of some strange crashes, which might be related to the use of SSE2 with Xen. Currently we're using this: kernel.core_pattern = /var/tmp/core/core-%e-%p-%t kernel.core_uses_pid = 1 fs.suid_dumpable = 2 Would a "pipe" core-handler be able to access the still existing process and create a more complete dump? On 17.12.2014 10:14, Frediano Ziglio wrote: > 2014-12-16 16:44 GMT+00:00 Frediano Ziglio : >> 2014-12-16 16:23 GMT+00:00 Ian Campbell : ... >> First we (I'll try when I reach home) can check if memset in glibc (or >> the version called from talloc_zero) can use SSE. A possible dmesg >> output and /proc/cpuinfo content could help too but I think SSE are >> now quite common. > > I have access to some core dumps. glibc memset is using SSE, > specifically xmm0 register. > > Unfortunately is seems that core dumps contains only standard > registers, so all register appears zeroed. If you try with a newer gdb > version is shows that registers are not available. Thank you in advance. Philipp -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/