Bug 37440

Summary: Infinite loop detected in fragment program
Product: Mesa Reporter: Benjamin <benjo316>
Component: Drivers/DRI/nouveauAssignee: Nouveau Project <nouveau>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Benjamin 2011-05-21 10:46:09 UTC
I get the following error when visiting this[0] page (**CAUTION**, may lockup your GPU) in Firefox:
Mesa 7.11-devel implementation error: Infinite loop detected in fragment program
Please report at bugs.freedesktop.org

I'm using the nouveau driver, with an NV44 card, in case that's important.

The browser locks up for a while (I guess while it's in the infinite loop), so I had time to attach gdb and get a backtrace (attached).

For you Firefox people: the browser doesn't lock up if I export MOZ_GLX_IGNORE_BLACKLIST; it only locks up if I set the location of libOSMesa (without exporting the variable).
Comment 1 Benjamin 2011-05-21 10:46:55 UTC
Err, this page:
[0] http://www.busydoingnothing.co.uk/webgl-lockup.html
Comment 2 Andreas Boll 2012-10-20 17:12:22 UTC
Works for me on r600g and llvmpipe on mesa git and mesa 8.0.4

Firefox Nightly 19.0a 20121020
WebGL Renderer: X.Org -- Gallium 0.4 on AMD RV770 -- 2.1 Mesa 9.1-devel (git-d2b0338)

reassigning to nouveau
Comment 3 Andreas Boll 2012-10-20 17:15:11 UTC
Benjamin, can you test with a newer version of mesa (8.0.x, 9.0.x or git)
Comment 4 Andrew Caudwell 2012-12-06 02:49:06 UTC
I believe this is due to a bug in mesa/program/prog_execute.c.

get_dst_register_pointer() returns a dummy register when the dest register Index exceeds MAX_PROGRAM_TEMPS (currently set to 256). Perhaps this should be an error or an assertion failure instead.

Raising the value of MAX_PROGRAM_TEMPS worked around the infinite loop in my case.

I also needed to increase INST_INDEX_BITS to avoid an intermitant assertion failure from mesa_src_reg_from_ir_src_reg(), though this may not be directly related.

Mesa 9.1-devel using OSMesa.
Comment 5 Ilia Mirkin 2013-08-31 06:35:36 UTC
Going to that page doesn't hang firefox for me on NV42 on mesa 9.1.2 or 9.2. (Rendering does appear to be messed up with all webgl things though.)

I think there might be some confusion about what you were doing -- were you using osmesa or nouveau as the opengl backend? In any case, check the newest version of mesa and see if it's still happening.

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.