2010-06-01 19:57:47

by Mikael Pettersson

[permalink] [raw]
Subject: [2.6.35-rc1 regression] sysfs: cannot create duplicate filename ... XVR-600 related?

Booting 2.6.35-rc1 on a Sun Blade 2500 Red, I'm greeted with:

------------[ cut here ]------------
WARNING: at fs/sysfs/dir.c:451 sysfs_add_one+0x74/0x90()
sysfs: cannot create duplicate filename '/devices/root/f0079a58/pci0003:00/0003:00:02.0/slot'
Modules linked in:
Call Trace:
[0000000000458e20] warn_slowpath_fmt+0x2c/0x3c
[0000000000501dac] sysfs_add_one+0x74/0x90
[0000000000502cd4] sysfs_do_create_link+0xf0/0x184
[000000000055a62c] pci_create_sysfs_dev_files+0x304/0x428
[000000000074c6f8] pci_sysfs_init+0x20/0x6c
[0000000000426acc] do_one_initcall+0x44/0x164
[000000000073a32c] kernel_init+0x1a0/0x238
[000000000042aea4] kernel_thread+0x30/0x48
[0000000000640efc] rest_init+0x18/0x88
---[ end trace 8093a3146373dac8 ]---

(There are no interesting messages before or after this one.)

The device at 003:00:02.0 is a Sun XVR-600 graphics card, driven by
drivers/video/sunxvr500.c. There was no such warning in 2.6.34 or
earlier kernels.

/Mikael


2010-06-01 20:06:50

by Brian Bloniarz

[permalink] [raw]
Subject: Re: [2.6.35-rc1 regression] sysfs: cannot create duplicate filename ... XVR-600 related?

On 06/01/2010 03:57 PM, Mikael Pettersson wrote:
> Booting 2.6.35-rc1 on a Sun Blade 2500 Red, I'm greeted with:
>
> ------------[ cut here ]------------
> WARNING: at fs/sysfs/dir.c:451 sysfs_add_one+0x74/0x90()
> sysfs: cannot create duplicate filename '/devices/root/f0079a58/pci0003:00/0003:00:02.0/slot'
> Modules linked in:
> Call Trace:
> [0000000000458e20] warn_slowpath_fmt+0x2c/0x3c
> [0000000000501dac] sysfs_add_one+0x74/0x90
> [0000000000502cd4] sysfs_do_create_link+0xf0/0x184
> [000000000055a62c] pci_create_sysfs_dev_files+0x304/0x428
> [000000000074c6f8] pci_sysfs_init+0x20/0x6c
> [0000000000426acc] do_one_initcall+0x44/0x164
> [000000000073a32c] kernel_init+0x1a0/0x238
> [000000000042aea4] kernel_thread+0x30/0x48
> [0000000000640efc] rest_init+0x18/0x88
> ---[ end trace 8093a3146373dac8 ]---

I've seen this too on KVM; this commit caused it:

commit 75568f8094eb0333e9c2109b23cbc8b82d318a3c
Author: Alex Chiang <[email protected]>
Date: Mon Mar 8 10:24:29 2010 -0700

PCI: create function symlinks in /sys/bus/pci/slots/N/

Create convenience symlinks in sysfs, linking slots to device
functions, and vice versa. These links make it easier for users to
figure out which devices actually live in what slots.

Some discussion happened at http://lkml.org/lkml/2010/4/12/259.
Alex Chiang is working on resolving this AFAIK, adding him.

2010-06-01 22:30:57

by David Miller

[permalink] [raw]
Subject: Re: [2.6.35-rc1 regression] sysfs: cannot create duplicate filename ... XVR-600 related?

From: Mikael Pettersson <[email protected]>
Date: Tue, 1 Jun 2010 21:57:42 +0200

> Booting 2.6.35-rc1 on a Sun Blade 2500 Red, I'm greeted with:

I know about the problem and will look at it soon hopefully, I see it
on some of my sparc64 boxes too.

You'll also have better luck reporting this to the proper mailing
list, which is [email protected], added to the CC:

> ------------[ cut here ]------------
> WARNING: at fs/sysfs/dir.c:451 sysfs_add_one+0x74/0x90()
> sysfs: cannot create duplicate filename '/devices/root/f0079a58/pci0003:00/0003:00:02.0/slot'
> Modules linked in:
> Call Trace:
> [0000000000458e20] warn_slowpath_fmt+0x2c/0x3c
> [0000000000501dac] sysfs_add_one+0x74/0x90
> [0000000000502cd4] sysfs_do_create_link+0xf0/0x184
> [000000000055a62c] pci_create_sysfs_dev_files+0x304/0x428
> [000000000074c6f8] pci_sysfs_init+0x20/0x6c
> [0000000000426acc] do_one_initcall+0x44/0x164
> [000000000073a32c] kernel_init+0x1a0/0x238
> [000000000042aea4] kernel_thread+0x30/0x48
> [0000000000640efc] rest_init+0x18/0x88
> ---[ end trace 8093a3146373dac8 ]---
>
> (There are no interesting messages before or after this one.)
>
> The device at 003:00:02.0 is a Sun XVR-600 graphics card, driven by
> drivers/video/sunxvr500.c. There was no such warning in 2.6.34 or
> earlier kernels.

