I have been trying to get pam_mount to mount a tmpfs drive for domain users, so that it is volatile storage and is cleared on every logout. The problem I found was that although the area would mount fine, it wouldn't unmount again. Checking in auth.log showed me that the umount command was saying Device is busy.
So I tried to manually unmount the device (the user is logged out at this stage) but the error was still persisting. However, lsof and fuser showed no files opened within the area. Looking at some other related problems I also tried losetup to find any loopback devices, but there were none. The exact mount command I used was:
mount -t tmpfs -o uid=1001,gid=1001,size=100m,mode=0700 none /home/user
To cut a long story short, I have narrowed the cause down to something in X, the X session, XFCE, LightDM login, or any other graphical apps. The problem does not manifest itself with virtual terminal logins, or if I don't log in at all. Unmounting only gives the error if I log in through the graphical login.
And just to make it even more confusing, I tried the same test on my home Arch system which also runs XFCE. This time it worked flawlessly.
System specs: Ubuntu 12.04, XFCE desktop, LightDM with KDE greeter, winbind authentication.