<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>3935</bug_id>
          
          <creation_ts>2013-02-26 03:32:32 +0000</creation_ts>
          <short_desc>beagleboard/routerstation/mpc8315e: abnormal filesystem-related messages in dmesg when plugging a usb stick</short_desc>
          <delta_ts>2013-04-19 09:43:50 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BSPs</product>
          <component>bsps-meta-yocto</component>
          <version>1.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.4 M6</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yi Zhao">yi.zhao</reporter>
          <assigned_to name="Donn Seeley">donn.seeley</assigned_to>
          <cc>bruce.ashfield</cc>
    
    <cc>donn.seeley</cc>
    
    <cc>dvhart</cc>
    
    <cc>liang.li2</cc>
    
    <cc>Qi.Chen</cc>
    
    <cc>sgw</cc>
    
    <cc>yi.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>30097</commentid>
    <comment_count>0</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-02-26 03:32:32 +0000</bug_when>
    <thetext>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&apos;t find ext4 filesystem
EXT3-fs (sda): error: can&apos;t find ext3 filesystem on dev sda.
EXT2-fs (sda): error: can&apos;t find an ext2 filesystem on dev sda.
FAT-fs (sda): invalid media value (0xb9)
FAT-fs (sda): Can&apos;t find a valid FAT filesystem
VFS: Can&apos;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&apos;t find ext4 filesystem
EXT3-fs (sda): error: can&apos;t find ext3 filesystem on dev sda.
EXT2-fs (sda): error: can&apos;t find an ext2 filesystem on dev sda.
FAT-fs (sda): invalid media value (0xb9)
FAT-fs (sda): Can&apos;t find a valid FAT filesystem
VFS: Can&apos;t find a Minix filesystem V1 | V2 | V3 on device sda.
SQUASHFS error: Can&apos;t find a SQUASHFS superblock on sda
FAT-fs (sda): invalid media value (0xb9)
FAT-fs (sda): Can&apos;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&apos;t find ext4 filesystem
EXT3-fs (sda): error: can&apos;t find ext3 filesystem on dev sda.
EXT2-fs (sda): error: can&apos;t find an ext2 filesystem on dev sda.
FAT-fs (sda): invalid media value (0x00)
FAT-fs (sda): Can&apos;t find a valid FAT filesystem
EXT4-fs (sdb): VFS: Can&apos;t find ext4 filesystem
EXT3-fs (sdb): error: can&apos;t find ext3 filesystem on dev sdb.
EXT2-fs (sdb): error: can&apos;t find an ext2 filesystem on dev sdb.
FAT-fs (sdb): bogus number of reserved sectors
FAT-fs (sdb): Can&apos;t find a valid FAT filesystem
VFS: Can&apos;t find a Minix filesystem V1 | V2 | V3 on device sda.
FAT-fs (sda): invalid media value (0x00)
FAT-fs (sda): Can&apos;t find a valid FAT filesystem
VFS: Can&apos;t find a Minix filesystem V1 | V2 | V3 on device sdb.
FAT-fs (sdb): bogus number of reserved sectors
FAT-fs (sdb): Can&apos;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&apos;t find a valid FAT filesystem
MINIX-fs: unable to read superblock
FAT-fs (sda4): bogus number of reserved sectors
FAT-fs (sda4): Can&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30246</commentid>
    <comment_count>1</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2013-02-28 14:05:00 +0000</bug_when>
    <thetext>M6 at the earliest for this, since the routerstation pro may get a kernel update
before then, and will need to be retested.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30725</commentid>
    <comment_count>2</comment_count>
    <who name="Donn Seeley">donn.seeley</who>
    <bug_when>2013-03-15 03:12:01 +0000</bug_when>
    <thetext>Bruce asked for help unloading some of his bugs...

The kernel messages are due to udev&apos;s mount.sh script, which is running
&apos;mount -t auto DEVICE&apos; without &apos;-o silent&apos; to suppress error messages
for failed mounts.  Editing /etc/udev/scripts/mount.sh on the target to
add &apos;-o silent&apos; 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&apos;t know yet how to
select OE-Core versions and milestones.  I&apos;ll get it straightened out
tomorrow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30728</commentid>
    <comment_count>3</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2013-03-15 05:31:21 +0000</bug_when>
    <thetext>Thanks for the analysis Donn. 

I agree that in this case, since the script by design attempts
to mount filesystems that don&apos;t exist on devices, that silencing
it wouldn&apos;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&apos;d agree .. not a kernel issue, with a bit more information, we
should be able to change the part to &apos;runtime&apos; and then see about the
maintainers view on the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30757</commentid>
    <comment_count>4</comment_count>
    <who name="Donn Seeley">donn.seeley</who>
    <bug_when>2013-03-15 18:03:59 +0000</bug_when>
    <thetext>        [...]
        - 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&apos;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 &apos;dd if=/dev/zero&apos; 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&apos;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 &apos;add&apos; event for a media
partition that isn&apos;t listed in /etc/fstab.  It&apos;s easy to add &apos;-o silent&apos;
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&apos;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&apos;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 &apos;-o silent&apos; is justified for
automounts.

We don&apos;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&apos;s
better to set the policy in mount.sh, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30761</commentid>
    <comment_count>5</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2013-03-15 21:08:15 +0000</bug_when>
    <thetext>I agree that adding -o silent for automounted devices
makes sense, and serious problems won&apos;t be masked.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31786</commentid>
    <comment_count>6</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-04-09 23:36:40 +0000</bug_when>
    <thetext>Can anyone confirm which mount this was using?  Busybox vs util-linux?  Busybox seems to set the MS_SILENT flag by default for auto.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31857</commentid>
    <comment_count>7</comment_count>
    <who name="Donn Seeley">donn.seeley</who>
    <bug_when>2013-04-10 19:14:02 +0000</bug_when>
    <thetext>lrwxrwxrwx. 1 donn donn 16 Apr  9 09:25 bin/mount -&gt; mount.util-linux</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32189</commentid>
    <comment_count>8</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-04-15 23:44:12 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=52ac48097404a3ebb574f46205e96d9bedfa3f6a</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32381</commentid>
    <comment_count>9</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-04-19 09:43:50 +0000</bug_when>
    <thetext>Verified with dylan branch: 789b2b7e0cca404ff8ba8ed5ba823d215e6ba5b4

There is no such errors in dmesg when plugging a usb stick.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>