Skip to contentSkip to conversation

FC6 automounter stops mounting NFS mounts

DISCUSSION Jimmy Dorff 2 participants 5 messages Apr 24, 2007 – Apr 26, 2007 Kernel automounter

lore
Share & tools
lore
#0 lore raw

Hi,

I have a number of FC6 workstations that intermittently have a problem with automount, where it simply stops mounting filesystems. If you attempt to access a directory which automount would normally mount your command simply hangs. The automount process is running and still writes logs from the "verbose" option, but the logs don't indicate any problem.
The logs just show the "mount still busy" messages from previously
mounted filesystem(s). On the NFS server I don't see any mount requests from the afflicted client.

To "fix" the problem, I simply restart automount via "service autofs restart" and everything works as expected.

We have been seeing this problem intermittently throughout our use of FC6. I don't have any clue what makes it happen. Any info on how I can prevent this or gather more debug info is welcomed!

Details:
automounter version 5.0.1-0.rc3.26 on Fedora 6
kernel: 2.6.20-1.2933.fc6 i686
started as:
"automount --timeout=60 --verbose"
reading mounts from a NIS map from CentOS NIS server(s)

Thanks,
Jimmy Dorff

maintainer
#1 lore raw
Quoted 11 lines · Jimmy Dorff

Hi,

I have a number of FC6 workstations that intermittently have a problem with automount, where it simply stops mounting filesystems. If you attempt to access a directory which automount would normally mount your command simply hangs. The automount process is running and still writes logs from the "verbose" option, but the logs don't indicate any problem.
The logs just show the "mount still busy" messages from previously
mounted filesystem(s). On the NFS server I don't see any mount requests from the afflicted client.

Quoted 6 lines

To "fix" the problem, I simply restart automount via "service autofs restart" and everything works as expected.

We have been seeing this problem intermittently throughout our use of FC6. I don't have any clue what makes it happen. Any info on how I can prevent this or gather more debug info is welcomed!

Provide a debug log.
Provide your maps including the master map.
See http://people.redhat.com/jmoyer for more information about how to do this.

In order to resolve problems like this I need to be able to reproduce them. Any information you can provide on this would be useful.

Things such as:
how long is it before you see this happen?
does it always happen to the same mount?
is the mount part of a multi-mount map entry?

What revision of util-linux, nfs-utils and nfs-utils-lib are you using?

Ian

#2 lore raw
Quoted 7 lines · Ian Kent

Provide a debug log.
Provide your maps including the master map.
See http://people.redhat.com/jmoyer for more information about how to do this.

In order to resolve problems like this I need to be able to reproduce them. Any information you can provide on this would be useful.

Thanks for the info. I'll setup a test system with the additional debugging and see if I can reproduce this at will.

Quoted 2 lines

Things such as:
how long is it before you see this happen?

Systems are fine for weeks.

Quoted 1 line

does it always happen to the same mount?

No.

Quoted 1 line

is the mount part of a multi-mount map entry?

Nope.

Quoted 1 line

What revision of util-linux, nfs-utils and nfs-utils-lib are you using?

util-linux-2.13-0.46.fc6
nfs-utils-1.0.10-7.fc6
nfs-utils-lib-1.0.8-7.2

Thanks,
Jimmy

maintainer
#3 lore raw
Quoted 19 lines · Jimmy Dorff
Quoted 7 lines · Ian Kent

Provide a debug log.
Provide your maps including the master map.
See http://people.redhat.com/jmoyer for more information about how to do this.

In order to resolve problems like this I need to be able to reproduce them. Any information you can provide on this would be useful.

Thanks for the info. I'll setup a test system with the additional debugging and see if I can reproduce this at will.

Quoted 2 lines

Things such as:
how long is it before you see this happen?

Systems are fine for weeks.

Quoted 1 line

does it always happen to the same mount?

No.

Quoted 8 lines
Quoted 1 line

is the mount part of a multi-mount map entry?

Nope.