2010-06-01 22:51:34

by Mikael Pettersson

[permalink] [raw]
Subject: Re: [2.6.35-rc1 regression] sysfs: cannot create duplicate filename ... XVR-600 related?

David Miller writes:
> From: Mikael Pettersson <[email protected]>
> Date: Tue, 1 Jun 2010 21:57:42 +0200
>
> > Booting 2.6.35-rc1 on a Sun Blade 2500 Red, I'm greeted with:
>
> I know about the problem and will look at it soon hopefully, I see it
> on some of my sparc64 boxes too.
>
> You'll also have better luck reporting this to the proper mailing
> list, which is [email protected], added to the CC:

I wasn't sure if this was a generic bug or a SPARC-specific one.
If I had suspected it was SPARC-specific I'd certainly have chosen
the sparclinux ML as the primary recipient. FWIW, one reply I
received indicated it was a known generic bug.

> > ------------[ cut here ]------------
> > WARNING: at fs/sysfs/dir.c:451 sysfs_add_one+0x74/0x90()
> > sysfs: cannot create duplicate filename '/devices/root/f0079a58/pci0003:00/0003:00:02.0/slot'
> > Modules linked in:
> > Call Trace:
> > [0000000000458e20] warn_slowpath_fmt+0x2c/0x3c
> > [0000000000501dac] sysfs_add_one+0x74/0x90
> > [0000000000502cd4] sysfs_do_create_link+0xf0/0x184
> > [000000000055a62c] pci_create_sysfs_dev_files+0x304/0x428
> > [000000000074c6f8] pci_sysfs_init+0x20/0x6c
> > [0000000000426acc] do_one_initcall+0x44/0x164
> > [000000000073a32c] kernel_init+0x1a0/0x238
> > [000000000042aea4] kernel_thread+0x30/0x48
> > [0000000000640efc] rest_init+0x18/0x88
> > ---[ end trace 8093a3146373dac8 ]---
> >
> > (There are no interesting messages before or after this one.)
> >
> > The device at 003:00:02.0 is a Sun XVR-600 graphics card, driven by
> > drivers/video/sunxvr500.c. There was no such warning in 2.6.34 or
> > earlier kernels.

2010-06-02 03:09:34

by Alex Chiang

[permalink] [raw]
Subject: Re: [2.6.35-rc1 regression] sysfs: cannot create duplicate filename ... XVR-600 related?

* David Miller <[email protected]>:
> From: Mikael Pettersson <[email protected]>
> Date: Tue, 1 Jun 2010 21:57:42 +0200
>
> > Booting 2.6.35-rc1 on a Sun Blade 2500 Red, I'm greeted with:
>
> I know about the problem and will look at it soon hopefully, I see it
> on some of my sparc64 boxes too.

I haven't been able to reproduce this yet (trying with kvm, not
successful with bare metal), but one thing I've noticed is that
it occurs when either a PCI hotplug driver or the ACPI PCI slot
detection driver is loaded.

It's obviously because we have both

drivers/pci/pci-sysfs.c: pci_create_slot_links()

and

drivers/pci/slot.c: create_sysfs_files()

But what I'm trying to figure out is why I'm not seeing this on
x86 bare metal (although it does supposedly reproduce in x86
kvm).

Does sparc64 load any PCI hotplug drivers?

Thanks,
/ac

2010-06-02 03:53:16

by Alex Chiang

[permalink] [raw]
Subject: Re: [2.6.35-rc1 regression] sysfs: cannot create duplicate filename ... XVR-600 related?

* Alex Chiang <[email protected]>:
> * David Miller <[email protected]>:
> > From: Mikael Pettersson <[email protected]>
> > Date: Tue, 1 Jun 2010 21:57:42 +0200
> >
> > > Booting 2.6.35-rc1 on a Sun Blade 2500 Red, I'm greeted with:
> >
> > I know about the problem and will look at it soon hopefully, I see it
> > on some of my sparc64 boxes too.
>
> I haven't been able to reproduce this yet (trying with kvm, not
> successful with bare metal), but one thing I've noticed is that
> it occurs when either a PCI hotplug driver or the ACPI PCI slot
> detection driver is loaded.

Hm. If acpiphp is a built-in, I get the warnings (in kvm). If
it's a module, no warnings, not even after modprobing.

Continuing to dig...

/ac

2010-06-02 09:08:28

by David Miller

[permalink] [raw]
Subject: Re: [2.6.35-rc1 regression] sysfs: cannot create duplicate filename ... XVR-600 related?

From: Alex Chiang <[email protected]>
Date: Tue, 1 Jun 2010 21:09:25 -0600

> Does sparc64 load any PCI hotplug drivers?

Never. And everything and all PCI controllers and devices are probed
and registered at boot time.