Bug 106997 - [Regression]. Dying light game is crashing on latest mesa
Summary: [Regression]. Dying light game is crashing on latest mesa
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-22 08:10 UTC by Denis
Modified: 2018-10-24 07:18 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
attachment-22975-0.html (4.38 KB, text/html)
2018-09-10 07:58 UTC, Sergii Romantsov
Details

Description Denis 2018-06-22 08:10:46 UTC
Hi

Configuration:
SKL
Ubuntu 16.04
mesa versions - git from 30.05+


1. Launch the game using .sh script (as usual for steam games)
2. Wait for game loading.
Result: after animation with logo's game crashes: error:

+i965: Failed to submit batchbuffer: Invalid argument+

bisected to first bad commit:

commit a363bb2cd0e2a141f2c60be005009703bffcbe4e
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Tue Apr 10 01:18:25 2018 -0700

    i965: Allocate VMA in userspace for full-PPGTT systems.


Trying to take a backtrace
Comment 1 Denis 2018-06-22 13:21:28 UTC
Found out 1 tricky behavior of this game:
1. I have 2 PC's - SKL and KBL GPUs (same mesa versions, same OS, ubuntu 16.04). And on 1 PC (KBL) game is always crashing after launching exactly from steam, and rarely crashes - if you launch it from CMD.
And on second PC (SKL) - game is crashing ONLY if I do "alt+tab" during loading, or after it.

I found options, which may prevent error about OpenGL mismatch, thought that the reason can be on them. With these flags on my PC (SKL) - crash is stable. Without these flags - crash occurs only after alt-tab.

To setup needed flags - before game launching (Launch options for the game in Steam):
MESA_GL_VERSION_OVERRIDE=4.5 MESA_GLSL_VERSION_OVERRIDE=450 %command%

Took them from here:
https://www.gamingonlinux.com/forum/topic/3057
https://steamcommunity.com/app/239140/discussions/0/1326718197205660517/?ctp=2
Comment 2 Denis 2018-07-23 15:36:32 UTC
Hello. I tested the game with this patch https://patchwork.freedesktop.org/patch/240354/

Made about 5-6 runs and didn't see the crash (to play the game, you still have to override gl version)
Comment 3 Denis 2018-08-16 13:23:41 UTC
Hi again. As these two patches were included to mesa-master, issue can be closed as Fixed, I think.

Tested latest mesa-git and couldn't reproduce it (with override and without).


___________________________________________________

commit efb28aa9705699794143b32e11f5c857db60e060
Author: Sergii Romantsov <sergii.romantsov@gmail.com>
Date:   Wed Aug 15 15:21:47 2018 +0300

    i965: Emitting 3DSTATE_SO_BUFFER of 0-size.
    
    Avoided filling of whole structure and bo-allocation if
    size of surface is 0.
    
    Signed-off-by: Sergii Romantsov <sergii.romantsov@globallogic.com>

commit 98b3b6367a919990bc2832183fdcf285ffeb4b8a
Author: Erik Faye-Lund <erik.faye-lund@collabora.com>
Date:   Tue Aug 14 13:06:02 2018 +0100

    virgl: report actual max-texture sizes
    
:
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>

commit 24839663a40257e0468406d72c48d431b5ae2bd4
Author: Sergii Romantsov <sergii.romantsov@gmail.com>
Date:   Wed Aug 15 14:23:42 2018 +0300

    intel/ppgtt: memory address alignment
    
    Kernel (for ppgtt) requires memory address to be
    aligned to page size (4096).
    
    -v2: added marking that also fixes initial commit 01058a552294.
    -v3: numbers replaced by PAGE_SIZE; buffer-object size is aligned
    instead of alignment of offsets (Chris Wilson).
    -v4: changes related to PAGE_SIZE moved to separate commit
    -v5: restored alignment to page-size for 0-size.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106997
    Fixes: a363bb2cd0e2 (i965: Allocate VMA in userspace for full-PPGTT systems.)
    Fixes: 01058a552294 (i965: Add virtual memory allocator infrastructure to brw_bufmgr.)
    Signed-off-by: Sergii Romantsov <sergii.romantsov@globallogic.com>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Comment 4 Mark Janes 2018-08-16 20:29:58 UTC
Denis,  when you comment as to which commit fixes the bug, please also change the status of the bug to RESOLVED.
Comment 5 Denis 2018-08-17 09:07:14 UTC
ok, got you. Wasn't sure that I am able to do this. Thanks
Comment 6 Andrés Gómez García 2018-09-07 17:43:58 UTC
(In reply to Denis from comment #3)
> Hi again. As these two patches were included to mesa-master, issue can be
> closed as Fixed, I think.
> 
> Tested latest mesa-git and couldn't reproduce it (with override and without).

[...]

> commit efb28aa9705699794143b32e11f5c857db60e060
> commit 98b3b6367a919990bc2832183fdcf285ffeb4b8a
> commit 24839663a40257e0468406d72c48d431b5ae2bd4

[...]

I see listed 3 patches there. In any case, I suppose you only mean the 1st and 3rd (?)

Denis, Sergii, are both needed to get this bug fixed? Asking because only the 3rd has been pulled into the stable branches.
Comment 7 Sergii Romantsov 2018-09-10 07:58:13 UTC
Created attachment 141499 [details]
attachment-22975-0.html

Hello, Andres.
To fix issue only one commit is needed:

24839663a40257e0468406d72c48d431b5ae2bd4


On Fri, Sep 7, 2018 at 8:43 PM, <bugzilla-daemon@freedesktop.org> wrote:

> Andrés Gómez García <agomez@igalia.com> changed bug 106997
> <https://bugs.freedesktop.org/show_bug.cgi?id=106997>
> What Removed Added
> CC   agomez@igalia.com, sergii.romantsov@globallogic.com
>
> *Comment # 6 <https://bugs.freedesktop.org/show_bug.cgi?id=106997#c6> on
> bug 106997 <https://bugs.freedesktop.org/show_bug.cgi?id=106997> from
> Andrés Gómez García <agomez@igalia.com> *
>
> (In reply to Denis from comment #3 <https://bugs.freedesktop.org/show_bug.cgi?id=106997#c3>)> Hi again. As these two patches were included to mesa-master, issue can be
> > closed as Fixed, I think.
> >
> > Tested latest mesa-git and couldn't reproduce it (with override and without).
>
> [...]
> > commit efb28aa9705699794143b32e11f5c857db60e060
> > commit 98b3b6367a919990bc2832183fdcf285ffeb4b8a
> > commit 24839663a40257e0468406d72c48d431b5ae2bd4
>
> [...]
>
> I see listed 3 patches there. In any case, I suppose you only mean the 1st and
> 3rd (?)
>
> Denis, Sergii, are both needed to get this bug fixed? Asking because only the
> 3rd has been pulled into the stable branches.
>
> ------------------------------
> You are receiving this mail because:
>
>    - You are on the CC list for the bug.
>
>
Comment 8 Mark Janes 2018-10-10 02:38:24 UTC
Sergii,

Is it possible to trigger this bug with a piglit test?  Whenever possible, we want to prevent further regressions with automated tests.
Comment 9 Sergii Romantsov 2018-10-19 09:13:59 UTC
Proposed piglit-test: https://patchwork.freedesktop.org/patch/257590/


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.