From owner-freebsd-toolchain@freebsd.org Sun May 14 06:06:49 2017 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47930D6C982 for ; Sun, 14 May 2017 06:06:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F9C3102E for ; Sun, 14 May 2017 06:06:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v4E66mLr046918 for ; Sun, 14 May 2017 06:06:49 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-toolchain@FreeBSD.org Subject: [Bug 219153] head, stable/11, release/11.0.1: libkvm (& more?) not updated to handle powerpc/powerpc64 ET_DYN based vmcore.* 's and such Date: Sun, 14 May 2017 06:06:49 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: markmi@dsl-only.net X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-toolchain@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 06:06:49 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219153 --- Comment #12 from Mark Millard --- (In reply to Mark Millard from comment #11) So trying: ps -M /var/crash/vmcore.2 -N /usr/lib/debug/boot/kernel/kernel.debug for a vmcore.2 based on: debug.minidump=3D0 things do not work well either. A hint is that core.txt.2 says all over the place: Raw corefile not supported (for both /usr/local/bin/ based and /usr/libexec/ based generation of core.txt.2 from vmcore.2 ). The result for ps is that: struct kinfo_proc * kvm_getprocs(kvm_t *kd, int op, int arg, int *cnt) gets to: if (KREAD(kd, nl[0].n_value, &nprocs)) { _kvm_err(kd, kd->program, "can't read nproc= s"); return (0); } and calls the _kvm_err shown and does not try to do any more. (gdb) print *nl $3 =3D {n_name =3D 0x41887179 "_nprocs", n_type =3D 9 '\t', n_other =3D 0 '= \0', n_desc =3D 0, n_value =3D 13942140} 13942140 =3D 0xD4BD7C which is the right address (matching what a live ddb reports for that kernel build for nprocs [an address]). But the vmcore.2 has 0xffffffff for its VirtAddr and 0x0 for PhysAddr (and Entry point): # readelf -a /var/crash/vmcore.2 ELF Header: Magic: 7f 45 4c 46 01 02 01 ff 00 00 00 00 00 00 00 00=20 Class: ELF32 Data: 2's complement, big endian Version: 1 (current) OS/ABI: StandAlone ABI Version: 0 Type: CORE (Core file) Machine: PowerPC 32-bit Version: 0 Entry point address: 0 Start of program headers: 52 (bytes into file) Start of section headers: 0 (bytes into file) Flags: 0 Size of this header: 52 (bytes) Size of program headers: 32 (bytes) Number of program headers: 1 Size of section headers: 40 (bytes) Number of section headers: 0 (0) Section header string table index: 0 Elf file type is CORE (Core file) Entry point 0x0 There are 1 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x001000 0xffffffff 0x00000000 0x80000000 0x80000000 R=20= =20 0x1000 There are no sections in this file. There is no dynamic section in this file. It appears that 0xD4BD7C+0x1000 =3D=3D 0xD4CD7C is the offset in the vmcore.2 file for extracting nprocs and using: cat /var/crash/vmcore.2 | hd | more it looks correct (the 00 00 00 36): 00d4cd70 00 00 00 01 00 00 00 01 00 00 01 00 00 00 00 36 |..............= .6| (The surrounding area looks like in the prior minidumps for what was around nprocs and the 36 (hex) matches what ddb reported.) So apparently libkvm does not deal with this context. /usr/local/bin/kgdb segmentation faulted when attempted on vmcore.2 . /usr/libexec/kgdb got: Cannot access memory at address 0x0 instead. [Both using /var/lib/debug/boot/kernel/kernel.debug .] --=20 You are receiving this mail because: You are the assignee for the bug.=