Bug 106851 - WARNING: CPU: 0 PID: 686 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x68/0x80() + drm:radeon_pm_late_init [radeon]] *ERROR*
Summary: WARNING: CPU: 0 PID: 686 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x68/0x80() + dr...
Status: RESOLVED PATCH_ALREADY_AVAILABLE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_video-dri
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-29 06:45 UTC by lbl
Modified: 2015-11-11 10:32 UTC (History)
3 users (show)

See Also:
Kernel Version: 4.1.12, 4.2.5
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
Unconditionally set sysfs_initialized (1.22 KB, patch)
2015-10-31 14:25 UTC, Holger Hoffstätte
Details | Diff

Description lbl 2015-10-29 06:45:54 UTC
Hey guys.

Since I've upgraded to 4.1.12 from 4.1.11 I've been getting some errors:

Oct 29 05:26:43 hosty kernel: radeon 0000:01:00.0: WB enabled
Oct 29 05:26:43 hosty kernel: radeon 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000080000c00 and cpu addr 0xffff8800cbbdec00
Oct 29 05:26:43 hosty kernel: radeon 0000:01:00.0: fence driver on ring 1 use gpu addr 0x0000000080000c04 and cpu addr 0xffff8800cbbdec04
Oct 29 05:26:43 hosty kernel: radeon 0000:01:00.0: fence driver on ring 2 use gpu addr 0x0000000080000c08 and cpu addr 0xffff8800cbbdec08
Oct 29 05:26:43 hosty kernel: radeon 0000:01:00.0: fence driver on ring 3 use gpu addr 0x0000000080000c0c and cpu addr 0xffff8800cbbdec0c
Oct 29 05:26:43 hosty kernel: radeon 0000:01:00.0: fence driver on ring 4 use gpu addr 0x0000000080000c10 and cpu addr 0xffff8800cbbdec10
Oct 29 05:26:43 hosty kernel: [drm] ring test on 0 succeeded in 1 usecs
Oct 29 05:26:43 hosty kernel: [drm] ring test on 1 succeeded in 1 usecs
Oct 29 05:26:43 hosty kernel: [drm] ring test on 2 succeeded in 1 usecs
Oct 29 05:26:43 hosty kernel: [drm] ring test on 3 succeeded in 3 usecs
Oct 29 05:26:43 hosty kernel: [drm] ring test on 4 succeeded in 3 usecs
Oct 29 05:26:43 hosty kernel: [drm] ib test on ring 0 succeeded in 0 usecs
Oct 29 05:26:43 hosty kernel: [drm] ib test on ring 1 succeeded in 0 usecs
Oct 29 05:26:43 hosty kernel: [drm] ib test on ring 2 succeeded in 0 usecs
Oct 29 05:26:43 hosty kernel: [drm] ib test on ring 3 succeeded in 0 usecs
Oct 29 05:26:43 hosty kernel: [drm] ib test on ring 4 succeeded in 0 usecs
Oct 29 05:26:43 hosty kernel: ------------[ cut here ]------------
Oct 29 05:26:43 hosty kernel: WARNING: CPU: 0 PID: 686 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x68/0x80()
Oct 29 05:26:43 hosty kernel: sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:01.0/0000:01:00.0/power_dpm_state'
Oct 29 05:26:43 hosty kernel: Modules linked in: uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common videodev media joydev snd_hda_codec_hdmi mousedev snd_hda_codec_realtek snd_hda_
Oct 29 05:26:43 hosty kernel:  drm snd_pcm ie31200_edac ptp mei_me snd_timer mei pps_core intel_gtt snd i2c_algo_bit regmap_i2c soundcore i2c_hid shpchp edac_core i2c_designware_platform parport_pc wm
Oct 29 05:26:43 hosty kernel: CPU: 0 PID: 686 Comm: Xorg.wrap Tainted: G     U     O    4.1.12-1-ck #1
Oct 29 05:26:43 hosty kernel: Hardware name: Dell Inc. Latitude E6440/0K9GNV, BIOS A13 09/01/2015
Oct 29 05:26:43 hosty kernel:  0000000000000000 00000000f4e85e22 ffff88021d917778 ffffffff8156f7ac
Oct 29 05:26:43 hosty kernel:  0000000000000000 ffff88021d9177d0 ffff88021d9177b8 ffffffff81077a3a
Oct 29 05:26:43 hosty kernel:  000064d01d9177b8 ffff88021f4f3000 ffffffffa08e6470 ffff88022480f168
Oct 29 05:26:43 hosty kernel: Call Trace:
Oct 29 05:26:43 hosty kernel:  [<ffffffff8156f7ac>] dump_stack+0x4c/0x6e
Oct 29 05:26:43 hosty kernel:  [<ffffffff81077a3a>] warn_slowpath_common+0x8a/0xc0
Oct 29 05:26:43 hosty kernel:  [<ffffffff81077ac5>] warn_slowpath_fmt+0x55/0x70
Oct 29 05:26:43 hosty kernel:  [<ffffffff81238c58>] ? kernfs_path+0x48/0x60
Oct 29 05:26:43 hosty kernel:  [<ffffffff8123c538>] sysfs_warn_dup+0x68/0x80
Oct 29 05:26:43 hosty kernel:  [<ffffffff8123c217>] sysfs_add_file_mode_ns+0x147/0x1b0
Oct 29 05:26:43 hosty kernel:  [<ffffffff8123c2aa>] sysfs_create_file_ns+0x2a/0x40
Oct 29 05:26:43 hosty kernel:  [<ffffffff813d80c6>] device_create_file+0x46/0xb0
Oct 29 05:26:43 hosty kernel:  [<ffffffffa08081c8>] radeon_pm_late_init+0x88/0x1d0 [radeon]
Oct 29 05:26:43 hosty kernel:  [<ffffffffa0798c23>] radeon_resume_kms+0x283/0x420 [radeon]
Oct 29 05:26:43 hosty kernel:  [<ffffffffa0796143>] radeon_pmops_runtime_resume+0x73/0xb0 [radeon]
Oct 29 05:26:43 hosty kernel:  [<ffffffff812fb1bf>] pci_pm_runtime_resume+0x7f/0xc0
Oct 29 05:26:43 hosty kernel:  [<ffffffff813d5050>] ? vga_switcheroo_runtime_suspend+0x60/0x60
Oct 29 05:26:43 hosty kernel:  [<ffffffff813d5089>] vga_switcheroo_runtime_resume+0x39/0x40
Oct 29 05:26:43 hosty kernel:  [<ffffffff813e7326>] __rpm_callback+0x36/0x90
Oct 29 05:26:43 hosty kernel:  [<ffffffff813e73a8>] rpm_callback+0x28/0x90
Oct 29 05:26:43 hosty kernel:  [<ffffffff813e87de>] rpm_resume+0x4ce/0x6b0
Oct 29 05:26:43 hosty kernel:  [<ffffffff813e89ff>] __pm_runtime_resume+0x3f/0x60
Oct 29 05:26:43 hosty kernel:  [<ffffffffa079b006>] radeon_driver_open_kms+0x36/0x1d0 [radeon]
Oct 29 05:26:43 hosty kernel:  [<ffffffff812632c8>] ? security_capable+0x18/0x20
Oct 29 05:26:43 hosty kernel:  [<ffffffffa043185f>] drm_open+0x1af/0x4c0 [drm]
Oct 29 05:26:43 hosty kernel:  [<ffffffff811c61f1>] ? exact_lock+0x11/0x20
Oct 29 05:26:43 hosty kernel:  [<ffffffffa0438789>] drm_stub_open+0xa9/0x120 [drm]
Oct 29 05:26:43 hosty kernel:  [<ffffffff811c65ce>] chrdev_open+0xae/0x1f0
Oct 29 05:26:43 hosty kernel:  [<ffffffff811bf4f7>] do_dentry_open+0x227/0x330
Oct 29 05:26:43 hosty kernel:  [<ffffffff811c6520>] ? cdev_put+0x30/0x30
Oct 29 05:26:43 hosty kernel:  [<ffffffff811c0736>] vfs_open+0x56/0x60
Oct 29 05:26:43 hosty kernel:  [<ffffffff811d0354>] do_last.isra.11+0x344/0xf60
Oct 29 05:26:43 hosty kernel:  [<ffffffff811ceb1e>] ? path_init+0x17e/0x460
Oct 29 05:26:43 hosty kernel:  [<ffffffff811d1001>] path_openat+0x91/0x690
Oct 29 05:26:43 hosty kernel:  [<ffffffff811d2a99>] do_filp_open+0x49/0xd0
Oct 29 05:26:43 hosty kernel:  [<ffffffff812c76ca>] ? find_next_zero_bit+0x1a/0x30
Oct 29 05:26:43 hosty kernel:  [<ffffffff811e00b7>] ? __alloc_fd+0xa7/0x130
Oct 29 05:26:43 hosty kernel:  [<ffffffff811c0b3d>] do_sys_open+0x14d/0x250
Oct 29 05:26:43 hosty kernel:  [<ffffffff811c0c5e>] SyS_open+0x1e/0x20
Oct 29 05:26:43 hosty kernel:  [<ffffffff8157566e>] system_call_fastpath+0x12/0x71
Oct 29 05:26:43 hosty kernel: ---[ end trace 1148860c62f9432d ]---
Oct 29 05:26:43 hosty kernel: [drm:radeon_pm_late_init [radeon]] *ERROR* failed to create device file for dpm state
Oct 29 05:26:43 hosty kernel: ------------[ cut here ]------------


