From owner-freebsd-current@FreeBSD.ORG Tue Oct 15 10:26:03 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 17EC122C; Tue, 15 Oct 2013 10:26:03 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-vb0-x236.google.com (mail-vb0-x236.google.com [IPv6:2607:f8b0:400c:c02::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B9AC8231B; Tue, 15 Oct 2013 10:26:02 +0000 (UTC) Received: by mail-vb0-f54.google.com with SMTP id q14so5160573vbe.13 for ; Tue, 15 Oct 2013 03:26:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=s7DQ0MDelyv7nT0h1Ggu1i7oanK1teHvtlyCywi/RoQ=; b=CSPZoscpGX/+C0xTxUeAJBSJQRcuWxgldkv78q2IgYtUypOtFjFiij4cMY3yjxqnVy NcqLdoa6FovWXP3aP0TYTLmiKUH0xoLlYbHRCtJ9lHm0A3NiyJCF4b5gA9CT77VhwLJH KAPyc32oBgBmMLuLFakJoeToNIl6DKsodtOfKz/TH0P+i3E6taF5hwo5cs0R73/LrJrp fFp4S4ziJetvt495XIvxWI6TeRHbRe2HIRTWU+ufGM3j4d7+Hp76A+AXHwusLYR5RiiT 4Ebh2xKE/bl//L/Y6DkXgS/rYpFDIp58aFcK8bxLpobYOF6+5Ot6Foc2uPrA5d9/7JF6 VpzQ== MIME-Version: 1.0 X-Received: by 10.220.1.203 with SMTP id 11mr11251898vcg.15.1381832761735; Tue, 15 Oct 2013 03:26:01 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.220.94.71 with HTTP; Tue, 15 Oct 2013 03:26:01 -0700 (PDT) In-Reply-To: <201310150843.r9F8ho1c043235@mech-cluster241.men.bris.ac.uk> References: <201310150843.r9F8ho1c043235@mech-cluster241.men.bris.ac.uk> Date: Tue, 15 Oct 2013 12:26:01 +0200 X-Google-Sender-Auth: J1uWHL85Gj2CzKF49DGZReO-iA8 Message-ID: Subject: Re: panic: wrong page state m 0xe00000027a9adb40 + savecore deadlock From: Davide Italiano To: mexas@bris.ac.uk Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current , freebsd-ia64@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 15 Oct 2013 10:26:03 -0000 On Tue, Oct 15, 2013 at 10:43 AM, Anton Shterenlikht wrote: > Anyway, savecore eventually deadlocks: > > panic: deadlkres: possible deadlock detected for 0xe0000000127b7b00, blocked for 901401 ticks > [trim] > > Tracing command savecore pid 805 tid 100079 td 0xe0000000127b7b00 > cpu_switch(0xe0000000127b7b00, 0xe000000011178900, 0xe000000012402fc0, 0x9ffc0000005e7e80) at cpu_switch+0xd0 > sched_switch(0xe0000000127b7b00, 0xe000000011178900, 0x9ffc000000f15698, 0x9ffc000000f15680) at sched_switch+0x890 > mi_switch(0x103, 0x0, 0xe0000000127b7b00, 0x9ffc00000062d1f0) at mi_switch+0x3f0 > turnstile_wait(0xe000000012402fc0, 0xe000000012400480, 0x0, 0x9ffc000000dcb698) at turnstile_wait+0x960 > __mtx_lock_sleep(0x9ffc0000010f9998, 0xe0000000127b7b00, 0xe000000012402fc0, 0x9ffc000000dc0558, 0x742) at __mtx_lock_sleep+0x2f0 > __mtx_lock_flags(0x9ffc0000010f9980, 0x0, 0x9ffc000000dd4a90, 0x742) at __mtx_lock_flags+0x1e0 > vfs_vmio_release(0xa00000009ebe72f0, 0xe00000027ed2ab70, 0x3, 0xa00000009ebe736c, 0xa00000009ebe7498, 0xa00000009ebe72f8, 0x9ffc000000dd4a90, 0x9ffc0000010f9680) at vfs_vmio_release+0x290 > getnewbuf(0xe0000000127f4ec0, 0x0, 0x0, 0x8000, 0xa00000009ebe99a8, 0x0, 0x9ffc0000010f0798, 0xa00000009ebe72f0) at getnewbuf+0x7e0 > getblk(0xe0000000127f4ec0, 0x4cbaa, 0x8000, 0x0, 0x0, 0x0, 0x0, 0x0) at getblk+0xee0 > ffs_balloc_ufs2(0xe0000000127f4ec0, 0x4cbaa, 0xa0000000c60ba000, 0xe000000011165a00, 0x7f050000, 0xa00000009dd79160) at ffs_balloc_ufs2+0x2950 > ffs_write(0xa00000009dd79248, 0x3000, 0x265d50000) at ffs_write+0x5c0 > VOP_WRITE_APV(0x9ffc000000e94ac0, 0xa00000009dd79248, 0x0, 0x0) at VOP_WRITE_APV+0x330 > vn_write(0xe0000000129ae820, 0xa00000009dd79360, 0xe000000011165a00, 0x0, 0xe0000000129ae830, 0xe0000000127f4ec0) at vn_write+0x450 > vn_io_fault(0xe0000000129ae820, 0xa00000009dd79360, 0xe000000011165a00, 0x0, 0xe0000000127b7b00) at vn_io_fault+0x330 > dofilewrite(0xe0000000127b7b00, 0x7, 0xe0000000129ae820, 0xa00000009dd79360, 0xffffffffffffffff, 0x0) at dofilewrite+0x180 > kern_writev(0xe0000000127b7b00, 0x7, 0xa00000009dd79360) at kern_writev+0xa0 > sys_write(0xe0000000127b7b00, 0xa00000009dd794e8, 0x9ffc000000abac80, 0x48d) at sys_write+0x100 > syscall(0xe0000000129d04a0, 0x140857000, 0x8000, 0xe0000000127b7b00, 0x0, 0x0, 0x9ffc000000ab7280, 0x8) at syscall+0x5e0 > --More-- I'm not commenting on the first panic you got -- but on the deadlock reported by DEADLKRES. I think that's the vm_page lock. You can run kgdb /boot/${KERNEL}/kernel where ${KERNEL} is the incrimined one then l *vfs_vmio_release+0x290 to get the exact point where it fails. I'm unsure here because 'show alllocks' and 'show locks' outputs are empty -- are you building your kernel with WITNESS etc..? Thanks, -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare