Skip to contentSkip to conversation

autofs does not umount

DISCUSSION Aaron Straus 3 participants 9 messages Aug 27, 2009 – Sep 12, 2009 Kernel automounter

lore
Share & tools
lore
#0 lore raw

Hi all,

I was testing kernel 2.6.31-rc7 and noticed that autofs4 doesn't seem
to be umounting file systems anymore.

In particular after the timeout expires file systems seem to stay
mounted. Furthermore if I do a umount of the file system by hand it works i.e. the file system isn't busy. Also sending a USR1 signal to the automount process does not cause an umount either.

I've initially observed this behavior with NFS mounts, but set up just
a single, local bind mount (in the automount tables) and the bad behavior is still there.

I reverted to 2.6.30.5 and automount works as expected. This is on a
Ubuntu Hardy system running the autofs 4.1.4+debian-2.1ubuntu1 package.

Anybody else having this problem? Any additional info I can provide?

					Thanks,
					=a=
Signature · 3 lines
===================
Aaron Straus
[email protected]
#1 lore raw
Quoted 8 lines · Aaron Straus

I was testing kernel 2.6.31-rc7 and noticed that autofs4 doesn't seem
to be umounting file systems anymore.

In particular after the timeout expires file systems seem to stay
mounted. Furthermore if I do a umount of the file system by hand it works i.e. the file system isn't busy. Also sending a USR1 signal to the automount process does not cause an umount either.

Quoted 8 lines

I've initially observed this behavior with NFS mounts, but set up just
a single, local bind mount (in the automount tables) and the bad behavior is still there.

I reverted to 2.6.30.5 and automount works as expected. This is on a
Ubuntu Hardy system running the autofs 4.1.4+debian-2.1ubuntu1 package.

Anybody else having this problem? Any additional info I can provide?

Update. Bisection seems to yield this as the first bad commit:

commit 9393bd07cf218ca51d0e627653f906a9d76a9131

Author: Al Viro <[email protected]>
Date:   Sat Apr 18 13:58:15 2009 -0400

switch follow_down()

Al CC'd.

Thanks!

					=a=
Signature · 3 lines
===================
Aaron Straus
[email protected]

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

maintainer
#2 lore raw
Quoted 20 lines · Aaron Straus
Quoted 8 lines · Aaron Straus

I was testing kernel 2.6.31-rc7 and noticed that autofs4 doesn't seem
to be umounting file systems anymore.

In particular after the timeout expires file systems seem to stay
mounted. Furthermore if I do a umount of the file system by hand it works i.e. the file system isn't busy. Also sending a USR1 signal to the automount process does not cause an umount either.

Quoted 8 lines

I've initially observed this behavior with NFS mounts, but set up just
a single, local bind mount (in the automount tables) and the bad behavior is still there.

I reverted to 2.6.30.5 and automount works as expected. This is on a
Ubuntu Hardy system running the autofs 4.1.4+debian-2.1ubuntu1 package.

Anybody else having this problem? Any additional info I can provide?

Update. Bisection seems to yield this as the first bad commit:

Quoted 7 lines

commit 9393bd07cf218ca51d0e627653f906a9d76a9131

Author: Al Viro <[email protected]>
Date:   Sat Apr 18 13:58:15 2009 -0400

switch follow_down()

That commit certainly looks OK, a straight conversion to use struct path.

How about a debug log from autofs so we can try to find out what bit is actually going wrong.

Ian

#3 lore raw

Hi,

Quoted 4 lines · Ian Kent

That commit certainly looks OK, a straight conversion to use struct path.

How about a debug log from autofs so we can try to find out what bit is actually going wrong.

Sure.

This is auto.master:
/home /etc/auto.home

This is auto.home:
aaron :/srv/home/aaron

This is the syslog with the -d option to automount. Below you'll see me sending a USR1 signal to the automount process, but the umount not happening. After this I just umount /home/aaron by hand and then stop automounter...

