Skip to contentSkip to conversation

New: WebGL water demo crashes LLVM

Bug 66331 [email protected] 1 participant 13 messages Jun 28, 2013 – Feb 5, 2014

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=66331

Priority: medium
Bug ID: 66331
Assignee: [email protected]
Summary: WebGL water demo crashes LLVM
Severity: normal
Classification: Unclassified
OS: Linux (All)
Reporter: [email protected]
Hardware: x86-64 (AMD64)
Status: NEW
Version: git
Component: Drivers/DRI/R600
Product: Mesa

Created attachment 81647
--> https://bugs.freedesktop.org/attachment.cgi?id=81647&action=edit
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.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

[Bug 66331] WebGL water demo crashes LLVM

https://bugs.freedesktop.org/show_bug.cgi?id=66331

Andreas Boll <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
Component|Drivers/DRI/R600 |Drivers/Gallium/r600

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw

[Bug 66331] WebGL water demo crashes LLVM

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=66331

--- Comment #1 from Dieter Nützel <[email protected]> --- 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=..., this=<optimized out>, instr=0xb9f03d8, Reg=<optimized out>, this=<optimized out>, this=<optimized out>, LI=0x0, this=<optimized out>, Reg=<optimized out>) at /usr/src/debug/llvm-3.3/include/llvm/CodeGen/LiveIntervalAnalysis.h:184 #6 llvm::ScheduleDAGInstrs::addVRegUseDeps (this=0x0, SU=0xffffffff, OperIdx=<optimized out>) at /usr/src/debug/llvm-3.3/lib/CodeGen/ScheduleDAGInstrs.cpp:414
#7 0xaac05890 in llvm::ScheduleDAGInstrs::buildSchedGraph (this=0xb9dd2c0, AA=<optimized out>, RPTracker=0x800) at /usr/src/debug/llvm-3.3/lib/CodeGen/ScheduleDAGInstrs.cpp:776
#8 0xaab364dc in llvm::DefaultVLIWScheduler::schedule (this=0xb9dd2c0) at /usr/src/debug/llvm-3.3/lib/CodeGen/DFAPacketizer.cpp:124
#9 0xaab367c9 in llvm::VLIWPacketizerList::PacketizeMIs (this=0xbf8abf58, MBB=<optimized out>, BeginItr=..., EndItr=...) at /usr/src/debug/llvm-3.3/lib/CodeGen/DFAPacketizer.cpp:164
#10 0xab228426 in llvm::R600Packetizer::runOnMachineFunction (this=<optimized out>, Fn=...) at /usr/src/debug/llvm-3.3/lib/Target/R600/R600Packetizer.cpp:444 #11 0xaab98bb5 in llvm::MachineFunctionPass::runOnFunction (this=0xb92d3f8, F=...) at /usr/src/debug/llvm-3.3/lib/CodeGen/MachineFunctionPass.cpp:33 #12 0xaa6d3307 in llvm::FPPassManager::runOnFunction (this=0x16, F=...) at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1530
#13 0xaa6d3530 in llvm::FPPassManager::runOnModule (this=0xb8700b0, M=...) at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1550
#14 0xaa6d37d9 in llvm::MPPassManager::runOnModule (this=0xb919068, M=...) at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1608
#15 0xaa6d3fa1 in llvm::PassManagerImpl::run (this=0xb915bd0, M=...) at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1703
#16 0xaa6d4157 in llvm::PassManager::run (this=0xbf8ac168, M=...) at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1738
#17 0xaa7be651 in LLVMTargetMachineEmit (T=<optimized out>, M=0xb7602a8, OS=..., codegen=<optimized out>, ErrorMessage=<optimized out>) at /usr/src/debug/llvm-3.3/lib/Target/TargetMachineC.cpp:194
#18 0xaa7be7a3 in LLVMTargetMachineEmitToMemoryBuffer (T=0xb913c70, M=0xb7602a8, codegen=LLVMObjectFile, ErrorMessage=0xbf8ac230, OutMemBuf=<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?)

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

[Bug 66331] WebGL water demo crashes LLVM

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=66331

--- Comment #2 from Dieter Nützel <[email protected]> --- (In reply to comment #1)

Quoted 7 lines

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.

Quoted 7 lines

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)"

Hopefully better (with LLVM source) trace run:

Program received signal SIGSEGV, Segmentation fault. llvm::ScheduleDAGInstrs::addVRegUseDeps (this=0x0, SU=0xffffffff, OperIdx=<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 = SU->getInstr();
410 unsigned Reg = MI->getOperand(OperIdx).getReg();
411

412       // Lookup this operand's reaching definition.                         
413       assert(LIS && "vreg dependencies requires LiveIntervals");            
414       LiveRangeQuery LRQ(LIS->getInterval(Reg),

LIS->getInstructionIndex(MI));
415 VNInfo *VNI = LRQ.valueIn();
416
417 // VNI will be valid because MachineOperand::readsReg() is checked by
caller.
418 assert(VNI && "No value to read by operand");
(gdb) info registers

eax            0xad55d20        181755168                                       
ecx            0x0      0                                                       
edx            0x0      0                                                       
ebx            0xad33d000       -1389113344                                     
esp            0xbfff6f40       0xbfff6f40                                      
ebp            0x0      0x0                                                     
esi            0xad441f8        181682680                                       
edi            0xad55d20        181755168                                       
eip            0xad2e747d                                                       
    0xad2e747d <llvm::ScheduleDAGInstrs::addVRegUseDeps(llvm::SUnit*, unsigned
int)+77>             
eflags         0x210246 [ PF ZF IF RF ID ]                                      
cs             0x73     115                                                     
ss             0x7b     123                                                     
ds             0x7b     123                                                     
es             0x7b     123                                                     
fs             0x0      0                                                       
gs             0x33     51                                                      

(gdb) bt
#0 llvm::ScheduleDAGInstrs::addVRegUseDeps (this=0x0, SU=0xffffffff, OperIdx=<optimized out>)
at /usr/src/debug/llvm-3.3/lib/CodeGen/ScheduleDAGInstrs.cpp:414
#1 0xad2e9890 in llvm::ScheduleDAGInstrs::buildSchedGraph (this=0xad55d20, AA=<optimized out>,

    RPTracker=0x700) at