and there's more

this is when I start the X server :

Oct 29 05:25:40 hosty kernel: [drm:radeon_pm_late_init [radeon]] *ERROR* failed to create device file for dpm state
Oct 29 05:25:40 hosty kernel: [drm:radeon_pm_late_init [radeon]] *ERROR* failed to create device file for dpm state
Oct 29 05:25:40 hosty kernel: [drm:radeon_pm_late_init [radeon]] *ERROR* failed to create device file for power profile
Oct 29 05:25:40 hosty kernel: [drm:radeon_pm_late_init [radeon]] *ERROR* failed to create device file for power method

Found something related: https://lkml.org/lkml/2015/10/26/780

Right now I'm running the -ck patch, but it behaves the same on the generic one

Hw: DGPU 01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330] (rev ff)

CPU: Intel 4310M Haswell-refresh

OS: ArchLinux


Let me know if you guys need more info
Comment 1 Aaron Lu 2015-10-30 01:48:53 UTC
Looks like a radeon issue, move there.
Comment 2 Holger Hoffstätte 2015-10-30 16:52:56 UTC
This (and similar) messages were supposed to be fixed by commit:

http://cgit.freedesktop.org/~airlied/linux/commit/?h=drm-fixes&id=49abb26651167c892393cd9f2ad23df429645ed9

