Re: Cannot unmount nullfs in current

2013-04-19 Thread Craig Rodrigues
On Thu, Apr 18, 2013 at 4:27 PM, Craig Rodrigues rodr...@freebsd.orgwrote:

 Hi,

 I am trying to build some software which uses
 nanobsd, and mounts/unmounts many nullfs mounts
 while it runs.  I am hitting failures where
 I cannot unmount nullfs file systems.  I cannot figure out why.



I forgot to run fstat. :(

fstat /opt2/branches/freenas/os-base/amd64/_.w/usr/ports/distfiles
USER CMD  PID   FD MOUNT  INUM MODE SZ|DV R/W NAME
rodrigc  gam_server  2275   37
/opt2/branches/freenas/os-base/amd64/_.w/usr/ports/distfiles 3194579
drwxr-xr-x 196  r
/opt2/branches/freenas/os-base/amd64/_.w/usr/ports/distfiles


Since I run the GNOME desktop, gnome has a dependency on the gamin port.
The gamin port contains gam_server.
gamin monitors file system activity.  It looks like gam_server gets
triggered
when things are mounted, and for some reason, sometimes fails to go away.

I need to read http://people.gnome.org/~veillard/gamin/config.html and
figure out how to disable gamin,
or just remove gamin from my system.  Annoying. :(

--
Craig
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Cannot unmount nullfs in current

2013-04-19 Thread hiren panchasara
On Apr 18, 2013 7:04 PM, Craig Rodrigues rodr...@freebsd.org wrote:

 Hi,

 I am trying to build some software which uses
 nanobsd, and mounts/unmounts many nullfs mounts
 while it runs.  I am hitting failures where
 I cannot unmount nullfs file systems.  I cannot figure out why.

I am also getting similar failures while trying to build freenas.


 Here is more info.

 SYSTEM
 ==
 I am running amd64, current build at this revision:

 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r249181: Sat Apr  6 03:07:32 UTC 2013
 amd64

 STEPS TO REPRODUCE
 ===

 (1)  Create a directory, /opt2/branches.  Make sure that /opt2/branches
  is on ZFS

 (2)
mkdir -p /opt2/branches/freenas
mkdir -p /opt2/branches/freenas-cache

 (3)

 git clone git://github.com/freenas/freenas.git /opt2/branches/freenas
 git clone git://
github.com/freenas/ports.git/opt2/branches/freenas-cache/ports
 git clone git://
github.com/trueos/trueos.git/opt2/branches/freenas-cache/trueos

 (4)  sudo to root

 (5)  cd /opt2/branches/freenas

 (6)
 script build.log env GIT_REPO=/opt2/branches/freenas-cache/trueos \
 GIT_PORTS_REPO=/opt2/branches/freenas-cache/ports \
 sh build/do_build.sh


 The build cranks for a while, and then I get this error:

 00:02:37 ### log:
 /opt2/branches/freenas/os-base/amd64/_.cust.add_pkg_archivers_lzo2

I do not get this.
 do_build.sh: ERROR: FreeNAS /opt2/branches/freenas/nanobsd/os-base build
 FAILED; please check above log for more details

I get this which looks like a generic build failure message.

I do not have gnome or any X related things.



 If I look in .cust.add_pkg_archivers_lzo2, I see this error:

 + umount /opt2/branches/freenas/os-base/amd64/_.w/usr/ports/distfiles
 umount: unmount of
 /opt2/branches/freenas/os-base/amd64/_.w/usr/ports/distfiles failed:
Device
 busy

Where do you find/see logs for the build?

Another weird thing. Somehow my /sbin was wiped out and only had some pbi-*
files in it. This happened to me on 2 different machines while trying to
build freenas.

I will try to take a closer look today when time permits.

Thanks,
Hiren



 If I try to do this manually:

 # umount /opt2/branches/freenas/os-base/amd64/_.w/usr/ports/distfiles
 umount: unmount of
 /opt2/branches/freenas/os-base/amd64/_.w/usr/ports/distfiles failed:
Device
 busy


 I can't figure out why this mount is busy.
 If I do:

 umount -f /opt2/branches/freenas/os-base/amd64/_.w/usr/ports/distfiles

 it unmounts, but I don't like using the '-f' flag to force the unmount.

 Any ideas?  I am attaching some of my logs.

 --
 Craig

 ___
 freebsd-current@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-current
 To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Cannot unmount nullfs in current

2013-04-19 Thread Andriy Gapon
on 19/04/2013 02:27 Craig Rodrigues said the following:
 I can't figure out why this mount is busy.
 If I do:
 
 umount -f /opt2/branches/freenas/os-base/amd64/_.w/usr/ports/distfiles
 
 it unmounts, but I don't like using the '-f' flag to force the unmount.
 
 Any ideas? 

fstat?

-- 
Andriy Gapon
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Cannot unmount nullfs in current

2013-04-19 Thread Ian Lepore
On Fri, 2013-04-19 at 01:12 -0700, Craig Rodrigues wrote:
 On Thu, Apr 18, 2013 at 4:27 PM, Craig Rodrigues rodr...@freebsd.orgwrote:
 
  Hi,
 
  I am trying to build some software which uses
  nanobsd, and mounts/unmounts many nullfs mounts
  while it runs.  I am hitting failures where
  I cannot unmount nullfs file systems.  I cannot figure out why.
 
 
 
 I forgot to run fstat. :(
 
 fstat /opt2/branches/freenas/os-base/amd64/_.w/usr/ports/distfiles
 USER CMD  PID   FD MOUNT  INUM MODE SZ|DV R/W NAME
 rodrigc  gam_server  2275   37
 /opt2/branches/freenas/os-base/amd64/_.w/usr/ports/distfiles 3194579
 drwxr-xr-x 196  r
 /opt2/branches/freenas/os-base/amd64/_.w/usr/ports/distfiles
 
 
 Since I run the GNOME desktop, gnome has a dependency on the gamin port.
 The gamin port contains gam_server.
 gamin monitors file system activity.  It looks like gam_server gets
 triggered
 when things are mounted, and for some reason, sometimes fails to go away.
 
 I need to read http://people.gnome.org/~veillard/gamin/config.html and
 figure out how to disable gamin,
 or just remove gamin from my system.  Annoying. :(
 

I worked around this kind of problem by putting a single entry
in /usr/local/etc/gamin/gaminrc:  

poll /*

It might be slightly less efficient to have gamin polling all mounts
instead of getting change notices from the kernel, but I've never really
noticed any performance hit, even with dozens of nullfs and devfs mounts
in various chroots.

-- Ian


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Cannot unmount nullfs in current

2013-04-19 Thread Alexander Yerenkow
Can we pretend an user-friendly-os and spam to syslog corresponding
blocking file and process whenever umount going to fail ? :)

Like, make this to be default ( or with some key at least ) behavior of
umount.

Regards, Alexander Yerenkow
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Cannot unmount nullfs in current

2013-04-19 Thread Craig Rodrigues
On Fri, Apr 19, 2013 at 7:30 AM, hiren panchasara hi...@freebsd.org wrote:

 

  00:02:37 ### log:
  /opt2/branches/freenas/os-base/amd64/_.cust.add_pkg_archivers_lzo2

 I do not get this.
  do_build.sh: ERROR: FreeNAS /opt2/branches/freenas/nanobsd/os-base build
  FAILED; please check above log for more details

 I get this which looks like a generic build failure message.

 I do not have gnome or any X related things.
 Where do you find/see logs for the build?




When building freenas, instead of doing:

sh build/do_build.sh

if you do:

sh build/do_build.sh -x

This enables a lot of tracing output.

Also, when you see an error message such as:

do_build.sh: ERROR: FreeNAS /opt2/branches/freenas/nanobsd/os-base
build FAILED; please check above log for more details

Then you need to scroll up a bit to see which log file it is referring to.

 --
Craig
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Cannot unmount nullfs in current

2013-04-19 Thread hiren panchasara
On Fri, Apr 19, 2013 at 11:17 AM, Craig Rodrigues rodr...@freebsd.org wrote:
 On Fri, Apr 19, 2013 at 7:30 AM, hiren panchasara hi...@freebsd.org wrote:

 

  00:02:37 ### log:
  /opt2/branches/freenas/os-base/amd64/_.cust.add_pkg_archivers_lzo2

 I do not get this.

  do_build.sh: ERROR: FreeNAS /opt2/branches/freenas/nanobsd/os-base build
  FAILED; please check above log for more details

 I get this which looks like a generic build failure message.

 I do not have gnome or any X related things.

 Where do you find/see logs for the build?




 When building freenas, instead of doing:

 sh build/do_build.sh

 if you do:

 sh build/do_build.sh -x

 This enables a lot of tracing output.

 Also, when you see an error message such as:

 do_build.sh: ERROR: FreeNAS /opt2/branches/freenas/nanobsd/os-base build
 FAILED; please check above log for more details

 Then you need to scroll up a bit to see which log file it is referring to.

I had tried that without success. I did not get any pointer to where
the error might be. I may have failed well before starting any
building. One of the reasons might be that I had git port without svn
support. Some of the buildscripts magic for git-svn interaction may
have failed because of that.

I am trying to fix that right now and give this another try.

cheers,
Hiren


  --
 Craig
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Cannot unmount nullfs in current

2013-04-19 Thread Craig Rodrigues
On Fri, Apr 19, 2013 at 11:36 AM, hiren panchasara hi...@freebsd.orgwrote:


 I had tried that without success. I did not get any pointer to where
 the error might be. I may have failed well before starting any
 building. One of the reasons might be that I had git port without svn
 support. Some of the buildscripts magic for git-svn interaction may
 have failed because of that.

 I am trying to fix that right now and give this another try.


Yes, you are right.
I found that to the hard way.  You need devel/git-subversion
and not devel/git port installed.  Somewhere in the build git svn is
invoked,
and will fail if you don't have devel/git-subversion installed.

--
Craig
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Cannot unmount nullfs in current

2013-04-19 Thread Craig Rodrigues
On Fri, Apr 19, 2013 at 6:35 AM, Ian Lepore i...@freebsd.org wrote:


 I worked around this kind of problem by putting a single entry
 in /usr/local/etc/gamin/gaminrc:

 poll /*



That's one option.  I used a hammer approach, and after reading
http://people.gnome.org/~veillard/gamin/config.html,
I put this in my /usr/local/etc/gamin/gaminrc:

fsset nullfs none
fsset ufs none
fsset zfs none

I think that is supposed to turn off gamin for any nullfs, ufs, or zfs file
system. :)
It seems to work for me.

--
Craig
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Cannot unmount nullfs in current

2013-04-19 Thread hiren panchasara
On Fri, Apr 19, 2013 at 12:07 PM, Craig Rodrigues rodr...@freebsd.org wrote:



 On Fri, Apr 19, 2013 at 11:36 AM, hiren panchasara hi...@freebsd.org
 wrote:


 I had tried that without success. I did not get any pointer to where
 the error might be. I may have failed well before starting any
 building. One of the reasons might be that I had git port without svn
 support. Some of the buildscripts magic for git-svn interaction may
 have failed because of that.

 I am trying to fix that right now and give this another try.


 Yes, you are right.
 I found that to the hard way.  You need devel/git-subversion
 and not devel/git port installed.  Somewhere in the build git svn is
 invoked,
 and will fail if you don't have devel/git-subversion installed.

I believe that was the problem. Installing devel/git-subversion fixed
it for me. I will poke freenas folks to add this instruction on their
git page for not-so-smart souls like myself. :-)

Thanks,
Hiren

 --
 Craig
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Cannot unmount nullfs in current

2013-04-19 Thread Craig Rodrigues
On Fri, Apr 19, 2013 at 2:36 PM, hiren panchasara hi...@freebsd.org wrote:


 I believe that was the problem. Installing devel/git-subversion fixed
 it for me. I will poke freenas folks to add this instruction on their
 git page for not-so-smart souls like myself. :-)

 Thanks,
 Hiren


See:

https://github.com/freenas/freenas/pull/11

--
Craig
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Cannot unmount nullfs in current

2013-04-19 Thread hiren panchasara
On Fri, Apr 19, 2013 at 2:56 PM, Craig Rodrigues rodr...@freebsd.org wrote:



 On Fri, Apr 19, 2013 at 2:36 PM, hiren panchasara hi...@freebsd.org wrote:


 I believe that was the problem. Installing devel/git-subversion fixed
 it for me. I will poke freenas folks to add this instruction on their
 git page for not-so-smart souls like myself. :-)

 Thanks,
 Hiren


 See:

 https://github.com/freenas/freenas/pull/11

Awesome!

Thanks,
Hiren

 --
 Craig
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org