umount.cifs does not work on logout with libpam-mount

Bug #578587 reported by Jesse Griffin
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: samba

Ubuntu 10.04 i686
 smbfs 2:3.4.7
 libpam-mount 1.32-2

Issue:
I'm mounting home directories and file shares using cifs and pam_mount (likewise-open5 for authentication). On logout pam_mount is not able to unmount the cifs shares. I created a logout script (/etc/gdm/PostSession/Default) that runs 'umount -fl $MOUNT' but I get this kernel bug:

May 10 17:11:16 lstextub1004 kernel: [ 216.942808] BUG: Dentry d5898110{i=3,n=/} still in use (2) [unmount of cifs cifs]
May 10 17:11:16 lstextub1004 kernel: [ 216.943470] ------------[ cut here ]------------
May 10 17:11:16 lstextub1004 kernel: [ 216.943493] kernel BUG at /build/buildd/linux-2.6.32/fs/dcache.c:670!
May 10 17:11:16 lstextub1004 kernel: [ 216.943548] invalid opcode: 0000 [#1] SMP
May 10 17:11:16 lstextub1004 kernel: [ 216.943597] last sysfs file: /sys/devices/virtual/misc/rfkill/uevent
May 10 17:11:16 lstextub1004 kernel: [ 216.943678] Modules linked in: nls_cp437 cifs binfmt_misc fbcon tileblit font bitblit softcursor ppdev parport_pc intel_agp lp vga16fb parport shpchp vgastate i2c_piix4 agpgart psmouse serio_raw mptspi mptscsih mptbase pcnet32 mii floppy scsi_transport_spi
May 10 17:11:16 lstextub1004 kernel: [ 216.943811]
May 10 17:11:16 lstextub1004 kernel: [ 216.943912] Pid: 2059, comm: umount.cifs Not tainted (2.6.32-22-generic #33-Ubuntu) VMware Virtual Platform
May 10 17:11:16 lstextub1004 kernel: [ 216.943929] EIP: 0060:[<c0219ea9>] EFLAGS: 00010286 CPU: 3
May 10 17:11:16 lstextub1004 kernel: [ 216.944184] EIP is at shrink_dcache_for_umount_subtree+0x249/0x260
May 10 17:11:16 lstextub1004 kernel: [ 216.944218] EAX: 0000005b EBX: d5898110 ECX: ffffffa8 EDX: 00000000
May 10 17:11:16 lstextub1004 kernel: [ 216.944233] ESI: 00000002 EDI: e0a33728 EBP: df667f38 ESP: df667f0c
May 10 17:11:16 lstextub1004 kernel: [ 216.944256] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
May 10 17:11:16 lstextub1004 kernel: [ 216.944292] Process umount.cifs (pid: 2059, ti=df666000 task=dfe099a0 task.ti=df666000)
May 10 17:11:16 lstextub1004 kernel: [ 216.944309] Stack:
May 10 17:11:16 lstextub1004 kernel: [ 216.944343] c06ce160 d5898110 00000003 d589816c 00000002 e0a33728 de69b964 d589816c
May 10 17:11:16 lstextub1004 kernel: [ 216.944406] <0> de69b800 e0a30500 c0248b80 df667f44 c0219eed de69b800 df667f5c c0209c70
May 10 17:11:16 lstextub1004 kernel: [ 216.944422] <0> df667f54 c058b6ed 00000018 e0a42de0 df667f68 c0209d91 de69b800 df667f7c
May 10 17:11:16 lstextub1004 kernel: [ 216.944469] Call Trace:
May 10 17:11:16 lstextub1004 kernel: [ 216.944807] [<c0248b80>] ? vfs_quota_off+0x0/0x20
May 10 17:11:16 lstextub1004 kernel: [ 216.944830] [<c0219eed>] ? shrink_dcache_for_umount+0x2d/0x50
May 10 17:11:16 lstextub1004 kernel: [ 216.944841] [<c0209c70>] ? generic_shutdown_super+0x20/0xe0
May 10 17:11:16 lstextub1004 kernel: [ 216.944853] [<c058b6ed>] ? _spin_lock+0xd/0x10
May 10 17:11:16 lstextub1004 kernel: [ 216.944857] [<c0209d91>] ? kill_anon_super+0x11/0x50
May 10 17:11:16 lstextub1004 kernel: [ 216.944861] [<c020ab74>] ? deactivate_super+0x64/0x90
May 10 17:11:16 lstextub1004 kernel: [ 216.944867] [<c022009f>] ? mntput_no_expire+0x8f/0xe0
May 10 17:11:16 lstextub1004 kernel: [ 216.944871] [<c02206b7>] ? sys_umount+0x47/0xa0
May 10 17:11:16 lstextub1004 kernel: [ 216.944879] [<c01033ec>] ? syscall_call+0x7/0xb
May 10 17:11:16 lstextub1004 kernel: [ 216.944924] Code: 64 01 00 00 89 54 24 18 8b 55 f0 89 7c 24 14 89 74 24 10 89 5c 24 04 89 54 24 0c 89 44 24 08 c7 04 24 60 e1 6c c0 e8 bc f0 36 00 <0f> 0b eb fe 0f 0b eb fe eb 0d 90 90 90 90 90 90 90 90 90 90 90
May 10 17:11:16 lstextub1004 kernel: [ 216.945069] EIP: [<c0219ea9>] shrink_dcache_for_umount_subtree+0x249/0x260 SS:ESP 0068:df667f0c
May 10 17:11:16 lstextub1004 kernel: [ 216.945358] ---[ end trace e0186b2f99b7f194 ]---

Jesse Griffin (jag3773)
security vulnerability: yes → no
visibility: private → public
Revision history for this message
Jesse Griffin (jag3773) wrote :

Upon further investigation, this kernel bug causing the system to hang only occurs with one of our samba shares. However, I'm still not sure why it is occurring at all.

Chuck Short (zulcss)
affects: samba (Ubuntu) → linux (Ubuntu)
Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

Hi Jesse,

Please be sure to confirm this issue exists with the latest development release of Ubuntu. ISO CD images are available from http://cdimage.ubuntu.com/releases/ . If the issue remains, please run the following command from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux 578587

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

    [This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-kernel-logs
tags: added: needs-upstream-testing
tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Michael Cook (mcook2) wrote :
Download full text (8.5 KiB)

1) On Ubuntu 10.4

usame -a
Linux cara 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC 2010 i686 GNU/Linux

smbstatus
Samba version is 3.4.7

2) Target system is OSX 10.4.11 with Samba version 3.0.10

3) Run these commands:

