Bug 68257 - [i965]igt/gem_suspend/fence-restore-untiled randomly fail
Summary: [i965]igt/gem_suspend/fence-restore-untiled randomly fail
Status: CLOSED NOTOURBUG
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-19 06:17 UTC by lu hua
Modified: 2015-05-14 01:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
dmesg (124.82 KB, text/plain)
2013-08-19 06:17 UTC, lu hua
no flags Details
rtcwake dmesg (121.73 KB, text/plain)
2013-08-20 06:33 UTC, lu hua
no flags Details
rtc dmesg (89.42 KB, text/plain)
2013-08-21 07:42 UTC, lu hua
no flags Details

Description lu hua 2013-08-19 06:17:57 UTC
Created attachment 84226 [details]
dmesg

System Environment:
--------------------------
Platform:    Ironlake/Sandybridge/Ivybridge/Haswell
Kernel:      (drm-intel-next-queued) 815ca9817afc1c1a45799fb9d4a4f413b7b1517c

Bug detailed description:
-----------------------------
It randomly fails on Ironlake/Sandybridge/Ivybridge/Haswell with -queued kernel. It happens 2 in 10 runs. Run it 10 cycles on -fixes kernel, it works well.

output:
rtcwake: wakeup from "mem" using /dev/rtc0 at Mon Aug 19 06:04:47 2013
Test assertion failure function igt_system_suspend_autoresume, file drmtest.c:1826:
Failed assertion: ret == 0
Subtest fence-restore-untiled: FAIL

Reproduce steps:
----------------------------
1. ./gem_suspend --run-subtest fence-restore-untiled
Comment 1 Daniel Vetter 2013-08-19 06:39:08 UTC
Hm, that means "rtcwake -m mem -s 30" somehow failed. Can you please run this in an endless loop until it fails and then grab the error code and output?

# while rtcwake -m mem -s 30 ; do echo suceeded $? ; done ; echo failed $?
Comment 2 lu hua 2013-08-20 06:32:12 UTC
output:
rtcwake: wakeup from "mem" using /dev/rtc0 at Tue Aug 20 06:28:20 2013
suceeded 0
rtcwake: wakeup from "mem" using /dev/rtc0 at Tue Aug 20 06:28:55 2013
suceeded 0
rtcwake: wakeup from "mem" using /dev/rtc0 at Tue Aug 20 06:29:30 2013
suceeded 0
rtcwake: wakeup from "mem" using /dev/rtc0 at Tue Aug 20 06:30:05 2013
suceeded 0
rtcwake: wakeup from "mem" using /dev/rtc0 at Tue Aug 20 06:30:40 2013
suceeded 0
rtcwake: wakeup from "mem" using /dev/rtc0 at Tue Aug 20 06:31:15 2013
suceeded 0
rtcwake: wakeup from "mem" using /dev/rtc0 at Tue Aug 20 06:31:50 2013
rtcwake.sh: line 1:  4146 Segmentation fault      (core dumped) rtcwake -m mem -s 30
failed 0

error:
traps: rtcwake[4146] general protection ip:4dd1a9a8 sp:bffdd380 error:0 in libc-2.15.so[4dcaa000+1ab000]
Comment 3 lu hua 2013-08-20 06:33:04 UTC
Created attachment 84301 [details]
rtcwake dmesg
Comment 4 Daniel Vetter 2013-08-20 06:53:29 UTC
That's just a bug in rtcwake, and it seems to work fine here. On a quick check libc2.15 is about 1 year old, so can you pls try to upgrade your distro?
Comment 5 lu hua 2013-08-21 07:42:09 UTC
output:
rtcwake: wakeup from "mem" using /dev/rtc0 at Wed Aug 21 07:36:38 2013
rtcwake: write error
failed 0

 Call Trace:
