lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 09 Mar 2017 16:20:06 +0530
From:   Abdul Haleem <abdhalee@...ux.vnet.ibm.com>
To:     Brian Foster <bfoster@...hat.com>
Cc:     linux-xfs@...r.kernel.org, mpe@...erman.id,
        linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: 4.11.0-rc1 boot resulted in WARNING: CPU: 14 PID: 1722 at
 fs/sysfs/dir.c:31 .sysfs_warn_dup+0x78/0xb0

On Wed, 2017-03-08 at 08:17 -0500, Brian Foster wrote:
> On Tue, Mar 07, 2017 at 10:01:04PM +0530, Abdul Haleem wrote:
> > 
> > Hi,
> > 
> > Today's mainline (4.11.0-rc1) booted with warnings on Power7 LPAR.
> > 
> > Issue is not reproducible all the time.
> > 
> > traces:
> > --------
> > Found device VDASD 5.
> > Mounting /home...
> > Reached target Swap.
> > Found device VDASD 2.
> > 
> > Mounting /boot...
> > 
> > sysfs: cannot create duplicate filename '/fs/xfs/sda'
> 
> That is strange. The sysfs name is ultimately based on the superblock id
> (sb->s_id), which afaik should reflect the underlying device and thus be
> unique. Just to be sure, do you otherwise have a mounted and functional
> sysfs dir?
> 
> I assume after this boot you have a mounted 'sda' device somewhere.. If
> so, what content already exists under the sysfs fs/xfs/sda subdir when
> the duplicate warning occurs? Has the associated device been
> mounted/unmounted before this occurs, or is there anything abnormal
> going on during boot up, such as device repartitioning, devices coming
> and going, etc..?

Brian, Thanks for looking into this issue.

No, the system is not in same state, it was overwritten by other runs of
Automation framework.

However the boot logs are preserved and attached here.

> 
> What does 'mount' show for this system when the problem occurs vs. when
> it doesn't? It might be useful to post the full boot log for when this
> occurs as well.

I do not have any sysfs info when warning occursm but on a normal system
(with out warning):

# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs
(rw,nosuid,size=41833088k,nr_inodes=653642,mode=755)
securityfs on /sys/kernel/security type securityfs
(rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup
(rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup
(rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup
(rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/freezer type cgroup
(rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/hugetlb type cgroup
(rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/devices type cgroup
(rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/net_cls type cgroup
(rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup
(rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup
(rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/perf_event type cgroup
(rw,nosuid,nodev,noexec,relatime,perf_event)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/sda3 on / type ext4 (rw,relatime,data=ordered)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs
(rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
/dev/sda2 on /boot type xfs (rw,relatime,attr2,inode64,noquota)
/dev/sda5 on /home type xfs (rw,relatime,attr2,inode64,noquota)
tmpfs on /run/user/0 type tmpfs
(rw,nosuid,nodev,relatime,size=8375680k,mode=700)

# ls /sys/fs/xfs
sda  sda5  stats

# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs         40G     0   40G   0% /dev
tmpfs            40G     0   40G   0% /dev/shm
tmpfs            40G   14M   40G   1% /run
tmpfs            40G     0   40G   0% /sys/fs/cgroup
/dev/sda3       394G   17G  358G   5% /
/dev/sda2        40G  673M   40G   2% /boot
/dev/sda5       100G   21G   80G  21% /home
tmpfs           8.0G     0  8.0G   0% /run/user/0

# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0    7:0    0   256M  0 loop 
sda      8:0    0 558.9G  0 disk 
├─sda4   8:4    0     1K  0 part 
├─sda2   8:2    0    40G  0 part /boot
├─sda5   8:5    0   100G  0 part /home
├─sda3   8:3    0   400G  0 part /
├─sda1   8:1    0    10M  0 part 
└─sda6   8:6    0    10G  0 part [SWAP]

# cat /proc/partitions 
major minor  #blocks  name

   8        0  586061784 sda
   8        1      10240 sda
   8        2   41943040 sda
   8        3  419430400 sda3
   8        4          1 sda
   8        5  104857600 sda5
   8        6   10485760 sda6
   7        0     262144 loop0

# xfs_info /home
meta-data=/dev/sda5              isize=256    agcount=4, agsize=6553600
blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0        finobt=0
data     =                       bsize=4096   blocks=26214400,
imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal               bsize=4096   blocks=12800, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0


# xfs_info /boot/
meta-data=/dev/sda2              isize=256    agcount=4, agsize=2621440
blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0        finobt=0
data     =                       bsize=4096   blocks=10485760,
imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal               bsize=4096   blocks=5120, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
 

# fdisk -l

Disk /dev/sda: 600.1 GB, 600127266816 bytes, 1172123568 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xe2ab0400

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048       22527       10240   41  PPC PReP Boot
/dev/sda2           22528    83908607    41943040   83  Linux
/dev/sda3        83908608   922769407   419430400   83  Linux
/dev/sda4       922769408  1172121599   124676096    5  Extended
/dev/sda5       922771456  1132486655   104857600   83  Linux
/dev/sda6      1132488704  1153460223    10485760   82  Linux swap /
Solaris


Please let me know if you need more info.

> 
> Brian
> 
> > ------------[ cut here ]------------
> > WARNING: CPU: 14 PID: 1722 at fs/sysfs/dir.c:31 .sysfs_warn_dup
> > +0x78/0xb0
> > Modules linked in: sg(E) nfsd(E) auth_rpcgss(E) nfs_acl(E) lockd(E)
> > grace(E) sunrpc(E) binfmt_misc(E) ip_tables(E) ext4(E) mbcache(E)
> > jbd2(E) sd_mod(E) ibmvscsi(E) ibmveth(E) scsi_transport_srp(E)
> > CPU: 14 PID: 1722 Comm: mount Tainted: G        W   E   4.11.0-rc1-autotest #1
> > task: c0000009ed3f9c80 task.stack: c0000009ed430000
> > NIP: c0000000003a6c68 LR: c0000000003a6c64 CTR: 0000000001764c5c
> > REGS: c0000009ed4333c0 TRAP: 0700   Tainted: G        W   E    (4.11.0-rc1-autotest)
> > MSR: 800000000282b032 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI>
> >   CR: 22022822  XER: 00000006
> > CFAR: c000000000994958 SOFTE: 1
> > GPR00: c0000000003a6c64 c0000009ed433640 c00000000138a500 0000000000000035
> > GPR04: c0000009ff88ada0 c0000009ff8a1658 00000000014cfc2c 0000000000000000
> > GPR08: 0000000000000000 c000000000dd146c 00000009feac0000 0000000000003fef
> > GPR12: 0000000022022844 c00000000e9f7e00 0000000037409c40 0000000037409c30
> > GPR16: 0000000037409c28 ffffffffffffffff 0000000000000000 000000003741f1c8
> > GPR20: 00000100147d1270 0000000000000000 00000000c0ed0000 00003fffa0f53384
> > GPR24: c00000000394d178 c000000000c054c0 c000000001742e68 c0000000ff3ea640
> > GPR28: c00000000394d640 c0000013eec28c28 c0000009f2ab0148 c000000003833000
> > NIP [c0000000003a6c68] .sysfs_warn_dup+0x78/0xb0
> > LR [c0000000003a6c64] .sysfs_warn_dup+0x74/0xb0
> > Call Trace:
> > [c0000009ed433640] [c0000000003a6c64] .sysfs_warn_dup+0x74/0xb0 (unreliable)
> > [c0000009ed4336d0] [c0000000003a6de4] .sysfs_create_dir_ns+0xc4/0xd0
> > [c0000009ed433760] [c000000000551048] .kobject_add_internal+0xd8/0x450
> > [c0000009ed433800] [c00000000055141c] .kobject_init_and_add+0x5c/0x90
> > [c0000009ed433890] [c00000000044ac54] .xfs_mountfs+0x224/0xa30
> > [c0000009ed433960] [c000000000452a90] .xfs_fs_fill_super+0x490/0x620
> > [c0000009ed433a10] [c0000000002fefc0] .mount_bdev+0x220/0x260
> > [c0000009ed433ac0] [c0000000004509b8] .xfs_fs_mount+0x18/0x30
> > [c0000009ed433b30] [c000000000300520] .mount_fs+0x70/0x210
> > [c0000009ed433bf0] [c000000000325930] .vfs_kern_mount+0x60/0x1c0
> > [c0000009ed433cb0] [c00000000032a458] .do_mount+0x268/0xee0
> > [c0000009ed433d90] [c00000000032b4ec] .SyS_mount+0x8c/0x100
> > [c0000009ed433e30] [c00000000000b184] system_call+0x38/0xe0
> > Instruction dump:
> > 7fa3eb78 38800000 7fe5fb78 38c01000 4bffa929 60000000 3c62ff8b 7fe4fb78
> > 38636ec8 7fc5f378 485edcb9 60000000 <0fe00000> 7fe3fb78 4bf1fb01 60000000
> > ---[ end trace 78f08bafbc2388f3 ]---
> > kobject_add_internal failed for sda with -EEXIST, don't try to register
> > things with the same name in the same directory.
> > 
> > 
> > -- 
> > Regard's
> > 
> > Abdul Haleem
> > IBM Linux Technology Centre
> > 
> > 
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> > the body of a message to majordomo@...r.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


-- 
Regard's

Abdul Haleem
IBM Linux Technology Centre



View attachment "xfs-warning-dmesg.txt" of type "text/plain" (42115 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