Bug 77793

Summary: [byt Bisected full-ppgtt]igt/gem_reloc_vs_gpu/forked-interruptible-faulting-reloc-thrashing fails
Product: DRI Reporter: Guo Jinxian <jinxianx.guo>
Component: DRM/IntelAssignee: Chris Wilson <chris>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: highest CC: intel-gfx-bugs, yi.sun
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
dmesg none

Description Guo Jinxian 2014-04-23 06:45:17 UTC
Created attachment 97801 [details]
dmesg

System Environment:
--------------------------
Platform: HSW
kernel:   (drm-intel-nightly)1e771b84e47085ef9b6efea1321e7cb5a8b2c065

Bug detailed description:
----------------------------
igt/gem_reloc_vs_gpu/forked-interruptible-faulting-reloc-thrashing fails on -nightly and -next-queued(c79057922ed6c2c6df1214e6ab4414fea1b23db2)

It's a regression bug:
good commit: 04feced98a434c7046108671dc5b6f50f3b63ed7
bad commit: c27dc20db6c0bcf4078b4da65d8d20f6f0b74229
We will bisect it later

output on -next-queued kernel:
./gem_reloc_vs_gpu --run-subtest forked-interruptible-faulting-reloc-thrashing
IGT-Version: 1.6-g78e4c2b (x86_64) (Linux: 3.14.0_drm-intel-next-queued_c79057_20140423+ x86_64)
Test assertion failure function do_test, file gem_reloc_vs_gpu.c:260:
Last errno: 4, Interrupted system call
Failed assertion: test == 0xdeadbeef
mismatch in buffer 1: 0x00000000 instead of 0xdeadbeef
Test assertion failure function do_test, file gem_reloc_vs_gpu.c:260:
Last errno: 4, Interrupted system call
Failed assertion: test == 0xdeadbeef
mismatch in buffer 2: 0x00000000 instead of 0xdeadbeef
Test assertion failure function do_test, file gem_reloc_vs_gpu.c:260:
Last errno: 4, Interrupted system call
Failed assertion: test == 0xdeadbeef
mismatch in buffer 5: 0x00000000 instead of 0xdeadbeef
Test assertion failure function do_test, file gem_reloc_vs_gpu.c:260:
Last errno: 4, Interrupted system call
Failed assertion: test == 0xdeadbeef
mismatch in buffer 6: 0x00000000 instead of 0xdeadbeef
Test assertion failure function do_test, file gem_reloc_vs_gpu.c:260:
Last errno: 4, Interrupted system call
Failed assertion: test == 0xdeadbeef
mismatch in buffer 6: 0x00000000 instead of 0xdeadbeef
Test assertion failure function do_test, file gem_reloc_vs_gpu.c:260:
Last errno: 4, Interrupted system call
Failed assertion: test == 0xdeadbeef
mismatch in buffer 3: 0x00000000 instead of 0xdeadbeef
child 5 failed with exit status 99
Subtest forked-interruptible-faulting-reloc-thrashing: FAIL
gem_reloc_vs_gpu: igt_core.c:832: children_exit_handler: Assertion `ret == 0' failed.
Aborted (core dumped)

Reproduce steps:
---------------------------- 
./gem_reloc_vs_gpu --run-subtest forked-interruptible-faulting-reloc-thrashing
Comment 1 Guo Jinxian 2014-04-23 09:17:08 UTC
8d214b7d9c45f4af23ce41b2bc74f79c44f760de is the first bad commit
commit 8d214b7d9c45f4af23ce41b2bc74f79c44f760de
Author: Ben Widawsky <benjamin.widawsky@linux.intel.com>
Date:   Mon Mar 24 18:06:00 2014 -0700

    drm/i915: Allow full PPGTT with param override

    When PPGTT was disabled by default, the patch also prevented the user
    from overriding this behavior via module parameter. Being able to test
    this on arbitrary kernels is extremely beneficial to track down the
    remaining bugs. The patch that prevented this was:

    commit 93a25a9e2d67765c3092bfaac9b855d95e39df97
    Author: Daniel Vetter <daniel.vetter@ffwll.ch>
    Date:   Thu Mar 6 09:40:43 2014 +0100

        drm/i915: Disable full ppgtt by default

    By default PPGTT is set to -1. 0 means off, 1 means aliasing only, 2
    means full, all other values are reserved.

    Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

:040000 040000 903c131a323c121e65e6cc2cf649a39db56714ea 56d0a68167b3e1de7ead01f0367a7d1b589de0f9 M      drivers
Comment 2 Jani Nikula 2014-04-23 11:22:58 UTC
Unfortunately your bisect points at the commit that lets you enable full ppgtt with a module parameter. Between commits:

commit 93a25a9e2d67765c3092bfaac9b855d95e39df97
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu Mar 6 09:40:43 2014 +0100

    drm/i915: Disable full ppgtt by default

and

commit 8d214b7d9c45f4af23ce41b2bc74f79c44f760de
Author: Ben Widawsky <benjamin.widawsky@linux.intel.com>
Date:   Mon Mar 24 18:06:00 2014 -0700

    drm/i915: Allow full PPGTT with param override

you need to revert 93a25a9e2d67765c3092bfaac9b855d95e39df97 to be able to test full ppgtt.

Please bisect between your good 04feced98a434c7046108671dc5b6f50f3b63ed7 and bad 8d214b7d9c45f4af23ce41b2bc74f79c44f760de, doing the revert each step of the way.
Comment 3 Guo Jinxian 2014-04-28 08:59:53 UTC
(In reply to comment #2)
> Unfortunately your bisect points at the commit that lets you enable full
> ppgtt with a module parameter. Between commits:
> 
> commit 93a25a9e2d67765c3092bfaac9b855d95e39df97
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date:   Thu Mar 6 09:40:43 2014 +0100
> 
>     drm/i915: Disable full ppgtt by default
> 
> and
> 
> commit 8d214b7d9c45f4af23ce41b2bc74f79c44f760de
> Author: Ben Widawsky <benjamin.widawsky@linux.intel.com>
> Date:   Mon Mar 24 18:06:00 2014 -0700
> 
>     drm/i915: Allow full PPGTT with param override
> 
> you need to revert 93a25a9e2d67765c3092bfaac9b855d95e39df97 to be able to
> test full ppgtt.
> 
> Please bisect between your good 04feced98a434c7046108671dc5b6f50f3b63ed7 and
> bad 8d214b7d9c45f4af23ce41b2bc74f79c44f760de, doing the revert each step of
> the way.

Unable to revert 93a25a9e2d67765c3092bfaac9b855d95e39df97 during bisect, here has conflicts while reverting:

git revert 93a25a9e2d67765c3092bfaac9b855d95e39df97
error: could not revert 93a25a9... drm/i915: Disable full ppgtt by default
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Comment 4 Guo Jinxian 2014-06-05 06:42:22 UTC
This bug is able to reproduce on BYT too.

Output:
 ./gem_reloc_vs_gpu --run-subtest faulting-reloc    IGT-Version: 1.6-g1451df1 (x86_64) (Linux: 3.15.0-rc7_drm-intel-nightly_0a37b5_20140604+ x86_64)
Test assertion failure function do_test, file gem_reloc_vs_gpu.c:260:
Last errno: 0, Success
Failed assertion: test == 0xdeadbeef
mismatch in buffer 1: 0x00000000 instead of 0xdeadbeef
Subtest faulting-reloc: FAIL
Comment 5 Chris Wilson 2014-08-11 10:56:14 UTC
Please retest with

commit e6a844687cf929ec053c7578d5ecc794a8a6c5cf
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Aug 11 12:00:12 2014 +0200

    drm/i915: Force CPU relocations if not GTT mapped
Comment 6 lu hua 2014-08-12 05:27:09 UTC
(In reply to comment #5)
> Please retest with
> 
> commit e6a844687cf929ec053c7578d5ecc794a8a6c5cf
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date:   Mon Aug 11 12:00:12 2014 +0200
> 
>     drm/i915: Force CPU relocations if not GTT mapped

Test on latest nightly kernel.
It works well on HSW.
It still fails on BYT.
output:
root@x-bytm02:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./gem_reloc_vs_gpu --run-subtest forked-interruptible-faulting-reloc-thrashing
IGT-Version: 1.7-g5a06d36 (x86_64) (Linux: 3.16.0_drm-intel-nightly_cf1dde_20140812+ x86_64)
Test assertion failure function do_test, file gem_reloc_vs_gpu.c:260:
Failed assertion: test == 0xdeadbeef
Last errno: 4, Interrupted system call
mismatch in buffer 13: 0x00000000 instead of 0xdeadbeef
child 2 failed with exit status 99
Subtest forked-interruptible-faulting-reloc-thrashing: FAIL
Comment 7 Chris Wilson 2014-09-19 15:47:55 UTC
commit 4b81e9ca7df84d3c8775ebf0332f7444cafe8e77
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Sep 19 16:40:00 2014 +0100

    igt/gem_reloc_vs_gpu: Fix reloc.presumed_offset value
    
    Since the last patched value does not match the presumed relocation
    value we submit to the kernel, it occasionally makes mistakes. Also note
    that the libdrm interface makes the same presumptive mistake, and would
    easily be broken by a threaded environment.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77793
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 8 Guo Jinxian 2014-09-30 03:45:56 UTC
Verified.

root@x-bytm02:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./gem_reloc_vs_gpu --run-subtest forked-interruptible-faulting-reloc-thrashing
IGT-Version: 1.8-g32a0308 (x86_64) (Linux: 3.17.0-rc6_drm-intel-nightly_7101d8_20140929+ x86_64)
Subtest forked-interruptible-faulting-reloc-thrashing: SUCCESS (7.332s)
root@x-bytm02:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# echo $?
0
Comment 9 Jari Tahvanainen 2017-02-10 08:41:36 UTC
Closing (>2 years) old Verified+fixed.

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.