[  146.353026]  [<ffffffff8104ea7d>] ? up+0xb/0x36
[  146.353047]  [<ffffffff810c8f74>] ? dma_pool_alloc+0x1a0/0x1c4
[  146.353074]  [<ffffffff815d365c>] ? uhci_alloc_td.isra.30+0x13/0x45
[  146.353100]  [<ffffffff810c8f74>] ? dma_pool_alloc+0x1a0/0x1c4
[  146.353130]  [<ffffffff816efc5e>] ? schedule_timeout+0x147/0x16d
[  146.353156]  [<ffffffff8103c198>] ? usleep_range+0x3e/0x3e
[  146.353180]  [<ffffffff816f1a85>] ? wait_for_common+0x119/0x146
[  146.353209]  [<ffffffff81053d82>] ? try_to_wake_up+0x1e3/0x1e3
[  146.353235]  [<ffffffff815b7f95>] ? usb_start_wait_urb+0x7b/0xc7
[  146.353263]  [<ffffffff813604f7>] ? dev_printk_emit+0x39/0x3e
[  146.353287]  [<ffffffff815b81f0>] ? usb_control_msg+0xc6/0xfb
[  146.353315]  [<ffffffff815b1268>] ? hub_port_init+0x37b/0x85d
[  146.353339]  [<ffffffff815b3a1d>] ? hub_thread+0x7cb/0xdf4
[  146.353364]  [<ffffffff81050d82>] ? __wake_up_common+0x42/0x78
[  146.353389]  [<ffffffff8104b8a8>] ? abort_exclusive_wait+0x79/0x79
[  146.353417]  [<ffffffff815b3252>] ? hub_port_debounce+0xcf/0xcf
[  146.353444]  [<ffffffff8104afca>] ? kthread+0xad/0xb5
[  146.353466]  [<ffffffff8104af1d>] ? kthread_freezable_should_stop+0x40/0x40
[  146.353496]  [<ffffffff816f7e6c>] ? ret_from_fork+0x7c/0xb0
[  146.353523]  [<ffffffff8104af1d>] ? kthread_freezable_should_stop+0x40/0x40

[  146.353563] Restarting kernel threads ... done.
[  146.353695] Restarting tasks ... done.
Comment 6 lu hua 2013-08-21 07:42:35 UTC
Created attachment 84369 [details]
rtc dmesg
Comment 7 Daniel Vetter 2013-08-21 08:27:40 UTC
(In reply to comment #5)
> output:
> rtcwake: wakeup from "mem" using /dev/rtc0 at Wed Aug 21 07:36:38 2013
> rtcwake: write error
> failed 0
> 
>  Call Trace:
> [  146.353026]  [<ffffffff8104ea7d>] ? up+0xb/0x36
> [  146.353047]  [<ffffffff810c8f74>] ? dma_pool_alloc+0x1a0/0x1c4
> [  146.353074]  [<ffffffff815d365c>] ? uhci_alloc_td.isra.30+0x13/0x45
> [  146.353100]  [<ffffffff810c8f74>] ? dma_pool_alloc+0x1a0/0x1c4
> [  146.353130]  [<ffffffff816efc5e>] ? schedule_timeout+0x147/0x16d
> [  146.353156]  [<ffffffff8103c198>] ? usleep_range+0x3e/0x3e
> [  146.353180]  [<ffffffff816f1a85>] ? wait_for_common+0x119/0x146
> [  146.353209]  [<ffffffff81053d82>] ? try_to_wake_up+0x1e3/0x1e3
> [  146.353235]  [<ffffffff815b7f95>] ? usb_start_wait_urb+0x7b/0xc7
> [  146.353263]  [<ffffffff813604f7>] ? dev_printk_emit+0x39/0x3e
> [  146.353287]  [<ffffffff815b81f0>] ? usb_control_msg+0xc6/0xfb
> [  146.353315]  [<ffffffff815b1268>] ? hub_port_init+0x37b/0x85d
> [  146.353339]  [<ffffffff815b3a1d>] ? hub_thread+0x7cb/0xdf4
> [  146.353364]  [<ffffffff81050d82>] ? __wake_up_common+0x42/0x78
> [  146.353389]  [<ffffffff8104b8a8>] ? abort_exclusive_wait+0x79/0x79
> [  146.353417]  [<ffffffff815b3252>] ? hub_port_debounce+0xcf/0xcf
> [  146.353444]  [<ffffffff8104afca>] ? kthread+0xad/0xb5
> [  146.353466]  [<ffffffff8104af1d>] ?
> kthread_freezable_should_stop+0x40/0x40
> [  146.353496]  [<ffffffff816f7e6c>] ? ret_from_fork+0x7c/0xb0
> [  146.353523]  [<ffffffff8104af1d>] ?
> kthread_freezable_should_stop+0x40/0x40
> 
> [  146.353563] Restarting kernel threads ... done.
> [  146.353695] Restarting tasks ... done.

Ok, doesn't look so much like a bug in rtcwake but an usb issue - somehow probing of one of the usb devices you have fails while running suspend/resume, which then fails the entire suspend process. So rtcwake actually seems to work and correctly report the error back!

For debugging the usb issue I'd try to unplug everything you have plugged in and retest. If that works then figure out which usb devices is the offender and throw that one into the bin. If that doesn't help I think you need to file a kernel bug against the usb subsystem and maybe ping Sarah Sharp about this.

In any case this is not our bug ...


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.