From owner-freebsd-current@FreeBSD.ORG Wed Oct 16 14:31:58 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 57DCCC01 for ; Wed, 16 Oct 2013 14:31:58 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from eu1sys200aog121.obsmtp.com (eu1sys200aog121.obsmtp.com [207.126.144.151]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 315C62371 for ; Wed, 16 Oct 2013 14:31:24 +0000 (UTC) Received: from mail-wi0-f179.google.com ([209.85.212.179]) (using TLSv1) by eu1sys200aob121.postini.com ([207.126.147.11]) with SMTP ID DSNKUl6jNPrBSzTYgx/4+FJn1lQqly3cwbdY@postini.com; Wed, 16 Oct 2013 14:31:24 UTC Received: by mail-wi0-f179.google.com with SMTP id hm4so865700wib.0 for ; Wed, 16 Oct 2013 07:30:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:message-id:to:subject:cc :reply-to:in-reply-to; bh=+qbVc/Wde1PArlFnyejvT4hhPgxfo02XKqOvtoTGf4w=; b=VVpE+xYUt190t+vApL5HU9uDYiMJNSopc7FRm0ZsMGkOjdn4bArsrocmwP2b5tB34F Nk0q6cXNda5Bo3AYYkJ75ruqUTj3ksVapJR5HAxwEw/gilZRN1UUZN9GhQsWWpuTu3Ng mcjLFwYwB5LldUQb/XEE3XIsOMDEBcH89veoMmH04Sqo5gRjMuP6+KyMCwbxe1flLr4u oZbDWDuOwT8HNqkO3nSudpL/guVdpGTm/YFKv/VyDdqnzRaeDUtwbLeP7bnm9+KBhicc dL53TNFiitqYb1Ltg2TulsWAdNd0653tJqZc7pB+KAuTLu05qLS1iu11/g00MlAj1jz7 5lNw== X-Gm-Message-State: ALoCoQm68k61NaAXJTmClLhymokY6DyRJTniJZM62sU/radSw8YOi+HHXXLrA4Ck+AGBsSaya9UChLV8mwwTkX6cWuU9eu5D1H/SQmmqgyCMYOrngaKyk5tece+W5ip3mda6OJlS+TB1+9XeMIUjFbUKe+EFXblqHLFKZ69AgfZ0yFk5S71n+QQ= X-Received: by 10.180.72.195 with SMTP id f3mr2540434wiv.51.1381933816122; Wed, 16 Oct 2013 07:30:16 -0700 (PDT) X-Received: by 10.180.72.195 with SMTP id f3mr2540427wiv.51.1381933816012; Wed, 16 Oct 2013 07:30:16 -0700 (PDT) Received: from mech-cluster241.men.bris.ac.uk (mech-cluster241.men.bris.ac.uk. [137.222.187.241]) by mx.google.com with ESMTPSA id b13sm6424064wic.9.2013.10.16.07.30.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Oct 2013 07:30:15 -0700 (PDT) Sender: Anton Shterenlikht Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.7/8.14.6) with ESMTP id r9GEUD3X025962 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 16 Oct 2013 15:30:13 +0100 (BST) (envelope-from mexas@mech-cluster241.men.bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.7/8.14.6/Submit) id r9GEUCYo025961; Wed, 16 Oct 2013 15:30:12 +0100 (BST) (envelope-from mexas) Date: Wed, 16 Oct 2013 15:30:12 +0100 (BST) From: Anton Shterenlikht Message-Id: <201310161430.r9GEUCYo025961@mech-cluster241.men.bris.ac.uk> To: kostikbel@gmail.com, mexas@bris.ac.uk Subject: Re: panic: wrong page state m 0xe00000027a9adb40 + savecore deadlock In-Reply-To: <20131016120142.GS3865@kib.kiev.ua> Cc: freebsd-current@freebsd.org, freebsd-ia64@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: mexas@bris.ac.uk List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Oct 2013 14:31:58 -0000 >From kostikbel@gmail.com Wed Oct 16 13:02:51 2013 > >On Wed, Oct 16, 2013 at 02:55:26PM +0300, Konstantin Belousov wrote: >> On Wed, Oct 16, 2013 at 09:02:19AM +0100, Anton Shterenlikht wrote: >> > panic: >> > http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/182999 >>=20 >> db> show pginfo 0xe00000027d352600 >> page 0xe00000027d352600 obj 0xe0000000128fda00 pidx 0x0 phys 0x275dc6000 = >q 255 hold 0 wire 1 >> af 0x0 of 0x0 f 0x0 act 0 busy 1 valid 0xff dirty 0x0 >>=20 >> AFAIR ia64 uses 8K pages. >>=20 >> Please do the following: >> 1. apply the patch at the end of this message, reproduce the problem >> and show me both exact panic message from the patched kernel and 'show >> pginfo addr' again. >> 2. show me the ls -la output for the file which was accessed >> through nginx, also what is the filesystem where the file resides on ? >Sure, I forgot the patch. > >diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c >index 322550b..9d46dc7 100644 >--- a/sys/kern/uipc_syscalls.c >+++ b/sys/kern/uipc_syscalls.c >@@ -2070,7 +2070,7 @@ free_page: > } > KASSERT(error !=3D 0 || (m->wire_count > 0 && > vm_page_is_valid(m, off & PAGE_MASK, xfsize)), >- ("wrong page state m %p", m)); >+ ("wrong page state m %p off %#jx xfsize %d", m, off, xfsize)); > VM_OBJECT_WUNLOCK(obj); > return (error); > } The patch didn't apply cleanly. I concluded that my src was older that yours, so I updated to r 256624. Now I don't get this panic! I don't know whether to be happy or not. Anyway, I was on r255488 when the panic happened, and there have been a lot of changes under sys/kern. Specifically related to the patch: # svn info Path: . Working Copy Root Path: /usr/src URL: https://svn0.eu.freebsd.org/base/head/sys/kern Relative URL: ^/head/sys/kern Repository Root: https://svn0.eu.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 256624 Node Kind: directory Schedule: normal Last Changed Author: mav Last Changed Rev: 256614 Last Changed Date: 2013-10-16 10:56:40 +0100 (Wed, 16 Oct 2013) # svn diff -r 255488 uipc_syscalls.c Index: uipc_syscalls.c =================================================================== --- uipc_syscalls.c (revision 255488) +++ uipc_syscalls.c (working copy) @@ -123,21 +123,13 @@ /* * sendfile(2)-related variables and associated sysctls */ -int nsfbufs; -int nsfbufspeak; -int nsfbufsused; +static SYSCTL_NODE(_kern_ipc, OID_AUTO, sendfile, CTLFLAG_RW, 0, + "sendfile(2) tunables"); static int sfreadahead = 1; +SYSCTL_INT(_kern_ipc_sendfile, OID_AUTO, readahead, CTLFLAG_RW, + &sfreadahead, 0, "Number of sendfile(2) read-ahead MAXBSIZE blocks"); -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, - "Maximum number of sendfile(2) sf_bufs available"); -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, - "Number of sendfile(2) sf_bufs at peak usage"); -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, - "Number of sendfile(2) sf_bufs in use"); -SYSCTL_INT(_kern_ipc, OID_AUTO, sfreadahead, CTLFLAG_RW, &sfreadahead, 0, - "Number of sendfile(2) read-ahead MAXBSIZE blocks"); - static void sfstat_init(const void *unused) { @@ -2076,10 +2068,10 @@ vm_page_free(m); vm_page_unlock(m); } + KASSERT(error != 0 || (m->wire_count > 0 && + vm_page_is_valid(m, off & PAGE_MASK, xfsize)), + ("wrong page state m %p off %#jx xfsize %d", m, off, xfsize)); VM_OBJECT_WUNLOCK(obj); - KASSERT(error != 0 || (m->wire_count > 0 && m->valid == - VM_PAGE_BITS_ALL), - ("wrong page state m %p", m)); return (error); } # Please let me know if there is any other diagnostics you'd like to see. Otherwise, till next panic... Many thanks for your help Anton