sudo mount -t cifs -o username=mcook,password=Rq77256A //192.168.2.106/public /mnt/mona/public
sudo mount -t cifs -o username=mcook,password=Rq77256A //192.168.2.106/public /mnt/mona/public
sudo mount -t cifs
 -o username=mcook,password=Rq77256A //192.168.2.106/WetMice /mnt/mona/WetMice

4) Shares are readable/writable fro Ubuntu to OSX as expected.

5) At this point mount and df commands on Ubuntu show the following ...

mount
/dev/sdb5 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
none on /var/lib/ureadahead/debugfs type debugfs (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/mcook/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=mcook)
/dev/sda5 on /media/50e9340a-6127-467a-9c7a-c764037c417e type ext3 (rw,nosuid,nodev,uhelper=udisks)
//192.168.2.106/public on /mnt/mona/public type cifs (rw,username=mcook,password=Rq77256A)
//192.168.2.106/WetMice on /mnt/mona/WetMice type cifs (rw,username=mcook,password=Rq77256A)
//192.168.2.106/mcook on /mnt/mona/mcook type cifs (rw,username=mcook,password=Rq77256A,uid=1000,gid=1000,file_mode=0640,dir_mode=0750,iocharset=utf8)

df -k -F cifs shows ..

mcook@cara:~$ df -k -F cifs
Filesystem 1K-blocks Used Available Use% Mounted on
//192.168.2.106/public
                     156155904 105848832 50307072 68% /mnt/mona/public
//192.168.2.106/public
                     156155904 105848832 50307072 68% /mnt/mona/public
//192.168.2.106/WetMice
                      77392904 3173308 70288256 5% /mnt/mona/WetMice

6) Try to umount any one of these three shares.

7) The command hangs and syslog shows

Jun 18 18:23:13 cara kernel: [ 494.737792] Slow work thread pool: Ready
Jun 18 18:23:13 cara kernel: [ 494.750875] CIFS VFS: cifs_mount failed w/return code = -22
Jun 18 18:23:31 cara kernel: [ 512.897365] CIFS VFS: cifs_mount failed w/return code = -22
Jun 18 18:23:59 cara kernel: [ 541.267717] CIFS VFS: Send error in SETFSUnixInfo = -5
Jun 18 18:23:59 cara kernel: [ 541.267725] CIFS VFS: Negotiating Unix capabilities with the server failed. Consider mounting with the Unix Extensions
Jun 18 18:23:59 cara kernel: [ 541.267729] disabled, if problems are found, by specifying the nounix mount option.
Jun 18 18:24:43 cara kernel: [ 585.381653] CIFS VFS: Send error in SETFSUnixInfo = -5
Jun 18 18:24:43 cara kernel: [ 585.381662] CIFS VFS: ...

Read more...

Revision history for this message
Michael Cook (mcook2) wrote :

apport-collect -p linux 578587 won't run for me here 'cos ..

"You are not the reporter or subscriber of this problem report, or the report is a duplicate or already closed.

Please create a new report using "apport-bug"."

Trying apport-bug .. will update later if I get more info.

Revision history for this message
Jesse Griffin (jag3773) wrote :

Michael,

I added you as a subscriber on this bug, thus you should be able to run apport-collect -p linux 578587.

Thanks for the help on this, I've been swamped lately...

Jesse

Revision history for this message
Michael Cook (mcook2) wrote :

Hi there,

I tried this again, got the Seg fault, then rebooted and tried apport-collect, but it still says the same:

"You are not the reporter or subscriber of this problem report, or the report is a duplicate or already closed.
Please create a new report using "apport-bug"."

I'll keep an eye on the problem and let you know if anything interesting happens.

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Incomplete and has not had any updated comments for quite some time. As a result this bug is being closed. Please reopen if this is still an issue in the current Ubuntu release http://www.ubuntu.com/getubuntu/download . Also, please be sure to provide any requested information that may have been missing. To reopen the bug, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-expired
Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.