Quoted 1 line

What revision of util-linux, nfs-utils and nfs-utils-lib are you using?

util-linux-2.13-0.46.fc6
nfs-utils-1.0.10-7.fc6
nfs-utils-lib-1.0.8-7.2

This looks fine.

Since your going to the trouble of setting up a test machine (good idea) it would be good to make sure we cover all known bugs. So, if possible, could you try to build a kernel
with /usr/share/doc/autofs-5.0.1/autofs4-2.6.20-v5-update.patch applied. I think it will apply cleanly to the source of the kernel your running.

Ian

maintainer
#4 lore raw
Quoted 29 lines · Ian Kent
Quoted 19 lines · Jimmy Dorff
Quoted 7 lines · Ian Kent

Provide a debug log.
Provide your maps including the master map.
See http://people.redhat.com/jmoyer for more information about how to do this.

In order to resolve problems like this I need to be able to reproduce them. Any information you can provide on this would be useful.

Thanks for the info. I'll setup a test system with the additional debugging and see if I can reproduce this at will.

Quoted 2 lines

Things such as:
how long is it before you see this happen?

Systems are fine for weeks.

Quoted 1 line

does it always happen to the same mount?

No.

Quoted 8 lines
Quoted 1 line

is the mount part of a multi-mount map entry?

Nope.

Quoted 1 line

What revision of util-linux, nfs-utils and nfs-utils-lib are you using?

util-linux-2.13-0.46.fc6
nfs-utils-1.0.10-7.fc6
nfs-utils-lib-1.0.8-7.2

Quoted 7 lines

This looks fine.

Since your going to the trouble of setting up a test machine (good idea) it would be good to make sure we cover all known bugs. So, if possible, could you try to build a kernel
with /usr/share/doc/autofs-5.0.1/autofs4-2.6.20-v5-update.patch applied. I think it will apply cleanly to the source of the kernel your running.

Sorry, that patch has been updated.

Use this instead.

---

