Architecture : x86_64 emulated by VirtualBox version 4.1.2_Ubuntu r38459 Distributive : Ubuntu 12.04 File System : Ext4 Detected by the Spruce System (http://linuxtesting.org/spruce) Bug appears when trying to mount a device with MS_NODEV flag attempted. See the kernel message attached below.
I don't see the attached kernel logs; can you please attach it to this bug report? Thanks!!
Created attachment 88611 [details] kernel log file
I just built 3.2.29, and running under KVM, I created a file system, mounted it with -o nodev, and then unmounted it. It didn't crash. I then mounted it without nodev, ran "mknod /mnt/null c 3 1" to create a /dev/null character device, unmounted the file system, remounted it with -o nodev, tried writing to /mnt/null, which failed as it should, and then unmounted the file system. Still no crash. Can you tell me if there was anything else special about how you ran your test? Did it fail right on the mount? Was this the root file system that you were testing trying to mount -o nodev, etc.?
Hmm, I looked at the stack trace again, and I see "sys_inotify_rm_watch" in the stack trace. I wonder if this is a generic VFS-level inotify bug, perhaps? I don't have an easy way of setting up an inotify in my bare-bones KVM environment. Can you tell me a bit more about your environment and what you might be using that might be setting an inotify on something on your file system?
I was executing a system called Spruce(which is performing a verification of Linux file System drivers). The crash come out on the test which is performing a mount of the current device on the current mount point with MS_NODEV flag activated. Also program was compiled as a 32-bit program (with Ubuntu Multilib) but on 64 bit architecture. Hope that helps.
Well, I was using a 64-bit kernel and a 32-bit mount program, so that replicates what you are doing, and a "mount -o nodev" will use MS_NODEV. And I'm using a stock 3.2.29 kernel. At this point I don't know what to tell you. I can't duplicate the problem here. If you can give me an easy reproduction that you can run by hand, great. Otherwise, I'm going to have to close this out as not reproducible. The other possibility is this is an Ubuntu bug. Are you using a stock kernel, or is this a kernel with Ubuntu's "value added patches"? If this is not a stock kernel, I'd advise that you submit this bug to Ubuntu.
I was using a base kernel which is coming with Ubuntu 12.04
Can you replicate the problem **without** using Spruce? In any case, I would suggest sending a bug report with Canonical, since this is a Ubuntu kernel --- and despite my best efforts, I can not replicate the problem as you have described it on a stock 3.2.29 or 3.7-rc4 development kernel.
I couldn't replicate the problem without Spruce yet, but still I am trying. Also I want to notice that You are using 3.2.29 but my kernel is 3.2.0.-29. I will try to send this problem to Canonical too.
(In reply to comment #4) > Hmm, I looked at the stack trace again, and I see "sys_inotify_rm_watch" in > the > stack trace. I wonder if this is a generic VFS-level inotify bug, perhaps? It looks like it is actually a data race in VFS layer: https://patchwork.kernel.org/patch/1685431/ We observed the same issue with JFS file system.