From owner-freebsd-fs@FreeBSD.ORG Fri Mar 28 00:56:11 2014 Return-Path: Delivered-To: freebsd-fs@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 ESMTPS id 898D26E5 for ; Fri, 28 Mar 2014 00:56:11 +0000 (UTC) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C8E39E for ; Fri, 28 Mar 2014 00:56:10 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id hi5so201804wib.17 for ; Thu, 27 Mar 2014 17:56:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=aZgtwG4Hvb2NmmqgAHkOPhbwEPB3Ghl8/UOFJfmieBU=; b=DfBynqsWTMzYo9k0v9TUM9JCCEVq5gm4wP3do1jmpMJ0+ySvMPbntoDwo4zCP7wMSF aKL0Wt+CleKU67SJQcW29LdIU7Izke5wPX+xZrE1all+rX2sFlE0x9ZPvMMe4j49ntpo oESAsPZLMQWK2qKjXds5nzVAzX/hTuXw7rTFkh3MqG6NdSVPbGHg+no8lVxJrCAJHFia vEjAakVXaCoqx8j5NFq6HUF6m5YamC5nLeNRBnx42f0GWV45dVl20zaYA/e9Jks9dXnZ EAfbV7sZE8pRzUNb+FrMRY5gLAB8aB3+pIWU4vwvQiBlybEbpKPkJS2OFoQj4HSWv3s5 Mryw== X-Received: by 10.180.89.102 with SMTP id bn6mr43378192wib.28.1395968168860; Thu, 27 Mar 2014 17:56:08 -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 f3sm1844385wiv.2.2014.03.27.17.56.07 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 27 Mar 2014 17:56:07 -0700 (PDT) Date: Fri, 28 Mar 2014 01:56:05 +0100 From: Mateusz Guzik To: Victor Sneider Subject: Re: Issue with vn_open(), help me please Message-ID: <20140328005604.GD4730@dft-labs.eu> References: <1395966793.20688.YahooMailNeo@web122101.mail.ne1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1395966793.20688.YahooMailNeo@web122101.mail.ne1.yahoo.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "freebsd-fs@freebsd.org" X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2014 00:56:11 -0000 On Thu, Mar 27, 2014 at 05:33:13PM -0700, Victor Sneider wrote: > Hi all, > > I used kern_openat()/fget/fo_read() to open and read a text files inside kernel.  > > When I load it as a kernel module, the module works fine and do its job.  > > When I compiled it into kernel, it crash in kern_openat(), more precisely, in vn_open(). I used call_out() to defer reading the file and wait for the rootfs mount completes. I set the timeout long enough (5 min, for example) but it still crashes.  > > I googled a lot but have not found any report about this issue. I am not an expert about file reading/writing inside kernel but I feel this could be a bug in vn_open().  > Can you elaborate on the crash? backtrace, crashing instruction, dump pointer involved in the crash etc. Are you running kernel with INVARIANTS and WITNESS enabled? Does the module with these options? -- Mateusz Guzik