Bug 21329

Summary: [i945][KMS] Intel driver assert failure cause X to restart during resume
Product: xorg Reporter: Jie Luo <clotho67>
Component: Driver/intelAssignee: Jesse Barnes <jbarnes>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: critical    
Priority: medium Keywords: NEEDINFO
Version: 7.4 (2008.09)   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg.0.log
none
gdm.0.log none

Description Jie Luo 2009-04-21 20:04:45 UTC
Created attachment 25020 [details]
Xorg.0.log

When resume from memory, some times X will be reseted with a assert failed message in gdm log.

X: i830_batchbuffer.h:78: intel_batch_emit_dword: Assertion `pI830->batch_ptr != ((void *)0)' failed.

Since intel_batch_emit_dword is only called from OUT_BATCH macro, this is not really show the problem. So I add another assertion before calling intel_batch_emit_dword in OUT_BATCH. I wait the X to be reset again during resume, and then I get this.

X: i830_exa.c:387: I830EXACopy: Assertion `pI830->batch_ptr != ((void *)0)' failed.

And this bug didn't have a reliable way to reproduce, it only occurs randomly during resume.


System environment: 
-- chipset: 945GM
-- system architecture: x86
-- xf86-video-intel/xserver/mesa/drm version: 
xf86-video-intel: git commit 2e3b95ed0197971e81ab7509245c899e96859d5b
xserver: 1.6.1
mesa: 7.4
libdrm: git commit
-- kernel version: 2.6.30-rc2
-- Linux distribution: Gentoo
-- Machine model: ThinkPad X60
Comment 1 Jie Luo 2009-04-28 23:00:06 UTC
Created attachment 25248 [details]
gdm.0.log

This time pI830->batch_ptr is NULL when doing i830_uxa_copy.

X: i830_exa.c:377: i830_uxa_copy: Assertion `pI830->batch_ptr != ((void *)0)' failed.

So the problem should be pI830->batch_ptr or dri_bo_map() which initialized pI830->batch_ptr.
Comment 2 Jie Luo 2009-04-29 23:21:55 UTC
A possible way to reproduce this bug. Suspend to memory for a whole day and then resume, it seams that each time I hit this bug is after a almost whole day suspend.
Comment 3 Jesse Barnes 2009-05-11 11:21:51 UTC
Adjusting severity: crashes & hangs should be marked critical.
Comment 4 Jesse Barnes 2009-05-11 12:08:04 UTC
Do you still see this with current bits?  AFAICT, the only way this could happen is if the intel_batch_init at EnterVT time fails, since it's responsible for allocating & mapping the new batch object (in intel_next_batch).  It might help if you could get a backtrace from the failure...
Comment 5 Jesse Barnes 2009-05-12 14:37:26 UTC
Ah the old rendering while VT switched bug, should be fixed:

commit e54a23bff068416ccbdb75d538dc7dcd40a6c95c
Author: Keith Packard <keithp@keithp.com>
Date:   Thu May 7 16:35:19 2009 -0700

    Fallback when VT inactive
Comment 6 Jesse Barnes 2009-05-12 14:37:37 UTC
Oh that's a commit to xf86-video-intel btw.
Comment 7 Jie Luo 2009-05-23 05:22:31 UTC
(In reply to comment #6)
> Oh that's a commit to xf86-video-intel btw.
> 

Yes, this bug should be fixed. I can't reproduce it any more.
Thanks 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.