Issue with vn_open(), help me please

Victor Sneider v.sneider at yahoo.com
Fri Mar 28 02:54:13 UTC 2014


Hi Mateusz,

Thanks for your fast response. 

I have recorded what printed out on the console when it crashes but I have not done backtrace and dump. I'll do that and post it soon. 

I did not have INVARIANT and WITNESS enabled. Should I enable it? 

I have to correct that when I load the module, callout() is not used. The file opening and reading are performed without issue. But when I use callout() in module, I experience the same crash. 

Here is the console when the system crash: 

Trap cause = 2 (TLB
miss (load or instr. fetch) - kernel mode)
panic: trap
Uptime: 5m1s
Automatic reboot in
15 seconds - press a key on the console to abort


Thanks.

V.Sneider. 



On Thursday, March 27, 2014 8:56:09 PM, Mateusz Guzik <mjguzik at gmail.com> wrote:
 
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 <mjguzik gmail.com>


More information about the freebsd-fs mailing list