Aug 27 17:10:49 catfish automount[8460]: starting automounter version 4.1.4, path = /home, maptype = file, mapname = /etc/auto.home
Aug 27 17:10:49 catfish automount[8460]: mount(bind): bind_works = 1 
Aug 27 17:10:49 catfish automount[8460]: using kernel protocol version 4.01
Aug 27 17:10:49 catfish automount[8460]: using timeout 300 seconds; freq 75 secs
Aug 27 17:10:53 catfish automount[8460]: handle_packet: type = 0 
Aug 27 17:10:53 catfish automount[8460]: handle_packet_missing: token 78, name aaron 
Aug 27 17:10:53 catfish automount[8460]: attempting to mount entry /home/aaron
Aug 27 17:10:53 catfish automount[8466]: lookup(file): aaron -> :/srv/home/aaron
Aug 27 17:10:53 catfish automount[8466]: parse(sun): expanded entry: :/srv/home/aaron
Aug 27 17:10:53 catfish automount[8466]: parse(sun): gathered options: 
Aug 27 17:10:53 catfish automount[8466]: parse(sun): dequote("/srv/home/aaron") -> /srv/home/aaron
Aug 27 17:10:53 catfish automount[8466]: parse(sun): core of entry: options=, loc=/srv/home/aaron
Aug 27 17:10:53 catfish automount[8466]: parse(sun): mounting root /home, mountpoint aaron, what /srv/home/aaron, fstype nfs, options (null) 
Aug 27 17:10:53 catfish automount[8466]: mount(nfs): root=/home name=aaron what=/srv/home/aaron, fstype=nfs, options=(null)
Aug 27 17:10:53 catfish automount[8466]: mount(nfs): aaron is local, doing bind
Aug 27 17:10:53 catfish automount[8466]: mount(bind): calling mkdir_path /home/aaron
Aug 27 17:10:53 catfish automount[8466]: mount(bind): calling mount --bind -s  -o defaults /srv/home/aaron /home/aaron
Aug 27 17:10:53 catfish automount[8466]: mount(bind): mounted /srv/home/aaron type bind on /home/aaron
Aug 27 17:10:53 catfish automount[8460]: handle_child: got pid 8466, sig 0 (0), stat 0 
Aug 27 17:10:53 catfish automount[8460]: sig_child: found pending iop pid 8466: signalled 0 (sig 0), exit status 0
Aug 27 17:10:53 catfish automount[8460]: send_ready: token=78 
Aug 27 17:11:01 catfish automount[8460]: sig 10 switching from 1 to 3
Aug 27 17:11:01 catfish automount[8460]: get_pkt: state 1, next 3
Aug 27 17:11:01 catfish automount[8460]: st_prune(): state = 1 
Aug 27 17:11:01 catfish automount[8460]: signal_children: send 10 to process group 8460
Aug 27 17:11:01 catfish automount[8460]: expire_proc: exp_proc=8469
Aug 27 17:11:01 catfish automount[8469]: expire_proc: 1 remaining in /home 
Aug 27 17:11:01 catfish automount[8460]: handle_child: got pid 8469, sig 0 (0), stat 1 
Aug 27 17:11:01 catfish automount[8460]: sigchld: exp 8469 finished, switching from 3 to 1
Aug 27 17:11:01 catfish automount[8460]: get_pkt: state 3, next 1
Aug 27 17:11:01 catfish automount[8460]: st_ready(): state = 3 
Aug 27 17:11:10 catfish automount[8460]: sig 12 switching from 1 to 5
Aug 27 17:11:10 catfish automount[8460]: get_pkt: state 1, next 5
Aug 27 17:11:10 catfish automount[8460]: prep_shutdown: state = 1 
Aug 27 17:11:10 catfish automount[8460]: signal_children: send 12 to process group 8460
Aug 27 17:11:10 catfish automount[8460]: expire_proc: exp_proc=8485
Aug 27 17:11:10 catfish automount[8460]: prep_shutdown: expire returns 1 
Aug 27 17:11:10 catfish automount[8460]: handle_child: got pid 8485, sig 0 (0), stat 0 
Aug 27 17:11:10 catfish automount[8460]: sigchld: exp 8485 finished, switching from 5 to 6
Aug 27 17:11:10 catfish automount[8460]: get_pkt: state 5, next 6
Aug 27 17:11:10 catfish automount[8460]: umount_multi: path=/home incl=0 
Aug 27 17:11:10 catfish automount[8460]: umount_multi: no mounts found under /home
Aug 27 17:11:10 catfish automount[8460]: shut down, path = /home
Signature · 3 lines
===================
Aaron Straus
[email protected]
maintainer
#4 lore raw
Quoted 21 lines · Aaron Straus

Hi,

Quoted 4 lines · Ian Kent

That commit certainly looks OK, a straight conversion to use struct path.

How about a debug log from autofs so we can try to find out what bit is actually going wrong.

Sure.

This is auto.master:
/home /etc/auto.home

This is auto.home:
aaron :/srv/home/aaron

This is the syslog with the -d option to automount. Below you'll see me sending a USR1 signal to the automount process, but the umount not happening. After this I just umount /home/aaron by hand and then stop automounter...

Quoted 8 lines
Aug 27 17:11:01 catfish automount[8460]: sig 10 switching from 1 to 3
Aug 27 17:11:01 catfish automount[8460]: get_pkt: state 1, next 3
Aug 27 17:11:01 catfish automount[8460]: st_prune(): state = 1 
Aug 27 17:11:01 catfish automount[8460]: signal_children: send 10 to process group 8460
Aug 27 17:11:01 catfish automount[8460]: expire_proc: exp_proc=8469
Aug 27 17:11:01 catfish automount[8469]: expire_proc: 1 remaining in /home 
Aug 27 17:11:01 catfish automount[8460]: handle_child: got pid 8469, sig 0 (0), stat 1 
Aug 27 17:11:01 catfish automount[8460]: sigchld: exp 8469 finished, switching from 3 to 1

