Bug 509805

Summary: some 3d apps cause consistent hang on intel graphics w/ & w/o kms
Product: [Fedora] Fedora Reporter: pankaj pandey <pankaj86>
Component: xorg-x11-drv-intelAssignee: Adam Jackson <ajax>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: ajax, xgl-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-07 13:19:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description pankaj pandey 2009-07-06 11:26:59 UTC
Description of problem:
With updated F11, i cannot run blender. It causes complete system hang, requiring hard reboot.
Initially i noted this in a comment in bug #507282, but this issue is unrelated to that so i'm creating a new bug report. I found out similar other issues but none too close to this one.

Version-Release number of selected component (if applicable):
Fedora 11 updated, intel 965M laptop, x86_64
xorg-x11-drv-intel.x86_64 2.7.0-7.fc11
mesa-dri-drivers.x86_64 7.6-0.1.fc11

Steps:
1. open terminal
2. Type "blender"
Observation:
1. Terminal shows information upto got python, (/usr/bin/blender: line 61: [: too many arguments)
2. Blender window tries to open
3. Before anything is displayed in blender xserver hangs
4. With mode setting enabled: mouse cursor also stops
   Without kernel modesetting (nomodeset kernel parameter set): xserver still
hangs but cursor still moves (not that it is of any use)
5. I could not check if the computer is still running (ssh) as i
do not have access to another networked computer nearby. Note that the blender
lockup problem occurs irrespective of whether compiz is enabled or not.
Hard reboot is necessary to use the computer again  

How reproducible:
Always

Additional info:
The following info was obtained in /var/log/messages following crashed with kernel parameter drm_debug=1:

With kernel modesetting on:
Jul  6 12:07:41 localhost kernel: ------------[ cut here ]------------
Jul  6 12:07:41 localhost kernel: kernel BUG at
drivers/gpu/drm/i915/i915_gem.c:2136!
Jul  6 12:07:41 localhost kernel: invalid opcode: 0000 [#1] SMP 
Jul  6 12:07:41 localhost kernel: last sysfs file:
/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda2/stat
Jul  6 12:07:41 localhost kernel: CPU 0 
Jul  6 12:07:41 localhost kernel: Modules linked in: fuse sunrpc ipv6
nf_conntrack_ftp nf_conntrack_netbios_ns cpufreq_ondemand acpi_cpufreq
freq_table reiserfs dm_multipath kvm_intel kvm uinput snd_hda_codec_idt
snd_hda_codec_intelhdmi lib80211_crypt_tkip snd_hda_intel snd_hda_codec wl(P)
snd_hwdep snd_pcm uvcvideo snd_timer videodev snd lib80211 v4l1_compat iTCO_wdt
sdhci_pci sdhci iTCO_vendor_support soundcore ricoh_mmc mmc_core sky2
v4l2_compat_ioctl32 snd_page_alloc firewire_ohci firewire_core wmi dell_laptop
dcdbas crc_itu_t serio_raw pcspkr joydev i2c_i801 i915 drm i2c_algo_bit
i2c_core video output [last unloaded: microcode]
Jul  6 12:07:41 localhost kernel: Pid: 3087, comm: blender.bin Tainted: P      
    2.6.29.5-191.fc11.x86_64 #1 Inspiron 1525                   
Jul  6 12:07:41 localhost kernel: RIP: 0010:[<ffffffffa005f3d2>] 
[<ffffffffa005f3d2>] i915_gem_object_get_fence_reg+0x221/0x61e [i915]
Jul  6 12:07:41 localhost kernel: RSP: 0000:ffff88005d825be8  EFLAGS: 00010202
Jul  6 12:07:41 localhost kernel: RAX: 0000000000002697 RBX: ffff88005f4e8780
RCX: 0000000000000010
Jul  6 12:07:41 localhost kernel: RDX: 0000000000002a02 RSI: 0000000000002697
RDI: ffff88005f4e8540
Jul  6 12:07:41 localhost kernel: RBP: ffff88005d825c28 R08: 0000000000000003
R09: ffff88007d5b61e8
Jul  6 12:07:41 localhost kernel: R10: 0000000000000200 R11: 0000000000000040
R12: ffff88005f4e86c0
Jul  6 12:07:41 localhost kernel: R13: ffff88007d5b6000 R14: ffff88005f4e8900
R15: ffff88007d5b5000
Jul  6 12:07:41 localhost kernel: FS:  00007fdbbaa55710(0000)
GS:ffffffff817b7000(0000) knlGS:0000000000000000
Jul  6 12:07:41 localhost kernel: CS:  0010 DS: 0000 ES: 0000 CR0:
0000000080050033
Jul  6 12:07:41 localhost kernel: CR2: 00007fdbb4917000 CR3: 000000005d82b000
CR4: 00000000000026e0
Jul  6 12:07:41 localhost kernel: DR0: 0000000000000000 DR1: 0000000000000000
DR2: 0000000000000000
Jul  6 12:07:41 localhost kernel: DR3: 0000000000000000 DR6: 00000000ffff0ff0
DR7: 0000000000000400
Jul  6 12:07:41 localhost kernel: Process blender.bin (pid: 3087, threadinfo
ffff88005d824000, task ffff880068100000)
Jul  6 12:07:41 localhost kernel: Stack:
Jul  6 12:07:41 localhost kernel: ffff880068100000 ffff88007d5b61e8
ffff88007d5b5020 ffff88005f4e8900
Jul  6 12:07:41 localhost kernel: ffff88007d5b5020 ffff88005f4e8780
ffff88005f435000 ffff88005d825ce8
Jul  6 12:07:41 localhost kernel: ffff88005d825c98 ffffffffa00610d3
ffff88000000c208 00007fdbb4917000
Jul  6 12:07:41 localhost kernel: Call Trace:
Jul  6 12:07:41 localhost kernel: [<ffffffffa00610d3>]
i915_gem_fault+0xc1/0x136 [i915]
Jul  6 12:07:41 localhost kernel: [<ffffffff810b213f>] __do_fault+0x55/0x3d5
Jul  6 12:07:41 localhost kernel: [<ffffffff812429bb>] ?
agp_flush_chipset+0x1b/0x1d
Jul  6 12:07:41 localhost kernel: [<ffffffffa005d523>] ?
i915_gem_object_flush_cpu_write_domain+0x26/0x32 [i915]
Jul  6 12:07:41 localhost kernel: [<ffffffff810b4475>]
handle_mm_fault+0x349/0x7c5
Jul  6 12:07:41 localhost kernel: [<ffffffff813ae615>]
do_page_fault+0x5b5/0x9e9
Jul  6 12:07:41 localhost kernel: [<ffffffff813ac01a>] ?
unlock_kernel+0x2f/0x32
Jul  6 12:07:41 localhost kernel: [<ffffffff810e0e27>] ? vfs_ioctl+0x76/0x87
Jul  6 12:07:41 localhost kernel: [<ffffffff810e12bb>] ?
do_vfs_ioctl+0x462/0x4a3
Jul  6 12:07:41 localhost kernel: [<ffffffff813abab5>] ?
trace_hardirqs_off_thunk+0x3a/0x6c
Jul  6 12:07:41 localhost kernel: [<ffffffff813ac175>] page_fault+0x25/0x30
Jul  6 12:07:41 localhost kernel: Code: ff e8 35 e9 ff ff 85 c0 0f 84 b3 fe ff
ff e9 06 04 00 00 41 83 7c 24 20 00 75 10 48 8b 55 c8 48 8b 02 f7 40 70 be ff
ff ff 74 04 <0f> 0b eb fe 49 8b bf 38 01 00 00 48 8b 70 38 48 85 ff 74 1a 48 
Jul  6 12:07:41 localhost kernel: RIP  [<ffffffffa005f3d2>]
i915_gem_object_get_fence_reg+0x221/0x61e [i915]
Jul  6 12:07:41 localhost kernel: RSP <ffff88005d825be8>
Jul  6 12:07:41 localhost kernel: ---[ end trace 48746cbe5fbb12dd ]---  

With kernel modesetting off:
Jul  6 12:48:30 localhost kernel: ------------[ cut here ]------------
Jul  6 12:48:30 localhost kernel: kernel BUG at
drivers/gpu/drm/i915/i915_gem.c:2136!
Jul  6 12:48:30 localhost kernel: invalid opcode: 0000 [#1] SMP 
Jul  6 12:48:30 localhost kernel: last sysfs file:
/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
Jul  6 12:48:30 localhost kernel: CPU 1 
Jul  6 12:48:30 localhost kernel: Modules linked in: fuse sunrpc ipv6
nf_conntrack_ftp nf_conntrack_netbios_ns cpufreq_ondemand acpi_cpufreq
freq_table reiserfs dm_multipath kvm_intel kvm uinput lib80211_crypt_tkip
snd_hda_codec_idt snd_hda_codec_intelhdmi wl(P) snd_hda_intel snd_hda_codec
uvcvideo iTCO_wdt snd_hwdep snd_pcm iTCO_vendor_support sdhci_pci videodev
sdhci snd_timer snd soundcore lib80211 v4l1_compat v4l2_compat_ioctl32
serio_raw pcspkr firewire_ohci i2c_i801 snd_page_alloc sky2 mmc_core
firewire_core wmi dell_laptop joydev dcdbas crc_itu_t i915 drm i2c_algo_bit
i2c_core video output [last unloaded: microcode]
Jul  6 12:48:30 localhost kernel: Pid: 2575, comm: blender.bin Tainted: P      
    2.6.29.5-191.fc11.x86_64 #1 Inspiron 1525                   
Jul  6 12:48:30 localhost kernel: RIP: 0010:[<ffffffffa005f3d2>] 
[<ffffffffa005f3d2>] i915_gem_object_get_fence_reg+0x221/0x61e [i915]
Jul  6 12:48:30 localhost kernel: RSP: 0000:ffff88005d197be8  EFLAGS: 00010202
Jul  6 12:48:30 localhost kernel: RAX: 0000000000002bed RBX: ffff88005d1a9cc0
RCX: 0000000000000010
Jul  6 12:48:30 localhost kernel: RDX: 0000000000002a02 RSI: 0000000000002bed
RDI: ffff88005d1a9a80
Jul  6 12:48:30 localhost kernel: RBP: ffff88005d197c28 R08: 0000000000000003
R09: ffff88007d5ae1e8
Jul  6 12:48:30 localhost kernel: R10: 0000000000000200 R11: 0000000000000040
R12: ffff88005d1a9c00
Jul  6 12:48:30 localhost kernel: R13: ffff88007d5ae000 R14: ffff88005d1a9e40
R15: ffff88007d5ac000
Jul  6 12:48:30 localhost kernel: FS:  00007f7324c6e710(0000)
GS:ffff88007f001f00(0000) knlGS:0000000000000000
Jul  6 12:48:30 localhost kernel: CS:  0010 DS: 0000 ES: 0000 CR0:
0000000080050033
Jul  6 12:48:30 localhost kernel: CR2: 00007f731eb30000 CR3: 000000005d463000
CR4: 00000000000026e0
Jul  6 12:48:30 localhost kernel: DR0: 0000000000000000 DR1: 0000000000000000
DR2: 0000000000000000
Jul  6 12:48:30 localhost kernel: DR3: 0000000000000000 DR6: 00000000ffff0ff0
DR7: 0000000000000400
Jul  6 12:48:30 localhost kernel: Process blender.bin (pid: 2575, threadinfo
ffff88005d196000, task ffff880056945c00)
Jul  6 12:48:30 localhost kernel: Stack:
Jul  6 12:48:30 localhost kernel: ffff88005d197c38 ffff88007d5ae1e8
ffff88007d5ac020 ffff88005d1a9e40
Jul  6 12:48:30 localhost kernel: ffff88007d5ac020 ffff88005d1a9cc0
ffff8800569f0c60 ffff88005d197ce8
Jul  6 12:48:30 localhost kernel: ffff88005d197c98 ffffffffa00610d3
ffff88005d197c68 00007f731eb30000
Jul  6 12:48:30 localhost kernel: Call Trace:
Jul  6 12:48:30 localhost kernel: [<ffffffffa00610d3>]
i915_gem_fault+0xc1/0x136 [i915]
Jul  6 12:48:30 localhost kernel: [<ffffffff810b213f>] __do_fault+0x55/0x3d5
Jul  6 12:48:30 localhost kernel: [<ffffffff812429bb>] ?
agp_flush_chipset+0x1b/0x1d
Jul  6 12:48:30 localhost kernel: [<ffffffffa005d523>] ?
i915_gem_object_flush_cpu_write_domain+0x26/0x32 [i915]
Jul  6 12:48:30 localhost kernel: [<ffffffff810b4475>]
handle_mm_fault+0x349/0x7c5
Jul  6 12:48:30 localhost kernel: [<ffffJul  6 12:49:17 localhost kernel:
imklog 3.21.11, log source = /proc/kmsg started.
Jul  6 12:49:17 localhost kernel: Initializing cgroup subsys cpuset

Apart from blender, an other application based on vtk also hangs, though that is not so reproducible

Comment 1 pankaj pandey 2009-07-06 11:37:02 UTC
I have no xorg.xonf file.

As a workaround to this problem i have found that installing driconf and making some changes in it made the crashes go away. I could also run blender. Here's my driconf file

[pankaj@localhost ~]$ cat .drirc 
<driconf>
    <device screen="0" driver="i965">
        <application name="Default">
            <option name="force_s3tc_enable" value="false" />
            <option name="no_rast" value="false" />
            <option name="fthrottle_mode" value="1" />
            <option name="always_flush_cache" value="true" />
            <option name="early_z" value="false" />
            <option name="always_flush_batch" value="true" />
            <option name="bo_reuse" value="0" />
            <option name="texture_tiling" value="false" />
            <option name="vblank_mode" value="1" />
            <option name="allow_large_textures" value="1" />
        </application>
    </device>
</driconf>

With this setting i get following messages on my terminal when i run any 3d app
[pankaj@localhost ~]$ glxgears 
flushing batchbuffer before/after each draw call
flushing GPU caches before/after each draw call

If needed i can try each setting one by one to exactly determine which one makes the problem go away
Thanks

Comment 2 pankaj pandey 2009-07-07 13:19:08 UTC

*** This bug has been marked as a duplicate of bug 509974 ***