From owner-freebsd-current@freebsd.org Sun Sep 2 18:22:12 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01288FF5C43 for ; Sun, 2 Sep 2018 18:22:12 +0000 (UTC) (envelope-from lrx337@gmail.com) Received: from mail-it0-x22a.google.com (mail-it0-x22a.google.com [IPv6:2607:f8b0:4001:c0b::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9361C8231E for ; Sun, 2 Sep 2018 18:22:11 +0000 (UTC) (envelope-from lrx337@gmail.com) Received: by mail-it0-x22a.google.com with SMTP id h1-v6so12970608itj.4 for ; Sun, 02 Sep 2018 11:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=vxzYdWH5vognXfnLOgQbTCTET1KLowqrTjcrn80eH4Q=; b=nyP2F+A4Flvjwy7x3THQNjMsQ2Fqr9ngatbaHm9L+v/1TRX1h0LHQN3ocC5u3bZYG3 jPiTGR8tdp8ttYxf/LdMHgUYavyXba+rKOeXuliqn/fR1KVTtCp+dPgmU5kPc45nTv6v Dh+oBVCeGUk2dgLea/Hq3EiUC+Y29dYn+v+X3TU2UNmX0nXq/spBFuZ7CyJ8WtdO+IZO bScF7t7/AdRSFH5+rnV9Jw0PXhvAvJDSE8ka9AApxiaFXxDhMHD4cCwjoehS9p8w33dv D+n1biwknJm1WYHzLBGQypIFakDbAPbtDhhgxj9b96N717N1GdOSoqPRCNdTh+cNStLi 0F9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=vxzYdWH5vognXfnLOgQbTCTET1KLowqrTjcrn80eH4Q=; b=QKGUxpdX2dRtwPDcilAC3oPQD0wjm2hbcUwTmM2ANk2UknaZJ+ICC5VrUHOr95Y074 mUnr5/Vs85PeRPhaovB5J/X+ReNszamr+Ijos/ibksxGAV9lSVWPgIrJ6g0cZT/l2H12 G+4Ar8ZED+t7uHokwPWnoL5r9e1Yt6mI8gnq0gmKe9SPR38j7SEdpaylceGr5bRnykFe XEcLVpswETTiF5jHQYpsJd3KuG6KtGZQl99DXAhZWzfLzt9Au1LzwjWdGvaJ0+lqL2lf smxb6x9CjQgBOihknLIRxjvUiS5XA0P0N9pTUAaKJCXSjwYtHCX5xp22C25OmAmFWAdg cuvg== X-Gm-Message-State: APzg51C1EDmYJX9FBYGAv7YiY6rl5yYd25gr3jR0+OmzffYh7YWYuRQy KIb/kwZ+1KR+Qt2GFEPWFwi8bXF5yPqiCAxId9J4pL+b X-Google-Smtp-Source: ANB0VdaGBbipqo3ZJ+zW0OH4dMMkD5djAkrpr+FYX2NYIRsHO3YL3gykkPxMpPxrW+YCrXjQ4SBc2lPMasLW31EhRMQ= X-Received: by 2002:a02:9832:: with SMTP id t47-v6mr17956862jaj.137.1535912530552; Sun, 02 Sep 2018 11:22:10 -0700 (PDT) MIME-Version: 1.0 From: lr x Date: Sun, 2 Sep 2018 14:21:59 -0400 Message-ID: Subject: Kernel panic: Need help debugging To: freebsd-current@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2018 18:22:12 -0000 Hi! I can get the kernel to panic when I try to run virtualbox (selecting the amd64 ubuntu iso and attaching to virtual machine and starting it up.). The kernel: 12.0-ALPHA3 FreeBSD 12.0-ALPHA3 #0 r338359: Wed Aug 29 21:49:53 EDT 2018 someone@somebox:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 Virtualbox was installed with pkg install virtualbox-ose I have access to the crash dump, but running with kgdb does not reveal more information. I found a reference to the panic string: https://reviews.freebsd.org/D4197 . I could find that the panic string is indeed printed in the malloc_dbg function in the /sys/kern/kern_malloc.c file. How can I trace this further to understand why the kernel lands in such a situation? Thanks! Here are the contents of the info.last file and kgdb invocation on the crash dump. # cat /var/crash/info.last Dump header from device: /dev/ada0p4 Architecture: amd64 Architecture Version: 2 Dump Length: 937099264 Blocksize: 512 Compression: none Dumptime: Sat Sep 1 22:50:57 2018 Hostname: somebox Magic: FreeBSD Kernel Dump Version String: FreeBSD 12.0-ALPHA3 #0 r338359: Wed Aug 29 21:49:53 EDT 2018 someone@somebox:/usr/obj/usr/src/amd64.amd64/sys/GENERIC Panic String: malloc: called with spinlock or critical section held Dump Parity: 274387030 Bounds: 3 Dump Status: good root@somebox:/usr/src # kgdb -n 3 <..snip..> Unread portion of the kernel message buffer: Fatal trap 12: page fault while in kernel mode cpuid = 4; apic id = 04 fault virtual address = 0x80a851ab8 fault code = supervisor read data, protection violation instruction pointer = 0x20:0xffffffff8354b2e4 stack pointer = 0x28:0xfffffe008ced1200 frame pointer = 0x28:0xfffffe008ced1200 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 1792 (VirtualBox) Uptime: 48m52s (ada0:ahcich2:0:0:0): spin-down Dumping 893 out of 16221 MB:..2%..11%..22%..31%..42%..51%..61%..72%..81%..92% #0 cpustop_handler () at /usr/src/sys/x86/x86/mp_x86.c:1383 1383 CPU_SET_ATOMIC(cpu, &stopped_cpus); (kgdb) bt #0 cpustop_handler () at /usr/src/sys/x86/x86/mp_x86.c:1383 #1 0xffffffff811d1484 in ipi_nmi_handler () at /usr/src/sys/x86/x86/mp_x86.c:1341 #2 0xffffffff8105d889 in trap (frame=0xffffffff82057db0) at /usr/src/sys/amd64/amd64/trap.c:206 #3 0xffffffff8103baad in nmi_calltrap () at /usr/src/sys/amd64/amd64/exception.S:776 #4 0xffffffff811c1f76 in cpu_idle (busy=) at /usr/src/sys/x86/x86/cpu_machdep.c:489 Previous frame inner to this frame (corrupt stack?)