(should be in the next -stable), but merging that into my 4.1.12+ kernel hasn't fixed anything.

After reading the patch it seems that the sysfs_initialized flag is only ever set to true when the last sysfs entry was successfully created; in my case that particular setting (dev_attr_power_method) seems to fail, so the "all is done" flag is never set. For some reason I get the "power method" failure message 4 times on each resume.

ISTM that setting the sysfs_initialized flag should be independent of previous failures; do it once and then stop.
Comment 3 Holger Hoffstätte 2015-10-31 09:34:53 UTC
(In reply to Holger Hoffstätte from comment #2)
> For some reason I get the "power method" failure message 4 times on each
> resume.

This was wrong, sorry. I get each sysfs failure once (4 in total).
Comment 4 Holger Hoffstätte 2015-10-31 14:25:01 UTC
Created attachment 191741 [details]
Unconditionally set sysfs_initialized

This patch removes the conditional around setting sysfs_initialized and works for me - no more spew on resume. Also fixes a previously duplicate message text.
Comment 5 lbl 2015-11-01 10:47:02 UTC
Update: it also happens on kernel 4.2.5
Comment 6 Hin-Tak Leung 2015-11-02 22:49:46 UTC
me too with 4.2.5 .
Comment 7 lbl 2015-11-07 06:13:39 UTC
It doesn't seem to happen with kernel 4.3
Comment 8 lbl 2015-11-10 06:49:17 UTC
Fixed in kernel 4.1.13. Thanks
Comment 9 Holger Hoffstätte 2015-11-11 10:32:23 UTC
(In reply to Holger Hoffstätte from comment #4)
> Created attachment 191741 [details]
> Unconditionally set sysfs_initialized
> 
> This patch removes the conditional around setting sysfs_initialized and
> works for me - no more spew on resume. Also fixes a previously duplicate
> message text.

So it turns out that *in my case* - even with the original patch - these
messages apparently (?) were caused because my monitor was dying
(it's completely dead now) and reacting too slowly, i.e. not waking up
properly.
I got a new one and now the original patch - which is in 4.1.13 - does
indeed work fine: no more errors on resume.

Note You need to log in before you can comment on or make changes to this bug.