Bug 109229 - glLinkProgram locks up for ~30 seconds
Summary: glLinkProgram locks up for ~30 seconds
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: 18.3
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-05 10:45 UTC by Bronson
Modified: 2019-01-29 21:44 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
apitrace of godot including glLinkProgram lock up (19.85 MB, application/gzip)
2019-01-17 01:50 UTC, smt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bronson 2019-01-05 10:45:23 UTC
A recent updated to Manjaro/Arch has caused the Godot Engine to lock up when it calls glLinkProgram.
This appears to be a Mesa 18.3 bug as the issue has started recently and so has 18.3 been rolled out recently in Manjaro.

Here are URL's to bug reports on the Godot forum that should provide further information:
https://github.com/godotengine/godot/issues/24362
https://github.com/godotengine/godot/issues/24783
https://github.com/godotengine/godot/issues/24340
Comment 1 Timothy Arceri 2019-01-07 01:31:46 UTC
Can you try to bisect the commit where things chnages between 18.2 and 18.3?
Comment 2 smt 2019-01-07 21:07:55 UTC
This issue seems to be affecting me too, some people say it's been fixed in 18.2.3/.4 however I'm running 18.3.1 and definitely have the same symptoms in regards to Godot freezing up, I don't know much so can't be more help, there seems to be some discussion relating to the issue here though:

https://bugzilla.redhat.com/show_bug.cgi?id=1646888
Comment 3 Timothy Arceri 2019-01-08 00:01:03 UTC
(In reply to smt from comment #2)
> This issue seems to be affecting me too, some people say it's been fixed in
> 18.2.3/.4 however I'm running 18.3.1 and definitely have the same symptoms
> in regards to Godot freezing up, I don't know much so can't be more help,
> there seems to be some discussion relating to the issue here though:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1646888

Are you sure that is the same bug? That one wasn't a Mesa bug it was a bug in GCC.
Comment 4 smt 2019-01-08 01:49:44 UTC
(In reply to Timothy Arceri from comment #3)
> (In reply to smt from comment #2)
> > This issue seems to be affecting me too, some people say it's been fixed in
> > 18.2.3/.4 however I'm running 18.3.1 and definitely have the same symptoms
> > in regards to Godot freezing up, I don't know much so can't be more help,
> > there seems to be some discussion relating to the issue here though:
> > 
> > https://bugzilla.redhat.com/show_bug.cgi?id=1646888
> 
> Are you sure that is the same bug? That one wasn't a Mesa bug it was a bug
> in GCC.

uh yeah sorry, I think that might be right, the symptoms are all very similar and the versions so close it's getting a little confusing for me to figure it all out to be honest
Comment 5 Timothy Arceri 2019-01-08 23:50:43 UTC
Well I have no idea how to use Godot and couldn't follow the instructions in the linked bug reports. So can someone attach a sample project here and instructions to trigger this problem with it? Thanks.
Comment 6 Fabian 2019-01-11 05:13:31 UTC
Hi Tim, sorry about the slow reply.

I've added instructions on how to reproduce the problem here:
https://github.com/godotengine/godot/issues/24783#issuecomment-453380560

Download build.zip and it has everything you need in there.


How would I go about bisecting the changes between 18.2 and 18.3 where things went awry?
Comment 7 smt 2019-01-17 01:50:19 UTC
Created attachment 143144 [details]
apitrace of godot including glLinkProgram lock up

I don't know how useful this is in this situation and I haven't done it before now but I've managed to get an apitrace of it happening inside of Godot, happening around frame 540 or 541 when I enable emission on a material (though the freeze happens on any shader change if it's changing for the first time on that build of Godot), hopefully this can help in some way

Just for clarification I am running 18.3.1 on Arch too
Comment 8 Timothy Arceri 2019-01-28 06:17:40 UTC
Thanks for the extra info and sorry for delay in looking at this.

Fix sent to the list:

https://patchwork.freedesktop.org/patch/281427/
Comment 9 Timothy Arceri 2019-01-28 22:56:21 UTC
Should be fixed by:

commit fb78a6cb72270de271f75d6f6c9b5ebadba7a898
Author: Timothy Arceri <tarceri@itsqueeze.com>
Date:   Mon Jan 28 17:15:34 2019 +1100

    glsl: use remap location when serialising uniform program resource data
    
    This allows us to avoid expensive string compares since we already have
    a map to the pointers.
    
    These compares were taking ~30 seconds for a single shader compile
    in Godot due to it using 64,000+ uniforms.
    
    Fixes: c4cff5f40254 ("glsl: add basic support for resource list to shader cache")
    
    Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109229
Comment 10 smt 2019-01-29 21:44:42 UTC
Not the poster of this bug but a couple of us have tested this and indeed Godot appears to be running fine now, thank you very much


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.