Right, it isn't seeing the mount as expirable.

It's likely due to a missed case in the conversion to use struct path.

Could you test with this patch please.

autofs4 - 2.6.31-rc8 fix

From: Ian Kent <[email protected]>

Looks like we missed one case when we converted to use struct path.
---

 fs/autofs4/expire.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/autofs4/expire.c +1 -1
index aa39ae8..1294704 100644
@@ -77,7 +77,7 @@ static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry)
 	}
 
 	/* Update the expiry counter if fs is busy */
-	if (!may_umount_tree(mnt)) {
+	if (!may_umount_tree(&path.mnt)) {
 		struct autofs_info *ino = autofs4_dentry_ino(top);
 		ino->last_used = jiffies;
 		goto done;
maintainer
#5 lore raw
Quoted 53 lines · Ian Kent
Quoted 20 lines · Aaron Straus

Hi,

Quoted 4 lines · Ian Kent

That commit certainly looks OK, a straight conversion to use struct path.

How about a debug log from autofs so we can try to find out what bit is actually going wrong.

Sure.

This is auto.master:
/home /etc/auto.home

This is auto.home:
aaron :/srv/home/aaron

This is the syslog with the -d option to automount. Below you'll see me sending a USR1 signal to the automount process, but the umount not happening. After this I just umount /home/aaron by hand and then stop automounter...

Quoted 8 lines
Aug 27 17:11:01 catfish automount[8460]: sig 10 switching from 1 to 3
Aug 27 17:11:01 catfish automount[8460]: get_pkt: state 1, next 3
Aug 27 17:11:01 catfish automount[8460]: st_prune(): state = 1 
Aug 27 17:11:01 catfish automount[8460]: signal_children: send 10 to process group 8460
Aug 27 17:11:01 catfish automount[8460]: expire_proc: exp_proc=8469
Aug 27 17:11:01 catfish automount[8469]: expire_proc: 1 remaining in /home 
Aug 27 17:11:01 catfish automount[8460]: handle_child: got pid 8469, sig 0 (0), stat 1 
Aug 27 17:11:01 catfish automount[8460]: sigchld: exp 8469 finished, switching from 3 to 1

Right, it isn't seeing the mount as expirable.

It's likely due to a missed case in the conversion to use struct path.

Could you test with this patch please.

autofs4 - 2.6.31-rc8 fix

From: Ian Kent <[email protected]>

Looks like we missed one case when we converted to use struct path.
---

 fs/autofs4/expire.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/autofs4/expire.c +0 -0
index aa39ae8..1294704 100644

fs/autofs4/expire.c static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry) · line 80

Quoted 5 lines
fs/autofs4/expire.c +1 -1
@@ -77,7 +77,7 @@ static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry)
 	}
 
 	/* Update the expiry counter if fs is busy */
-	if (!may_umount_tree(mnt)) {
+	if (!may_umount_tree(&path.mnt)) {

My bad, sorry.
I think that really should be path.mnt not &path.mnt.

Ian

#6 lore raw

Hi,

Quoted 5 lines · Ian Kent

fs/autofs4/expire.c static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry) · line 80

Quoted 2 lines
fs/autofs4/expire.c +1 -1
-	if (!may_umount_tree(mnt)) {
+	if (!may_umount_tree(&path.mnt)) {

My bad, sorry.
I think that really should be path.mnt not &path.mnt.

Yep. I confirm the fixed-up patch fixes the problems I'm seeing.

Thanks for the help!!

=a=

Signature · 3 lines
===================
Aaron Straus
[email protected]
maintainer
#7 lore raw
Quoted 9 lines · Aaron Straus

Hi,

Quoted 4 lines · Ian Kent

fs/autofs4/expire.c static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry) · line 80

Quoted 2 lines
fs/autofs4/expire.c +1 -1
-	if (!may_umount_tree(mnt)) {
+	if (!may_umount_tree(&path.mnt)) {

My bad, sorry.
I think that really should be path.mnt not &path.mnt.

Yep. I confirm the fixed-up patch fixes the problems I'm seeing.

Al,

Would you like me to post my corrected patch to LKML (to akpm or ??) or would you like to take care of it?

Ian

#8 lore raw
Quoted 9 lines · Ian Kent
Quoted 8 lines · Aaron Straus

Hi,

Quoted 4 lines · Ian Kent

fs/autofs4/expire.c static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry) · line 80

Quoted 2 lines
fs/autofs4/expire.c +1 -1
-	if (!may_umount_tree(mnt)) {
+	if (!may_umount_tree(&path.mnt)) {

My bad, sorry.
I think that really should be path.mnt not &path.mnt.

Quoted 6 lines
Quoted 1 line

Yep. I confirm the fixed-up patch fixes the problems I'm seeing.

Al,

Would you like me to post my corrected patch to LKML (to akpm or ??) or would you like to take care of it?

My apologies, both for the original breakage and late reply ;-/ Along with belated ACK on the fix.