Bug 35819

Summary: [SNB] compiz crashed with segfault in gen6_vs_state.c:upload_vs_state()
Product: Mesa Reporter: Christopher James Halse Rogers <chalserogers>
Component: Drivers/DRI/i965Assignee: Chris Wilson <chris>
Status: RESOLVED WONTFIX QA Contact:
Severity: major    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Christopher James Halse Rogers 2011-03-30 22:27:36 UTC
Forwarded from https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/733192

It seems that there's a segfault condition in upload_vs_state() which at least one person has managed to hit in the linked Ubuntu bug.

When setting up the contstant buffer upload_vs_state() does
      drm_intel_gem_bo_map_gtt(constant_bo);
      param = constant_bo->virtual;
and then proceeds to memcpy to param.  However, there are a number of possible failure paths in gem_bo_map_gtt that will result in constant_bo->virtual being NULL, resulting in a segfault.

Since this seems like it'll occur part-way through emitting 3D state I'm not sure how to gracefully handle this, or even if it's possible.

Original stacktrace is here: https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/733192/+attachment/1900771/+files/Stacktrace.txt
Comment 1 Chris Wilson 2011-03-31 02:12:35 UTC
We can do better, but the root cause is whatever caused the map failure is likely to be system-wide.
Comment 2 Ian Romanick 2011-04-06 09:54:11 UTC
This looks similar to some of the failure cases seen in bug #33046.  What Mesa bits are being used?  It looks like 7.10, so it's probably something different.  It's worth checking, though.
Comment 3 Eric Anholt 2011-05-14 12:16:02 UTC
The dmesg in the linked bug report doesn't sound like one from when the crash had happened.  This is probably fallout from a GPU hang, and the thing to do is to fix the GPU hang.
Comment 4 Eric Anholt 2011-07-09 07:58:15 UTC
OK, the original bug report confirms that this is just fallout from a GPU hang.  Let's see a bug report for the hang if you can get details, instead.

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.