fs/autofs4/autofs_i.h +4 -0
diff -Nurp linux-2.6.20.orig/fs/autofs4/autofs_i.h linux-2.6.20/fs/autofs4/autofs_i.h
@@ -52,6 +52,8 @@ struct autofs_info {
 
 	int		flags;
 
+	struct list_head rehash;
+
 	struct autofs_sb_info *sbi;
 	unsigned long last_used;
 	atomic_t count;
@@ -110,6 +112,8 @@ struct autofs_sb_info {
 	struct mutex wq_mutex;
 	spinlock_t fs_lock;
 	struct autofs_wait_queue *queues; /* Wait queue pointer */
+	spinlock_t rehash_lock;
+	struct list_head rehash_list;
 };
 
 static inline struct autofs_sb_info *autofs4_sbi(struct super_block *sb)
fs/autofs4/inode.c +6 -3
diff -Nurp linux-2.6.20.orig/fs/autofs4/inode.c linux-2.6.20/fs/autofs4/inode.c
@@ -48,6 +48,8 @@ struct autofs_info *autofs4_init_ino(str
 	ino->dentry = NULL;
 	ino->size = 0;
 
+	INIT_LIST_HEAD(&ino->rehash);
+
 	ino->last_used = jiffies;
 	atomic_set(&ino->count, 0);
 
@@ -158,14 +160,13 @@ void autofs4_kill_sb(struct super_block 
 	if (!sbi)
 		goto out_kill_sb;
 
-	sb->s_fs_info = NULL;
-
-	if ( !sbi->catatonic )
+	if (!sbi->catatonic)
 		autofs4_catatonic_mode(sbi); /* Free wait queues, close pipe */
 
 	/* Clean up and release dangling references */
 	autofs4_force_release(sbi);
 
+	sb->s_fs_info = NULL;
 	kfree(sbi);
 
 out_kill_sb:
@@ -336,6 +337,8 @@ int autofs4_fill_super(struct super_bloc
 	mutex_init(&sbi->wq_mutex);
 	spin_lock_init(&sbi->fs_lock);
 	sbi->queues = NULL;
+	spin_lock_init(&sbi->rehash_lock);
+	INIT_LIST_HEAD(&sbi->rehash_list);
 	s->s_blocksize = 1024;
 	s->s_blocksize_bits = 10;
 	s->s_magic = AUTOFS_SUPER_MAGIC;
fs/autofs4/root.c +170 -24

271 lines not on this page · raw message

fs/autofs4/waitq.c +8 -4
diff -Nurp linux-2.6.20.orig/fs/autofs4/waitq.c linux-2.6.20/fs/autofs4/waitq.c
@@ -84,7 +84,11 @@ static void autofs4_notify_daemon(struct
 				 struct autofs_wait_queue *wq,
 				 int type)
 {
-	union autofs_packet_union pkt;
+	union {
+		struct autofs_packet_hdr hdr;
+		union autofs_packet_union v4_pkt;
+		union autofs_v5_packet_union v5_pkt;
+	} pkt;
 	size_t pktsz;
 
 	DPRINTK("wait id = 0x%08lx, name = %.*s, type=%d",
@@ -98,7 +102,7 @@ static void autofs4_notify_daemon(struct
 	/* Kernel protocol v4 missing and expire packets */
 	case autofs_ptype_missing:
 	{
-		struct autofs_packet_missing *mp = &pkt.missing;
+		struct autofs_packet_missing *mp = &pkt.v4_pkt.missing;
 
 		pktsz = sizeof(*mp);
 
@@ -110,7 +114,7 @@ static void autofs4_notify_daemon(struct
 	}
 	case autofs_ptype_expire_multi:
 	{
-		struct autofs_packet_expire_multi *ep = &pkt.expire_multi;
+		struct autofs_packet_expire_multi *ep = &pkt.v4_pkt.expire_multi;
 
 		pktsz = sizeof(*ep);
 
@@ -129,7 +133,7 @@ static void autofs4_notify_daemon(struct
 	case autofs_ptype_missing_direct:
 	case autofs_ptype_expire_direct:
 	{
-		struct autofs_v5_packet *packet = &pkt.v5_packet;
+		struct autofs_v5_packet *packet = &pkt.v5_pkt.v5_packet;
 
 		pktsz = sizeof(*packet);
 
include/linux/auto_fs4.h +12 -4
diff -Nurp linux-2.6.20.orig/include/linux/auto_fs4.h linux-2.6.20/include/linux/auto_fs4.h
@@ -59,6 +59,13 @@ struct autofs_packet_expire_multi {
 	char name[NAME_MAX+1];
 };
 
+union autofs_packet_union {
+	struct autofs_packet_hdr hdr;
+	struct autofs_packet_missing missing;
+	struct autofs_packet_expire expire;
+	struct autofs_packet_expire_multi expire_multi;
+};
+
 /* autofs v5 common packet struct */
 struct autofs_v5_packet {
 	struct autofs_packet_hdr hdr;
@@ -78,12 +85,13 @@ typedef struct autofs_v5_packet autofs_p
 typedef struct autofs_v5_packet autofs_packet_missing_direct_t;
 typedef struct autofs_v5_packet autofs_packet_expire_direct_t;
 
-union autofs_packet_union {
+union autofs_v5_packet_union {
 	struct autofs_packet_hdr hdr;
-	struct autofs_packet_missing missing;
-	struct autofs_packet_expire expire;
-	struct autofs_packet_expire_multi expire_multi;
 	struct autofs_v5_packet v5_packet;
+	autofs_packet_missing_indirect_t missing_indirect;
+	autofs_packet_expire_indirect_t expire_indirect;
+	autofs_packet_missing_direct_t missing_direct;
+	autofs_packet_expire_direct_t expire_direct;
 };
 
 #define AUTOFS_IOC_EXPIRE_MULTI		_IOW(0x93,0x66,int)