From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@freedesktop.org
Subject: [Bug 66331] New: WebGL water demo crashes LLVM
Date: Fri, 28 Jun 2013 16:18:55 +0000
Message-ID:
Priority
medium
Bug ID
66331
Assignee
dri-devel@lists.freedesktop.org
Summary
WebGL water demo crashes LLVM
Severity
normal
Classification
Unclassified
OS
Linux (All)
Reporter
greg@chown.ath.cx
Hardware
x86-64 (AMD64)
Status
NEW
Version
git
Component
Drivers/DRI/R600
Product
Mesa
Created attachment 81647 [details]
Dump with R600_DEBUG=ps,vs,fs
The WebGL demo http://madebyevan.com/webgl-water/ crashes r600g with LLVM
enabled:
firefox: /home/greg/build/llvm-3.3.src/include/llvm/CodeGen/MachineInstr.h:272:
llvm::MachineOperand& llvm::MachineInstr::getOperand(unsigned int): Assertion
`i < getNumOperands() && "getOperand() out of range!"' failed.
Stack dump:
0. Running pass 'Function Pass Manager' on module 'tgsi'.
1. Running pass 'R600 Emit Clause Markers Pass' on function '@main'
Aborted (core dumped)
This happens both with LLVM 3.3 and latest code from SVN. I tried to dump a
detailed log, but it actually crashes in a different place when dumping the
shaders - might be related though. Log is attached.
What | Removed | Added |
---|---|---|
Component | Drivers/DRI/R600 | Drivers/Gallium/r600 |
With current Mesa CVS (10.0.0! ;-) on RV730 AGP I get this,too. Pure LLVM (3.3 stable) bug, NOT sb. setenv R600_DEBUG nollvm Works OK. Nice link, Grigori! Application: konqueror (4.11.2) KDE Platform Version: 4.11.2 Qt Version: 4.8.5 Operating System: Linux 3.12.0-rc3-1-desktop i686 Distribution: "openSUSE 12.3 (i586)" -- Backtrace: Application: Konqueror (konqueror), signal: Segmentation fault Using host libthread_db library "/lib/libthread_db.so.1". [Current thread is 1 (Thread 0xb4948740 (LWP 31205))] [-] Thread 1 (Thread 0xb4948740 (LWP 31205)): [KCrash Handler] #5 getInterval (Idx=3D..., this=3D<optimized out>, instr=3D0xb9f03d8= , Reg=3D<optimized out>, this=3D<optimized out>, this=3D<optimized out>, LI=3D0= x0, this=3D<optimized out>, Reg=3D<optimized out>) at /usr/src/debug/llvm-3.3/include/llvm/CodeGen/LiveIntervalAnalysis.h:184 #6 llvm::ScheduleDAGInstrs::addVRegUseDeps (this=3D0x0, SU=3D0xffffffff, OperIdx=3D<optimized out>) at /usr/src/debug/llvm-3.3/lib/CodeGen/ScheduleDAGInstrs.cpp:414 #7 0xaac05890 in llvm::ScheduleDAGInstrs::buildSchedGraph (this=3D0xb9dd2c= 0, AA=3D<optimized out>, RPTracker=3D0x800) at /usr/src/debug/llvm-3.3/lib/CodeGen/ScheduleDAGInstrs.cpp:776 #8 0xaab364dc in llvm::DefaultVLIWScheduler::schedule (this=3D0xb9dd2c0) at /usr/src/debug/llvm-3.3/lib/CodeGen/DFAPacketizer.cpp:124 #9 0xaab367c9 in llvm::VLIWPacketizerList::PacketizeMIs (this=3D0xbf8abf58, MBB=3D<optimized out>, BeginItr=3D..., EndItr=3D...) at /usr/src/debug/llvm-3.3/lib/CodeGen/DFAPacketizer.cpp:164 #10 0xab228426 in llvm::R600Packetizer::runOnMachineFunction (this=3D<op= timized out>, Fn=3D...) at /usr/src/debug/llvm-3.3/lib/Target/R600/R600Packetize= r.cpp:444 #11 0xaab98bb5 in llvm::MachineFunctionPass::runOnFunction (this=3D0xb92d3f= 8, F=3D...) at /usr/src/debug/llvm-3.3/lib/CodeGen/MachineFunctionPass.cpp:33 #12 0xaa6d3307 in llvm::FPPassManager::runOnFunction (this=3D0x16, F=3D...)= at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1530 #13 0xaa6d3530 in llvm::FPPassManager::runOnModule (this=3D0xb8700b0, M=3D.= ..) at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1550 #14 0xaa6d37d9 in llvm::MPPassManager::runOnModule (this=3D0xb919068, M=3D.= ..) at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1608 #15 0xaa6d3fa1 in llvm::PassManagerImpl::run (this=3D0xb915bd0, M=3D...) at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1703 #16 0xaa6d4157 in llvm::PassManager::run (this=3D0xbf8ac168, M=3D...) at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1738 #17 0xaa7be651 in LLVMTargetMachineEmit (T=3D<optimized out>, M=3D0xb= 7602a8, OS=3D..., codegen=3D<optimized out>, ErrorMessage=3D<optimized out= >) at /usr/src/debug/llvm-3.3/lib/Target/TargetMachineC.cpp:194 #18 0xaa7be7a3 in LLVMTargetMachineEmitToMemoryBuffer (T=3D0xb913c70, M=3D0xb7602a8, codegen=3DLLVMObjectFile, ErrorMessage=3D0xbf8ac230, OutMemBuf=3D<optimized out>) at /usr/src/debug/llvm-3.3/lib/Target/TargetMachineC.cpp:220 #19 0xab724406 in radeon_llvm_compile () from /usr/lib/dri/updates/r600_dri= .so #20 0xab71f012 in r600_llvm_compile () from /usr/lib/dri/updates/r600_dri.so #21 0xab6cf917 in r600_shader_from_tgsi () from /usr/lib/dri/updates/r600_dri.so #22 0xab6d0b55 in r600_pipe_shader_create () from /usr/lib/dri/updates/r600_dri.so #23 0xab6e261d in r600_shader_select () from /usr/lib/dri/updates/r600_dri.= so #24 0xab6e27d4 in r600_create_shader_state () from /usr/lib/dri/updates/r600_dri.so #25 0xab4dbc33 in st_translate_fragment_program () from /usr/lib/dri/updates/r600_dri.so #26 0xab4dc7f6 in st_get_fp_variant () from /usr/lib/dri/updates/r600_dri.so #27 0xab4a451c in update_fp () from /usr/lib/dri/updates/r600_dri.so #28 0xab4a119e in st_validate_state () from /usr/lib/dri/updates/r600_dri.so #29 0xab4b62bc in st_draw_vbo () from /usr/lib/dri/updates/r600_dri.so #30 0xab489f65 in vbo_handle_primitive_restart () from /usr/lib/dri/updates/r600_dri.so #31 0xab48ba67 in vbo_validated_drawrangeelements () from /usr/lib/dri/updates/r600_dri.so #32 0xab48be4c in vbo_exec_DrawElements () from /usr/lib/dri/updates/r600_dri.so #33 0xb1e9fb9f in ?? () from /usr/lib/libQtWebKit.so.4 #34 0xb1e901f5 in ?? () from /usr/lib/libQtWebKit.so.4 #35 0xb2059430 in ?? () from /usr/lib/libQtWebKit.so.4 #36 0xb254792b in ?? () from /usr/lib/libQtWebKit.so.4 #37 0xb252d109 in ?? () from /usr/lib/libQtWebKit.so.4 #38 0xfffffffb in ?? () #39 0xb25cd05e in JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) () from /usr/lib/libQtWebKit.so.4 #40 0xad25a0cc in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(In reply to comment #1= ) > With current Mesa CVS (10.0.0! ;-) on RV730 AGP = I get this,too. >=20 > Pure LLVM (3.3 stable) bug, NOT sb. >=20 > setenv R600_DEBUG nollvm > Works OK. >=20 > Nice link, Grigori! >=20 > Application: konqueror (4.11.2) > KDE Platform Version: 4.11.2 > Qt Version: 4.8.5 > Operating System: Linux 3.12.0-rc3-1-desktop i686 > Distribution: "openSUSE 12.3 (i586)" Hopefully better (with LLVM source) trace run: Program received signal SIGSEGV, Segmentation fault. llvm::ScheduleDAGInstrs::addVRegUseDeps (this=3D0x0, SU=3D0xffffffff, OperIdx=3D<optimized out>) at /usr/src/debug/llvm-3.3/lib/CodeGen/ScheduleDAGInstrs.cpp:414 414 LiveRangeQuery LRQ(LIS->getInterval(Reg), LIS->getInstructionIndex(MI)); (gdb) list 409 MachineInstr *MI =3D SU->getInstr();=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 410 unsigned Reg =3D MI->getOperand(OperIdx).getReg();=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 411=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 412 // Lookup this operand's reaching definition.=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 413 assert(LIS && "vreg dependencies requires LiveInterv= als");=20=20=20=20=20=20=20=20=20=20=20=20 414 LiveRangeQuery LRQ(LIS->getInterval(Reg), LIS->getInstructionIndex(MI));=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 415 VNInfo *VNI =3D LRQ.valueIn();=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20 416=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 417 // VNI will be valid because MachineOperand::readsReg() is checke= d by caller.=20=20=20=20=20=20=20=20=20=20=20=20=20 418 assert(VNI && "No value to read by operand");= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 (gdb) info registers=20 eax 0xad55d20 181755168=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 ecx 0x0 0=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20 edx 0x0 0=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20 ebx 0xad33d000 -1389113344=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 esp 0xbfff6f40 0xbfff6f40=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 ebp 0x0 0x0=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 esi 0xad441f8 181682680=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 edi 0xad55d20 181755168=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 eip 0xad2e747d=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20 0xad2e747d <llvm::ScheduleDAGInstrs::addVRegUseDeps(llvm::SUnit*, un= signed int)+77>=20=20=20=20=20=20=20=20=20=20=20=20=20 eflags 0x210246 [ PF ZF IF RF ID ]=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 cs 0x73 115=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 ss 0x7b 123=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 ds 0x7b 123=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 es 0x7b 123=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 fs 0x0 0=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20 gs 0x33 51=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 (gdb) bt=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 #0 llvm::ScheduleDAGInstrs::addVRegUseDeps (this=3D0x0, SU=3D0xffffffff, OperIdx=3D<optimized out>)=20=20=20=20=20=20 at /usr/src/debug/llvm-3.3/lib/CodeGen/ScheduleDAGInstrs.cpp:414=20=20= =20=20=20=20=20=20=20=20=20=20 #1 0xad2e9890 in llvm::ScheduleDAGInstrs::buildSchedGraph (this=3D0xad55d2= 0, AA=3D<optimized out>,=20=20=20=20=20 RPTracker=3D0x700) at /usr/src/debug/llvm-3.3/lib/CodeGen/ScheduleDAGInstrs.cpp:776=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 #2 0xad21a4dc in llvm::DefaultVLIWScheduler::schedule (this=3D0xad55d20)= =20=20=20=20=20=20=20=20=20 at /usr/src/debug/llvm-3.3/lib/CodeGen/DFAPacketizer.cpp:124=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 #3 0xad21a7c9 in llvm::VLIWPacketizerList::PacketizeMIs (this=3D0xbfff7368, MBB=3D<optimized out>,=20=20=20=20=20 BeginItr=3D..., EndItr=3D...) at /usr/src/debug/llvm-3.3/lib/CodeGen/DFAPacketizer.cpp:164=20=20=20=20=20=20= =20=20=20=20 #4 0xad90f426 in llvm::R600Packetizer::runOnMachineFunction (this=3D<op= timized out>, Fn=3D...)=20=20=20=20=20=20=20=20=20 at /usr/src/debug/llvm-3.3/lib/Target/R600/R600Packetizer.cpp:444=20=20= =20=20=20=20=20=20=20=20=20 #5 0xad27cbb5 in llvm::MachineFunctionPass::runOnFunction (this=3D0xac81dd= 0, F=3D...) at /usr/src/debug/llvm-3.3/lib/CodeGen/MachineFunctionPass.cpp:33 #6 0xacdb7307 in llvm::FPPassManager::runOnFunction (this=3D0x36, F=3D...) at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1530 #7 0xacdb7530 in llvm::FPPassManager::runOnModule (this=3D0xaba13d8, M=3D.= ..) at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1550 #8 0xacdb77d9 in llvm::MPPassManager::runOnModule (this=3D0xac6db08, M=3D.= ..) at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1608 #9 0xacdb7fa1 in llvm::PassManagerImpl::run (this=3D0xac6a1e0, M=3D...) at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1703 #10 0xacdb8157 in llvm::PassManager::run (this=3D0xbfff7578, M=3D...) at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1738 #11 0xacea2651 in LLVMTargetMachineEmit (T=3D<optimized out>, M=3D0xa= aed0c0, OS=3D...,=20 codegen=3D<optimized out>, ErrorMessage=3D<optimized out>) at /usr/src/debug/llvm-3.3/lib/Target/TargetMachineC.cpp:194 #12 0xacea27a3 in LLVMTargetMachineEmitToMemoryBuffer (T=3D0xac68280, M=3D0xaaed0c0, codegen=3D LLVMObjectFile, ErrorMessage=3D0xbfff7640, OutMemBuf=3D<optimized ou= t>) at /usr/src/debug/llvm-3.3/lib/Target/TargetMachineC.cpp:220 #13 0xade1c7d6 in radeon_llvm_compile () from /usr/lib/dri/updates/r600_dri= .so ---Type <return> to continue, or q <return> to quit--- #14 0xade173e2 in r600_llvm_compile () from /usr/lib/dri/updates/r600_dri.so #15 0xaddc80f7 in r600_shader_from_tgsi () from /usr/lib/dri/updates/r600_dri.so #16 0xaddc9335 in r600_pipe_shader_create () from /usr/lib/dri/updates/r600_dri.so #17 0xadddadfd in r600_shader_select () from /usr/lib/dri/updates/r600_dri.= so #18 0xadddafb4 in r600_create_shader_state () from /usr/lib/dri/updates/r600_dri.so #19 0xadbd4413 in st_translate_fragment_program () from /usr/lib/dri/updates/r600_dri.so #20 0xadbd4fd6 in st_get_fp_variant () from /usr/lib/dri/updates/r600_dri.so #21 0xadb9ccfc in update_fp () from /usr/lib/dri/updates/r600_dri.so #22 0xadb9997e in st_validate_state () from /usr/lib/dri/updates/r600_dri.so #23 0xadbaea9c in st_draw_vbo () from /usr/lib/dri/updates/r600_dri.so #24 0xadb82745 in vbo_handle_primitive_restart () from /usr/lib/dri/updates/r600_dri.so #25 0xadb84247 in vbo_validated_drawrangeelements () from /usr/lib/dri/updates/r600_dri.so #26 0xadb8462c in vbo_exec_DrawElements () from /usr/lib/dri/updates/r600_dri.so #27 0xb2775b9f in ?? () from /usr/lib/libQtWebKit.so.4 #28 0xb27661f5 in ?? () from /usr/lib/libQtWebKit.so.4 #29 0xb292f430 in ?? () from /usr/lib/libQtWebKit.so.4 #30 0xb2e1d92b in ?? () from /usr/lib/libQtWebKit.so.4 #31 0xb2e03109 in ?? () from /usr/lib/libQtWebKit.so.4 #32 0xfffffffb in ?? () #33 0xb2ea305e in JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) () from /usr/lib/libQtWebKit.so.4 #34 0xb0b5ea4c in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?)
Created attachment=
87534 [details]
Dump with R600_DEBUG=3Dps,vs,fs
Does it work with llvm 3.4svn ? Here it seems llvm can compile the shader without crashing.
Sorry, I haven't have LLVM SVN on this system. -Dieter
Is a backport possible for stable (3.3)? Couldn't switch all to devel...;-)
OK, now I'm on openSUSE 13.1 kernel 3.13.1 LLVM 3.4 ;-) Mesa git-c849ecc r600g (RV730 AGP) Works so far, but... ...reflection corruption, see attachment. With R600_DEBUG=3Dnollvm it is fine.
Created attachment 93202 [details]
webgl-water.png
I have llvm from git compiled a week or so and the rest of the stack yesterday and use a 8570D IGP and the demo works fine on Seamonkey 2.23 with or without llvm (Seamonkey uses the Firefox engine). I have layers.acceleration.force-enabled set to true. Older versions of llvm had some issues with this demo, crashed the browser or specular lighting was missing.
What | Removed | Added |
---|---|---|
Status | NEW | RESOLVED |
Resolution | --- | FIXED |
I said that I have 3.4 final (current stable)... Anyway, it is FIXED, now! - GREAT job! openSUSE 13.1 kernel 3.13.1 LLVM 3.4 ;-) Mesa 10.1.0-devel (git-16215a9) --- The first r600g geom shader (OpenGL 3.3) tree. --- But I have to patch = my kernel...;-) r600g (RV730 AGP) Konqueror 4.12.2 (KDE 4.12.2) Could be CLOSED, now.