Created attachment 110560 [details] dmesg ==System Environment== -------------------------- Regression: No They are new cases Non-working platforms: HSW BYT ==kernel== -------------------------- origin/drm-intel-nightly: 2014_12_08(fails) origin/drm-intel-next-queued: bcfcc8ba29c933ee98c7f498ee7ccfa17be400dd(fails) drm/i915: Additional request structure tracing origin/drm-intel-fixes: 9cca30688043eb1b6569f794041dfeec218dffa5(works) drm/i915: Handle inaccurate time conversion issues ==Bug detailed description== ----------------------------- igt/drm_read subcases short-buffer-block and short-buffer-nonblock fail Output: [root@x-hsw24 tests]# ./drm_read --run-subtest short-buffer-block IGT-Version: 1.8-g819e68f (x86_64) (Linux: 3.18.0-rc7_drm-intel-nightly_bfdd01_20141208+ x86_64) Test assertion failure function test_short_buffer, file drm_read.c:148: Failed assertion: read(fd, buffer, 4) == 0 Last errno: 11, Resource temporarily unavailable error: -1 != 0 Subtest short-buffer-block: FAIL (0.000s) [root@x-hsw24 tests]# ./drm_read --run-subtest short-buffer-nonblock IGT-Version: 1.8-g819e68f (x86_64) (Linux: 3.18.0-rc7_drm-intel-nightly_bfdd01_20141208+ x86_64) Test assertion failure function test_short_buffer, file drm_read.c:148: Failed assertion: read(fd, buffer, 4) == 0 Last errno: 11, Resource temporarily unavailable error: -1 != 0 Subtest short-buffer-nonblock: FAIL (0.000s) Reproduce steps: ------------------------- 1. ./drm_read --run-subtest short-buffer-block
http://patchwork.freedesktop.org/patch/38174/
It impacts all platforms.
Should be fixed now: commit b710d754bd4f80be922c40d8c1231d20f8e55e09 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu Dec 4 21:03:25 2014 +0000 drm: Make drm_read() more robust against multithreaded races The current implementation of drm_read() faces a number of issues: 1. Upon an error, it consumes the event which may lead to the client blocking. 2. Upon an error, it forgets about events already copied 3. If it fails to copy a single event with O_NONBLOCK it falls into a infinite loop of reporting EAGAIN. 3. There is a race between multiple waiters and blocking reads of the events list. Here, we inline drm_dequeue_event() into drm_read() so that we can take the spinlock around the list walking and event copying, and importantly reorder the error handling to avoid the issues above. Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Takashi Iwai <tiwai@suse.de> Testcase: igt/drm_read Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
commit b710d754bd4f80be922c40d8c1231d20f8e55e09 test result is pass. verified.
It also fails on latest drm-intel-fixes kernel.
Closing old verified.
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.