From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 17 20:28:25 2013 Return-Path: Delivered-To: freebsd-hackers@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 3EA714B3 for ; Tue, 17 Sep 2013 20:28:25 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wg0-x235.google.com (mail-wg0-x235.google.com [IPv6:2a00:1450:400c:c00::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CDB3A20FB for ; Tue, 17 Sep 2013 20:28:24 +0000 (UTC) Received: by mail-wg0-f53.google.com with SMTP id x12so5651405wgg.20 for ; Tue, 17 Sep 2013 13:28:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=g/yfAvyGDlgcFLPAMADmb1uHWrDmjhpkSP/bUycS5aQ=; b=jvR4UL1wbATBCMJzzSLh6jVaBYqgGrzSmD1YdPS89B8zVUMBX6H1ycQf7gwpzqxNcG p4/G4w1gJ0lwbwi0gRBqLMV44YUp9Hmv+POqO8t1m7JVpBSeELApU7CBaqgDuVrIEsTS FKpPys/CuuKvpaUNZ5IbS4ygPKngCBsv72xpTEUdchTqcP29dsg0vSQW6k8LX1+1Tqw4 HTmdL8YrjxFVxwI1q+8xV5qNwayWfufT7NRI/S2zDEiyR/T70IhbltJxZEp1+pvUKwq1 b2fu6uAIKJ2lmZ/kZlg/3DghYqhr5ELT0Fbue3yR3niEx9C4WBwYJm06DXR0kj0x21HF D36A== X-Received: by 10.180.72.226 with SMTP id g2mr4012678wiv.52.1379449703133; Tue, 17 Sep 2013 13:28:23 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id e5sm7000227wiy.2.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 17 Sep 2013 13:28:22 -0700 (PDT) Date: Tue, 17 Sep 2013 22:28:17 +0200 From: Mateusz Guzik To: FreeBSD hackers Mail List Subject: Re: Page fault from linux_proc_exit() Message-ID: <20130917202817.GA25519@dft-labs.eu> Mail-Followup-To: Mateusz Guzik , FreeBSD hackers Mail List References: <20130917201403.GA24318@vagner-wrk.bsdway.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20130917201403.GA24318@vagner-wrk.bsdway.ru> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 20:28:25 -0000 On Wed, Sep 18, 2013 at 12:14:04AM +0400, Vagner wrote: > Hi! > I ran skype and perhaps, it was *destroyed* (may be it was fault of skype > , I don't know). After I have got system panic. I looked to coredump: > - I got fault in frame #7 where: if ((q->p_flag & P_WEXIT) == 0 && > em->pdeath_signal != 0). But struct linux_emuldata *em == NULL. > > # from kgdb: > # p em > # $1 = (struct linux_emuldata *) 0x0 > > - I saw what `em = em_find(q, EMUL_DOLOCK);' from upper line of code > and from function em_find() that `em' could be equal NULL. > > Perhaps, are we need to add check after line call em_find in function > linux_proc_exit() - `continue;`? > In general this is a race condition and linux_proc_exit is not the only place where this is a problem. see http://people.freebsd.org/~mjg/patches/linux-emuldata-race-hack.diff Maybe I'll get around to commit this during the weekend, I am happy to let someone else work on this though. -- Mateusz Guzik