Bug 3935 - beagleboard/routerstation/mpc8315e: abnormal filesystem-related messages in dmesg when plugging a usb stick
Summary: beagleboard/routerstation/mpc8315e: abnormal filesystem-related messages in d...
Status: VERIFIED FIXED
Alias: None
Product: BSPs
Classification: Build System, Metadata & Runtime
Component: bsps-meta-yocto (show other bugs)
Version: 1.4
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.4 M6
Assignee: Donn Seeley
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-02-26 03:32 UTC by Yi Zhao
Modified: 2013-04-19 09:43 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yi Zhao 2013-02-26 03:32:32 UTC
Image location: http://autobuilder.yoctoproject.org/pub/nightly/20130220-2

Git rev:
master:7d22ef28e64de06b6238d0ef9b664c0bee6efa46

When plug a usb stick to the board. There are some error message in demsg.

Beagleboard:
#####################
usb 1-2.4.1: USB disconnect, device number 7
usb 1-2.4.1: new high-speed USB device number 8 using ehci-omap
scsi1 : usb-storage 1-2.4.1:1.0
scsi 1:0:0:0: Direct-Access     Netac    OnlyDisk         1.00 PQ: 0 ANSI: 2
sd 1:0:0:0: [sda] 2009600 512-byte logical blocks: (1.02 GB/981 MiB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 03 00 00 00
sd 1:0:0:0: [sda] No Caching mode page present
sd 1:0:0:0: [sda] Assuming drive cache: write through
sd 1:0:0:0: [sda] No Caching mode page present
sd 1:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 1:0:0:0: [sda] No Caching mode page present
sd 1:0:0:0: [sda] Assuming drive cache: write through
sd 1:0:0:0: [sda] Attached SCSI removable disk
EXT4-fs (sda): VFS: Can't find ext4 filesystem
EXT3-fs (sda): error: can't find ext3 filesystem on dev sda.
EXT2-fs (sda): error: can't find an ext2 filesystem on dev sda.
FAT-fs (sda): invalid media value (0xb9)
FAT-fs (sda): Can't find a valid FAT filesystem
VFS: Can't find a Minix filesystem V1 | V2 | V3 on device sda.
kjournald starting.  Commit interval 5 seconds
EXT3-fs (sda1): using internal journal
EXT3-fs (sda1): mounted filesystem with ordered data mode
##############

Routerstation:
#############
EXT4-fs (sda): VFS: Can't find ext4 filesystem
EXT3-fs (sda): error: can't find ext3 filesystem on dev sda.
EXT2-fs (sda): error: can't find an ext2 filesystem on dev sda.
FAT-fs (sda): invalid media value (0xb9)
FAT-fs (sda): Can't find a valid FAT filesystem
VFS: Can't find a Minix filesystem V1 | V2 | V3 on device sda.
SQUASHFS error: Can't find a SQUASHFS superblock on sda
FAT-fs (sda): invalid media value (0xb9)
FAT-fs (sda): Can't find a valid FAT filesystem
EXT3-fs (sda1): warning: maximal mount count reached, running e2fsck is recommended
kjournald starting.  Commit interval 5 seconds
EXT3-fs (sda1): using internal journal
EXT3-fs (sda1): recovery complete
EXT3-fs (sda1): mounted filesystem with ordered data mode
###############

Mpc8315e:
###############
EXT4-fs (sda): VFS: Can't find ext4 filesystem
EXT3-fs (sda): error: can't find ext3 filesystem on dev sda.
EXT2-fs (sda): error: can't find an ext2 filesystem on dev sda.
FAT-fs (sda): invalid media value (0x00)
FAT-fs (sda): Can't find a valid FAT filesystem
EXT4-fs (sdb): VFS: Can't find ext4 filesystem
EXT3-fs (sdb): error: can't find ext3 filesystem on dev sdb.
EXT2-fs (sdb): error: can't find an ext2 filesystem on dev sdb.
FAT-fs (sdb): bogus number of reserved sectors
FAT-fs (sdb): Can't find a valid FAT filesystem
VFS: Can't find a Minix filesystem V1 | V2 | V3 on device sda.
FAT-fs (sda): invalid media value (0x00)
FAT-fs (sda): Can't find a valid FAT filesystem
VFS: Can't find a Minix filesystem V1 | V2 | V3 on device sdb.
FAT-fs (sdb): bogus number of reserved sectors
FAT-fs (sdb): Can't find a valid FAT filesystem
EXT4-fs (sda4): unable to read superblock
EXT3-fs (sda4): error: unable to read superblock
EXT2-fs (sda4): error: unable to read superblock
kjournald starting.  Commit interval 5 seconds
EXT3-fs (sdb1): using internal journal
EXT3-fs (sdb1): mounted filesystem with ordered data mode
FAT-fs (sda4): bogus number of reserved sectors
FAT-fs (sda4): Can't find a valid FAT filesystem
MINIX-fs: unable to read superblock
FAT-fs (sda4): bogus number of reserved sectors
FAT-fs (sda4): Can't find a valid FAT filesystem
kjournald starting.  Commit interval 5 seconds
EXT3-fs (sda5): using internal journal
EXT3-fs (sda5): recovery complete
EXT3-fs (sda5): mounted filesystem with ordered data mode
kjournald starting.  Commit interval 5 seconds
EXT3-fs (sda3): using internal journal
EXT3-fs (sda3): recovery complete
EXT3-fs (sda3): mounted filesystem with ordered data mode
kjournald starting.  Commit interval 5 seconds
EXT3-fs (sda1): using internal journal
EXT3-fs (sda1): recovery complete
EXT3-fs (sda1): mounted filesystem with ordered data mode
kjournald starting.  Commit interval 5 seconds
EXT3-fs (sda2): using internal journal
EXT3-fs (sda2): recovery complete
EXT3-fs (sda2): mounted filesystem with ordered data mode
###############

Some of the message are same with bug 2343
Comment 1 Bruce Ashfield 2013-02-28 14:05:00 UTC
M6 at the earliest for this, since the routerstation pro may get a kernel update
before then, and will need to be retested.
Comment 2 Donn Seeley 2013-03-15 03:12:01 UTC
Bruce asked for help unloading some of his bugs...

The kernel messages are due to udev's mount.sh script, which is running
'mount -t auto DEVICE' without '-o silent' to suppress error messages
for failed mounts.  Editing /etc/udev/scripts/mount.sh on the target to
add '-o silent' makes the errors go away.
 
If the automount eventually fails, it might be useful to have these
error messages in the log.  On balance, though, I think the messages are
confusing and irrelevant.  Any other opinions?

This bug probably belongs with OE-Core, but I don't know yet how to
select OE-Core versions and milestones.  I'll get it straightened out
tomorrow.
Comment 3 Bruce Ashfield 2013-03-15 05:31:21 UTC
Thanks for the analysis Donn. 

I agree that in this case, since the script by design attempts
to mount filesystems that don't exist on devices, that silencing
it wouldn't be a great loss of information.

Three questions:

  - are there events being generated that is causing udev to
    attempt the mounts ?
  - is there a way that we can mask the devices using udev rules ?
  - would a real error message be lost if we silence the script ?

But I'd agree .. not a kernel issue, with a bit more information, we
should be able to change the part to 'runtime' and then see about the
maintainers view on the issue.
Comment 4 Donn Seeley 2013-03-15 18:03:59 UTC
        [...]
        - are there events being generated that is causing udev to
          attempt the mounts ?

Yes.  These events occur both when starting up a system, and when
inserting new media.  My Sabino Canyon (intel-xeon-core) board has a
semi-broken SATA drive attached to it that I've been trying to recover
(I think that it had some sectors curdled by a flaky power cable that I
have since replaced).  The drive currently has no filesystem data at all
-- I ran 'dd if=/dev/zero' on it.  When I boot WR Linux from USB media,
I get the same list of failed mount messages as Yi did, for the SATA
drive.

        - is there a way that we can mask the devices using udev rules ?

Yes.  In a sense, we're already doing this.  The mount.sh script is run
from /etc/udev/rules.d/local.rules.  The automount shell function in
mount.sh is triggered when we receive an 'add' event for a media
partition that isn't listed in /etc/fstab.  It's easy to add '-o silent'
just for media that is automounted.

        - would a real error message be lost if we silence the script ?
        [...]

Yes, potentially.  I can picture a situation in which an end-user
inserts media into (say) a kiosk and the device fails to recognize the
media, so the end-user (or the device owner) calls up a tech to ask why
the media wasn't recognized.  The tech could check the dmesg log to make
sure that the OS tried to mount the relevant (probably FAT :-)
filesystem.

But I don't think that the noisy automount messages from the kernel are
all that useful even in a scenario like this one.  I think most people
will be fine with just the knowledge that the automount failed.  And
there is a nonzero cost to fending off the folks who are confused by the
automount messages in the log.  I think '-o silent' is justified for
automounts.

We don't have to set this policy in the mount.sh script.  We could
modify the kernel to default to MS_SILENT for automounts.  I think it's
better to set the policy in mount.sh, though.
Comment 5 Bruce Ashfield 2013-03-15 21:08:15 UTC
I agree that adding -o silent for automounted devices
makes sense, and serious problems won't be masked.
Comment 6 Saul Wold 2013-04-09 23:36:40 UTC
Can anyone confirm which mount this was using?  Busybox vs util-linux?  Busybox seems to set the MS_SILENT flag by default for auto.
Comment 7 Donn Seeley 2013-04-10 19:14:02 UTC
lrwxrwxrwx. 1 donn donn 16 Apr  9 09:25 bin/mount -> mount.util-linux
Comment 9 Yi Zhao 2013-04-19 09:43:50 UTC
Verified with dylan branch: 789b2b7e0cca404ff8ba8ed5ba823d215e6ba5b4

There is no such errors in dmesg when plugging a usb stick.