/usr/src/debug/llvm-3.3/lib/CodeGen/ScheduleDAGInstrs.cpp:776               
#2  0xad21a4dc in llvm::DefaultVLIWScheduler::schedule (this=0xad55d20)         
    at /usr/src/debug/llvm-3.3/lib/CodeGen/DFAPacketizer.cpp:124                
#3  0xad21a7c9 in llvm::VLIWPacketizerList::PacketizeMIs (this=0xbfff7368,
MBB=<optimized out>,     
    BeginItr=..., EndItr=...) at
/usr/src/debug/llvm-3.3/lib/CodeGen/DFAPacketizer.cpp:164          
#4  0xad90f426 in llvm::R600Packetizer::runOnMachineFunction (this=<optimized
out>, Fn=...)         
    at /usr/src/debug/llvm-3.3/lib/Target/R600/R600Packetizer.cpp:444           

#5 0xad27cbb5 in llvm::MachineFunctionPass::runOnFunction (this=0xac81dd0, F=...)
at /usr/src/debug/llvm-3.3/lib/CodeGen/MachineFunctionPass.cpp:33
#6 0xacdb7307 in llvm::FPPassManager::runOnFunction (this=0x36, F=...)

    at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1530
#7  0xacdb7530 in llvm::FPPassManager::runOnModule (this=0xaba13d8, M=...)
    at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1550
#8  0xacdb77d9 in llvm::MPPassManager::runOnModule (this=0xac6db08, M=...)
    at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1608
#9  0xacdb7fa1 in llvm::PassManagerImpl::run (this=0xac6a1e0, M=...)
    at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1703
#10 0xacdb8157 in llvm::PassManager::run (this=0xbfff7578, M=...)
    at /usr/src/debug/llvm-3.3/lib/IR/PassManager.cpp:1738

#11 0xacea2651 in LLVMTargetMachineEmit (T=<optimized out>, M=0xaaed0c0, OS=...,
codegen=<optimized out>, ErrorMessage=<optimized out>) at /usr/src/debug/llvm-3.3/lib/Target/TargetMachineC.cpp:194
#12 0xacea27a3 in LLVMTargetMachineEmitToMemoryBuffer (T=0xac68280, M=0xaaed0c0, codegen=

    LLVMObjectFile, ErrorMessage=0xbfff7640, OutMemBuf=<optimized out>)
    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?)

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

[Bug 66331] WebGL water demo crashes LLVM

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=66331

--- Comment #3 from Dieter Nützel <[email protected]> --- Created attachment 87534
--> https://bugs.freedesktop.org/attachment.cgi?id=87534&action=edit
Dump with R600_DEBUG=ps,vs,fs

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw

[Bug 66331] WebGL water demo crashes LLVM

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=66331

--- Comment #4 from vincent <[email protected]> ---
Does it work with llvm 3.4svn ? Here it seems llvm can compile the shader without crashing.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw

[Bug 66331] WebGL water demo crashes LLVM

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=66331

--- Comment #5 from Dieter Nützel <[email protected]> --- Sorry,

I haven't have LLVM SVN on this system.

-Dieter

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw

[Bug 66331] WebGL water demo crashes LLVM

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=66331

--- Comment #6 from Grigori Goronzy <[email protected]> --- It seems to work fine with current LLVM trunk now.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw

[Bug 66331] WebGL water demo crashes LLVM

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=66331

--- Comment #7 from Dieter Nützel <[email protected]> --- Is a backport possible for stable (3.3)?
Couldn't switch all to devel...;-)

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#9 lore raw

[Bug 66331] WebGL water demo crashes LLVM

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=66331

--- Comment #8 from Dieter Nützel <[email protected]> --- 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=nollvm it is fine.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw

[Bug 66331] WebGL water demo crashes LLVM

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=66331

--- Comment #9 from Dieter Nützel <[email protected]> --- Created attachment 93202
--> https://bugs.freedesktop.org/attachment.cgi?id=93202&action=edit
webgl-water.png

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#11 lore raw

[Bug 66331] WebGL water demo crashes LLVM

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=66331

--- Comment #10 from Kertesz Laszlo <[email protected]> --- 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.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#12 lore raw

[Bug 66331] WebGL water demo crashes LLVM

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=66331

Dieter Nützel <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #11 from Dieter Nützel <[email protected]> --- 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.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel