From owner-freebsd-current@FreeBSD.ORG Sun Jun 14 21:29:25 2015 Return-Path: Delivered-To: freebsd-current@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C564198; Sun, 14 Jun 2015 21:29:25 +0000 (UTC) (envelope-from jenkins-admin@freebsd.org) Received: from jenkins-9.freebsd.org (jenkins-9.freebsd.org [8.8.178.209]) by mx1.freebsd.org (Postfix) with ESMTP id 6A797EB; Sun, 14 Jun 2015 21:29:25 +0000 (UTC) (envelope-from jenkins-admin@freebsd.org) Received: from jenkins-9.freebsd.org (localhost [127.0.0.1]) by jenkins-9.freebsd.org (Postfix) with ESMTP id CD4F6B9D; Sun, 14 Jun 2015 21:29:25 +0000 (UTC) Date: Sun, 14 Jun 2015 21:29:25 +0000 (GMT) From: jenkins-admin@freebsd.org To: kib@FreeBSD.org, tuexen@FreeBSD.org, jenkins-admin@FreeBSD.org, freebsd-current@freebsd.org Message-ID: <1382512658.27.1434317365794.JavaMail.jenkins@jenkins-9.freebsd.org> In-Reply-To: <1464662440.25.1434306576644.JavaMail.jenkins@jenkins-9.freebsd.org> References: <1464662440.25.1434306576644.JavaMail.jenkins@jenkins-9.freebsd.org> Subject: FreeBSD_HEAD - Build #2868 - Still Failing MIME-Version: 1.0 X-Jenkins-Job: FreeBSD_HEAD X-Jenkins-Result: FAILURE Precedence: bulk Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2015 21:29:25 -0000 FreeBSD_HEAD - Build #2868 - Still Failing: Check console output at https://jenkins.freebsd.org/job/FreeBSD_HEAD/2868/ to view the results. From owner-freebsd-current@FreeBSD.ORG Sun Jun 14 21:59:54 2015 Return-Path: Delivered-To: freebsd-current@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26C7BF40; Sun, 14 Jun 2015 21:59:54 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB9149EE; Sun, 14 Jun 2015 21:59:53 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by wiwd19 with SMTP id d19so59031273wiw.0; Sun, 14 Jun 2015 14:59:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=UZiJraIMXZs5XbnxFWwKhje4i/zxyhjAad7ozbVp940=; b=m9GVYE6R0mYXd5jWmwGUnK9nMlcUYoxQy+jzyEJFMKpj9007UZBxwN4XFcTKU3uHBt q0sxDHs8xkuBNGprebO+uVGtBw3xgYo71VwpY8j5ZOs+isGODZsh4BpSphXLnHMNBCPW 84UEg7tlthHvk8fH/L0KWC7mlji/Irw8EeGA34pNM+vC8NqofHNYPz6yjReDB/dAuftG jzFQQ8Wp3s35YAKH0MM4KmZXidGx4ZHfQQKEOLZmoiXfuEl+FGnWr3f9G4WgJEbtl2U1 Ql6woPX2ZZ9IQS94tEbWfAYzVtFPS+ZHfH9jEBcawxFliNGwMjLYVkKp76L6NUakh10Q EJAQ== X-Received: by 10.180.19.100 with SMTP id d4mr25931098wie.29.1434319192094; Sun, 14 Jun 2015 14:59:52 -0700 (PDT) Received: from brick.home (eue56.neoplus.adsl.tpnet.pl. [83.20.176.56]) by mx.google.com with ESMTPSA id f8sm12980884wiy.7.2015.06.14.14.59.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Jun 2015 14:59:51 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Sun, 14 Jun 2015 23:59:48 +0200 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: Konstantin Belousov Cc: Jeremie Le Hen , freebsd-current@freebsd.org, Konstantin Belousov , alc@freebsd.org Subject: Re: panic when RACCT_RSS still > 0 when struct racct destroyed Message-ID: <20150614215948.GA41183@brick.home> Mail-Followup-To: Konstantin Belousov , Jeremie Le Hen , freebsd-current@freebsd.org, Konstantin Belousov , alc@freebsd.org References: <20150614190013.GS2080@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150614190013.GS2080@kib.kiev.ua> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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, 14 Jun 2015 21:59:54 -0000 On 0614T2200, Konstantin Belousov wrote: > On Sun, Jun 14, 2015 at 02:53:48PM +0200, Jeremie Le Hen wrote: > > Sorry for the early sending in the previous email. > > > > Hi all, > > > > I keep getting the following panic from time to time: > > % panic: destroying non-empty racct: 1142784 allocated for resource 4 > > % > > % cpuid = 1 > > % KDB: stack backtrace: > > % db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00e6240630 > > % vpanic() at vpanic+0x189/frame 0xfffffe00e62406b0 > > % kassert_panic() at kassert_panic+0x132/frame 0xfffffe00e6240720 > > % racct_destroy() at racct_destroy+0x96/frame 0xfffffe00e6240750 > > % uifree() at uifree+0x5e/frame 0xfffffe00e6240770 > > % crfree() at crfree+0x48/frame 0xfffffe00e6240790 > > % thread_wait() at thread_wait+0x8e/frame 0xfffffe00e62407b0 > > % proc_reap() at proc_reap+0x40e/frame 0xfffffe00e6240800 > > % proc_to_reap() at proc_to_reap+0x332/frame 0xfffffe00e6240850 > > % kern_wait6() at kern_wait6+0x1f7/frame 0xfffffe00e62408f0 > > % sys_wait4() at sys_wait4+0x73/frame 0xfffffe00e6240ae0 > > % amd64_syscall() at amd64_syscall+0x27f/frame 0xfffffe00e6240bf0 > > % Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe00e6240bf0 > > > > I had already reported this two years ago, but we couldn't find a solution: > > https://lists.freebsd.org/pipermail/freebsd-current/2013-June/042528.html > > > > Note that since then I spotted an instance of this which wasn't for a > > jailed process. > > > > > > I made a bit more research today on RACCT_RSS throughout the kernel > > source. It is only set using racct_set() from > > - vmspace_container_set() but it only zero a couple of resources > > - vm_daemon() > > > > The first question, do you guys (kib, alc) think there could be a bug, > > or rather a race, in there? > > > > > > The other solution where the RSS resource can be modified is through: > > - racct_proc_ucred_changed() > > - racct_move() > > - racct_proc_fork() > > > > I think this is pretty much the surface through which the bug can arise. > > > > > > In the thread pointed above, Edward advised me to create a rctl rule > > to cause the uidinfo to be held, but this can happen with various > > users (the last one with user 2 in the root jail). > > Any idea what I could do to narrow the issue? > > vm_daemon() only runs periodically. What does ensure that rss accounting > is reset to zero on the process exit ? It's reset to 0 in vmspace_container_reset(), called from vmspace_exit().