[haiku-development] Re: publish_vnode / get_vnode

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 08 Jun 2009 00:09:52 +0200

On 2009-06-07 at 20:23:40 [+0200], Brecht Machiels <brecht@xxxxxxxxxxx> 
wrote:
> Ingo Weinhold wrote:
> > On 2009-06-07 at 16:36:27 [+0200], Brecht Machiels <brecht@xxxxxxxxxxx> 
> > wrote:
> >> lookup() doesn't get called either. I suspect there is a bug somewhere
> >> in the initial setup of the volume or of the root node that is causing
> >> this. Userlandfs' debug output should provide more clues, I guess.
> > 
> > I believe pretty much the only things that can prevent the lookup() hook 
> > from
> > being called, are (a) you forgot to add it to the fs_vnode_ops structure 
> > you're
> > publishing the root node with, or (b) you're publishing the root node 
> > with the
> > wrong type (should be S_IFDIR obviously).
> 
> (a) that should be ok
> (b) I passed 0 to this before, but I fixed that now. Unfortunately it
> doesn't make a difference.
> 
> Perhaps this is a clue; when I fill in stat->st_blocks in read_stat(),
> userlandfs_server crashes with the following gdb output (right after
> returning from read_stat):
> 
> [tcsetpgrp failed in terminal_inferior: Invalid Argument]
> [Switching to team /system/servers/userlandfs_server assignfs (13618)
> thread request thread (13631)]
> 0x00238c7a in UserlandFS::UserlandRequestHandler::HandleRequest ()
> (gdb) bt
> #0  0x00238c7a in UserlandFS::UserlandRequestHandler::HandleRequest ()
> Cannot access memory at address 0x0
> (gdb)
> 
> Any ideas? Of course, st_blocks has to be filled in, so something is
> definitely wrong here...

Haiku's struct stat has changed recently. You're not by any chance using 
some unhealthy mix of old userlandfs and newer headers or vice versa? At 
least BFS compiled for userland seems to work well with the current version, 
so I'd assume userlandfs is working correctly.

> This debugging-over-email isn't so productive however. Maybe we should
> focus on getting debug output from userlandfs? :)
> 
> >>>> Ingo told me to enable debug for the userlandfs module. I added the
> >>>> following to my UserBuildConfig:
> >>>> SetConfigVar DEBUG : HAIKU_TOP src add-ons kernel file_systems
> >>>> userlandfs : 1 : global ;
> >>>> I only seem to get critical warnings in he syslog however. What did I
> >>>> miss?
> >>> What kind of critical warnings?
> >> Only when I kill the userlandfs_server:
> >> KERN: userlandfs [2360672338:  2230] Volume::ReadStat(): connection
> >> lost, emulating stat for the root node
> >> KERN: userlandfs [2360681262:  2230] Volume::WriteVNode(): connection
> >> lost, forcing write vnode
> >>
> >> I seem to remember that more debug info was output when I first started
> >> messing around with userlandfs, but I'm not sure.
> > 
> > At least those are expected after terminating the server. The userlandfs 
> > is just
> > entertaining the VFS, so it is possible to unmount the volume.
> 
> But userlandfs should output more detailed info to the syslog, no? Which
> hooks are called for example.

It does exactly that when DEBUG is enabled. You sure you really 
rebuilt/reinstalled the UserlandFS optional package?

CU, Ingo

Other related posts: