Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [OpenGL] with_opengl crashed with segfault after upgrading #1325

Closed
archibate opened this issue Jun 25, 2020 · 4 comments · Fixed by #1326
Closed

[Bug] [OpenGL] with_opengl crashed with segfault after upgrading #1325

archibate opened this issue Jun 25, 2020 · 4 comments · Fixed by #1326
Assignees
Labels
opengl OpenGL backend potential bug Something that looks like a bug but not yet confirmed

Comments

@archibate
Copy link
Collaborator

Describe the bug
I've just upgraded my Arch Linux to latest GL packages and reboot, and got the following error:

Log/Screenshots

(ipython-display) [bate@archit taichi]$ p examples/mpm128.py 
[Taichi] mode=development
[Taichi] preparing sandbox at /tmp/taichi-i2b0m14i
[Taichi] <dev mode>, llvm 8.0.1, commit b4c63e28, python 3.8.3
python: /home/bate/Downloads/qq-files/1931127624/file_recv/llvm-8.0.1.src/lib/Support/CommandLine.cpp:278: void {anonymous}::CommandLineParser::registerCategory(llvm::cl::OptionCategory*): Assertion `count_if(RegisteredOptionCategories, [cat](const OptionCategory *Category) { return cat->getName() == Category->getName(); }) == 0 && "Duplicate option categories"' failed.
[E 06/25/20 14:28:27.279] Received signal 6 (Aborted)


***********************************
* Taichi Compiler Stack Traceback *                                                          
***********************************                                                          
/tmp/taichi-i2b0m14i/taichi_core.so: taichi::Logger::error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)                                  
/tmp/taichi-i2b0m14i/taichi_core.so: taichi::signal_handler(int)                             
/usr/lib/libc.so.6(+0x3c3e0) [0x7fc0019b83e0]                                                
/usr/lib/libc.so.6: gsignal                                                                  
/usr/lib/libc.so.6: abort                                                                    
/usr/lib/libc.so.6(+0x25727) [0x7fc0019a1727]
/usr/lib/libc.so.6(+0x34936) [0x7fc0019b0936]
/tmp/taichi-i2b0m14i/taichi_core.so: llvm::cl::OptionCategory::registerCategory()
/usr/lib/libLLVM-10.so(+0x807f37) [0x7fbfe9846f37]
/lib64/ld-linux-x86-64.so.2(+0x110f2) [0x7fc001f450f2]
/lib64/ld-linux-x86-64.so.2(+0x11201) [0x7fc001f45201]
/usr/lib/libc.so.6: _dl_catch_exception
/lib64/ld-linux-x86-64.so.2(+0x1549c) [0x7fc001f4949c]
/usr/lib/libc.so.6: _dl_catch_exception
/lib64/ld-linux-x86-64.so.2(+0x149be) [0x7fc001f489be]
/usr/lib/libdl.so.2(+0x134c) [0x7fc00195534c]
/usr/lib/libc.so.6: _dl_catch_exception
/usr/lib/libc.so.6: _dl_catch_error
/usr/lib/libdl.so.2(+0x1b89) [0x7fc001955b89]
/usr/lib/libdl.so.2: dlopen
/usr/lib/libGLX_mesa.so.0(+0x56990) [0x7fbfefca5990]
/usr/lib/libGLX_mesa.so.0(+0x4c990) [0x7fbfefc9b990]
/usr/lib/libGLX_mesa.so.0(+0x356e9) [0x7fbfefc846e9]
/usr/lib/libGLX_mesa.so.0(+0x364ee) [0x7fbfefc854ee]
/tmp/taichi-i2b0m14i/taichi_core.so: _glfwInitGLX
/tmp/taichi-i2b0m14i/taichi_core.so: _glfwPlatformCreateWindow
/tmp/taichi-i2b0m14i/taichi_core.so: glfwCreateWindow
/tmp/taichi-i2b0m14i/taichi_core.so: taichi::lang::opengl::initialize_opengl(bool)
/tmp/taichi-i2b0m14i/taichi_core.so: taichi::lang::opengl::is_opengl_api_available()
/tmp/taichi-i2b0m14i/taichi_core.so(+0x842c07) [0x7fbff1e0bc07]
/tmp/taichi-i2b0m14i/taichi_core.so(+0x730850) [0x7fbff1cf9850]
/usr/lib/libpython3.8.so.1.0: PyCFunction_Call
/usr/lib/libpython3.8.so.1.0: _PyObject_MakeTpCall
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalCodeWithName
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalCodeWithName
/usr/lib/libpython3.8.so.1.0: PyEval_EvalCode
/usr/lib/libpython3.8.so.1.0(+0x1d8248) [0x7fc001d1b248]
/usr/lib/libpython3.8.so.1.0(+0x1d2483) [0x7fc001d15483]
/usr/lib/libpython3.8.so.1.0: PyRun_FileExFlags
/usr/lib/libpython3.8.so.1.0: PyRun_SimpleFileExFlags
/usr/lib/libpython3.8.so.1.0: Py_RunMain
/usr/lib/libpython3.8.so.1.0: Py_BytesMain
/usr/lib/libc.so.6: __libc_start_main
python(_start+0x2e) [0x55c52997104e]

Internal Error occurred, check this page for possible solutions:
https://taichi.readthedocs.io/en/stable/install.html#troubleshooting
[bate@archit ~]$ ti
[Taichi] mode=release
python: /home/yuanming/repos/llvm-8.0.1/lib/Support/CommandLine.cpp:282: void (anonymous namespace)::CommandLineParser::registerCategory(llvm::cl::OptionCategory *): Assertion `count_if(RegisteredOptionCategories, [cat](const OptionCategory *Category) { return cat->getName() == Category->getName(); }) == 0 && "Duplicate option categories"' failed.
[E 06/25/20 14:30:31.569] Received signal 6 (Aborted)


***********************************
* Taichi Compiler Stack Traceback *
***********************************
/home/bate/.local/lib/python3.8/site-packages/taichi/core/../lib/taichi_core.so: taichi::Logger::error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)
/home/bate/.local/lib/python3.8/site-packages/taichi/core/../lib/taichi_core.so: taichi::signal_handler(int)
/usr/lib/libc.so.6(+0x3c3e0) [0x7f574b0233e0]
/usr/lib/libc.so.6: gsignal
/usr/lib/libc.so.6: abort
/usr/lib/libc.so.6(+0x25727) [0x7f574b00c727]
/usr/lib/libc.so.6(+0x34936) [0x7f574b01b936]
/home/bate/.local/lib/python3.8/site-packages/taichi/core/../lib/taichi_core.so(+0xe36b09) [0x7f573b6aab09]
/usr/lib/libLLVM-10.so(+0x807f37) [0x7f5732b98f37]
/lib64/ld-linux-x86-64.so.2(+0x110f2) [0x7f574b5b00f2]
/lib64/ld-linux-x86-64.so.2(+0x11201) [0x7f574b5b0201]
/usr/lib/libc.so.6: _dl_catch_exception
/lib64/ld-linux-x86-64.so.2(+0x1549c) [0x7f574b5b449c]
/usr/lib/libc.so.6: _dl_catch_exception
/lib64/ld-linux-x86-64.so.2(+0x149be) [0x7f574b5b39be]
/usr/lib/libdl.so.2(+0x134c) [0x7f574afc034c]
/usr/lib/libc.so.6: _dl_catch_exception
/usr/lib/libc.so.6: _dl_catch_error
/usr/lib/libdl.so.2(+0x1b89) [0x7f574afc0b89]
/usr/lib/libdl.so.2: dlopen
/usr/lib/libGLX_mesa.so.0(+0x56990) [0x7f5738ff7990]
/usr/lib/libGLX_mesa.so.0(+0x4c990) [0x7f5738fed990]
/usr/lib/libGLX_mesa.so.0(+0x356e9) [0x7f5738fd66e9]
/usr/lib/libGLX_mesa.so.0(+0x364ee) [0x7f5738fd74ee]
/home/bate/.local/lib/python3.8/site-packages/taichi/core/../lib/taichi_core.so: _glfwInitGLX
/home/bate/.local/lib/python3.8/site-packages/taichi/core/../lib/taichi_core.so: _glfwPlatformCreateWindow
/home/bate/.local/lib/python3.8/site-packages/taichi/core/../lib/taichi_core.so: glfwCreateWindow
/home/bate/.local/lib/python3.8/site-packages/taichi/core/../lib/taichi_core.so: taichi::lang::opengl::initialize_opengl(bool)
/home/bate/.local/lib/python3.8/site-packages/taichi/core/../lib/taichi_core.so: taichi::lang::opengl::is_opengl_api_available()
/home/bate/.local/lib/python3.8/site-packages/taichi/core/../lib/taichi_core.so(+0x7faf67) [0x7f573b06ef67]
/home/bate/.local/lib/python3.8/site-packages/taichi/core/../lib/taichi_core.so(+0x6e5d70) [0x7f573af59d70]
/usr/lib/libpython3.8.so.1.0: PyCFunction_Call                                               
/usr/lib/libpython3.8.so.1.0: _PyObject_MakeTpCall                                           
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault                                       
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall                                         
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault                                       
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalCodeWithName                                       
/usr/lib/libpython3.8.so.1.0: PyEval_EvalCode                                                
/usr/lib/libpython3.8.so.1.0(+0x1d1e0d) [0x7f574b37fe0d]                                     
/usr/lib/libpython3.8.so.1.0(+0x12f098) [0x7f574b2dd098]                                     
/usr/lib/libpython3.8.so.1.0: PyVectorcall_Call                                              
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault                                       
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalCodeWithName                                       
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall                                         
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault                                       
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall                                         
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault                                       
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall                                         
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault                                       
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall                                         
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault                                       
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall                                         
/usr/lib/libpython3.8.so.1.0(+0x12e02f) [0x7f574b2dc02f]                                     
/usr/lib/libpython3.8.so.1.0: _PyObject_CallMethodIdObjArgs                                  
/usr/lib/libpython3.8.so.1.0: PyImport_ImportModuleLevelObject                               
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault                                       
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalCodeWithName                                       
/usr/lib/libpython3.8.so.1.0: PyEval_EvalCode                                                
/usr/lib/libpython3.8.so.1.0(+0x1d1e0d) [0x7f574b37fe0d]                                     
/usr/lib/libpython3.8.so.1.0(+0x12f098) [0x7f574b2dd098]                                     
/usr/lib/libpython3.8.so.1.0: PyVectorcall_Call                                              
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault                                       
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalCodeWithName                                       
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall                                         
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault                                       
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall                                         
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault                                       
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall                                         
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault                                       
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall
/usr/lib/libpython3.8.so.1.0(+0x12e02f) [0x7f574b2dc02f]
/usr/lib/libpython3.8.so.1.0: _PyObject_CallMethodIdObjArgs
/usr/lib/libpython3.8.so.1.0: PyImport_ImportModuleLevelObject
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalCodeWithName
/usr/lib/libpython3.8.so.1.0: PyEval_EvalCode
/usr/lib/libpython3.8.so.1.0(+0x1d1e0d) [0x7f574b37fe0d]
/usr/lib/libpython3.8.so.1.0(+0x12f098) [0x7f574b2dd098]
/usr/lib/libpython3.8.so.1.0: PyVectorcall_Call
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalCodeWithName
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall
/usr/lib/libpython3.8.so.1.0(+0x12e02f) [0x7f574b2dc02f]
/usr/lib/libpython3.8.so.1.0: _PyObject_CallMethodIdObjArgs
/usr/lib/libpython3.8.so.1.0: PyImport_ImportModuleLevelObject
/usr/lib/libpython3.8.so.1.0(+0x165b18) [0x7f574b313b18]
/usr/lib/libpython3.8.so.1.0: PyCFunction_Call
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalCodeWithName
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall
/usr/lib/libpython3.8.so.1.0(+0x12e02f) [0x7f574b2dc02f]
/usr/lib/libpython3.8.so.1.0: _PyObject_CallMethodIdObjArgs
/usr/lib/libpython3.8.so.1.0: PyImport_ImportModuleLevelObject
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalCodeWithName
/usr/lib/libpython3.8.so.1.0: PyEval_EvalCode
/usr/lib/libpython3.8.so.1.0(+0x1d8248) [0x7f574b386248]
/usr/lib/libpython3.8.so.1.0(+0x1d2483) [0x7f574b380483]
/usr/lib/libpython3.8.so.1.0: PyRun_FileExFlags
/usr/lib/libpython3.8.so.1.0: PyRun_SimpleFileExFlags
/usr/lib/libpython3.8.so.1.0: Py_RunMain
/usr/lib/libpython3.8.so.1.0: Py_BytesMain
/usr/lib/libc.so.6: __libc_start_main
/usr/bin/python: _start

Internal Error occurred, check this page for possible solutions:
https://taichi.readthedocs.io/en/stable/install.html#troubleshooting

To Reproduce
Run python examples/mpm128.py with latest Arch Linux.

If you have local commits (e.g. compile fixes before you reproduce the bug), please make sure you first make a PR to fix the build errors and then report the bug.
I know this could be solved by TI_ENABLE_OPENGL=0, but how could you ban OpenGL author from use OpenGL..
Not sure if all latest GLX break Taichi like this, so we should systematically inspect this BUG now.

@archibate archibate added potential bug Something that looks like a bug but not yet confirmed opengl OpenGL backend labels Jun 25, 2020
@archibate archibate self-assigned this Jun 25, 2020
@archibate
Copy link
Collaborator Author

(master) [bate@archit glsl_taichi]$ glxinfo | grep OpenGL
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 530 (SKL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.1.1
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.1.1
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.1.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
(master) [bate@archit glsl_taichi]$ sudo pacman -Su
:: 正在进行全面系统更新...
 今日无事可做

May be related to #1106.

@archibate
Copy link
Collaborator Author

archibate commented Jun 25, 2020

Guess what? Deleting /lib/libLLVM-10.so solve my problem:

(ipython-display) [bate@archit taichi]$ aop examples/minimal.py 
[Taichi] mode=development
[Taichi] preparing sandbox at /tmp/taichi-uiv83ua0
[Taichi] <dev mode>, llvm 8.0.1, commit b4c63e28, python 3.8.3
[I 06/25/20 17:24:10.594] [examples/minimal.py:<module>@3] Following TI_ARCH setting up for arch=opengl
python: /home/bate/Downloads/qq-files/1931127624/file_recv/llvm-8.0.1.src/lib/Support/CommandLine.cpp:278: void {anonymous}::CommandLineParser::registerCategory(llvm::cl::OptionCategory*): Assertion `count_if(RegisteredOptionCategories, [cat](const OptionCategory *Category) { return cat->getName() == Category->getName(); }) == 0 && "Duplicate option categories"' failed.
[E 06/25/20 17:24:10.648] Received signal 6 (Aborted)


***********************************
* Taichi Compiler Stack Traceback *                                                                                                                                                          
***********************************                                                                                                                                                          
/tmp/taichi-uiv83ua0/taichi_core.so: taichi::Logger::error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)                                     
/tmp/taichi-uiv83ua0/taichi_core.so: taichi::signal_handler(int)                                                                                                                             
/usr/lib/libc.so.6(+0x3c3e0) [0x7f00fc9a53e0]                                                                                                                                                
/usr/lib/libc.so.6: gsignal                                                                                                                                                                  
/usr/lib/libc.so.6: abort                                                                                                                                                                    
/usr/lib/libc.so.6(+0x25727) [0x7f00fc98e727]                                                                                                                                                
/usr/lib/libc.so.6(+0x34936) [0x7f00fc99d936]                                                                                                                                                
/tmp/taichi-uiv83ua0/taichi_core.so: llvm::cl::OptionCategory::registerCategory()                                                                                                            
/usr/lib/libLLVM-10.so(+0x807f37) [0x7f00e24c2f37]                                                                                                                                           
/lib64/ld-linux-x86-64.so.2(+0x110f2) [0x7f00fcfc20f2]                                                                                                                                       
/lib64/ld-linux-x86-64.so.2(+0x11201) [0x7f00fcfc2201]                                                                                                                                       
/usr/lib/libc.so.6: _dl_catch_exception                                                                                                                                                      
/lib64/ld-linux-x86-64.so.2(+0x1549c) [0x7f00fcfc649c]                                                                                                                                       
/usr/lib/libc.so.6: _dl_catch_exception                                                                                                                                                      
/lib64/ld-linux-x86-64.so.2(+0x149be) [0x7f00fcfc59be]                                                                                                                                       
/usr/lib/libdl.so.2(+0x134c) [0x7f00fc96434c]                                                                                                                                                
/usr/lib/libc.so.6: _dl_catch_exception                                                                                                                                                      
/usr/lib/libc.so.6: _dl_catch_error                                                                                                                                                          
/usr/lib/libdl.so.2(+0x1b89) [0x7f00fc964b89]                                                                                                                                                
/usr/lib/libdl.so.2: dlopen                                                                                                                                                                  
/usr/lib/libdlfaker.so: dlopen                                                                                                                                                               
/usr/lib/libGLX_mesa.so.0(+0x56990) [0x7f00e8921990]                                                                                                                                         
/usr/lib/libGLX_mesa.so.0(+0x4c990) [0x7f00e8917990]                                                                                                                                         
/usr/lib/libGLX_mesa.so.0(+0x356e9) [0x7f00e89006e9]                                                                                                                                         
/usr/lib/libGLX_mesa.so.0(+0x36034) [0x7f00e8901034]                                                                                                                                         
/usr/lib/libGLX_mesa.so.0(+0x360f2) [0x7f00e89010f2]                                                                                                                                         
/usr/lib/libvglfaker.so(+0x72635) [0x7f00fcf30635]
/usr/lib/libvglfaker.so(+0x73cf2) [0x7f00fcf31cf2]
/usr/lib/libvglfaker.so(+0x32ab8) [0x7f00fcef0ab8]
/usr/lib/libvglfaker.so: glXGetFBConfigAttrib
/tmp/taichi-uiv83ua0/taichi_core.so(+0xa43b52) [0x7f00ecc0ab52]
/tmp/taichi-uiv83ua0/taichi_core.so: _glfwChooseVisualGLX
/tmp/taichi-uiv83ua0/taichi_core.so: _glfwPlatformCreateWindow
/tmp/taichi-uiv83ua0/taichi_core.so: glfwCreateWindow
/tmp/taichi-uiv83ua0/taichi_core.so: taichi::lang::opengl::initialize_opengl(bool)
/tmp/taichi-uiv83ua0/taichi_core.so: taichi::lang::opengl::is_opengl_api_available()
/tmp/taichi-uiv83ua0/taichi_core.so(+0x8416d7) [0x7f00eca086d7]
/tmp/taichi-uiv83ua0/taichi_core.so(+0x72f320) [0x7f00ec8f6320]
/usr/lib/libpython3.8.so.1.0: PyCFunction_Call
/usr/lib/libpython3.8.so.1.0: _PyObject_MakeTpCall
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalCodeWithName
/usr/lib/libpython3.8.so.1.0: _PyFunction_Vectorcall
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalFrameDefault
/usr/lib/libpython3.8.so.1.0: _PyEval_EvalCodeWithName
/usr/lib/libpython3.8.so.1.0: PyEval_EvalCode
/usr/lib/libpython3.8.so.1.0(+0x1d8248) [0x7f00fcd08248]
/usr/lib/libpython3.8.so.1.0(+0x1d2483) [0x7f00fcd02483]
/usr/lib/libpython3.8.so.1.0: PyRun_FileExFlags
/usr/lib/libpython3.8.so.1.0: PyRun_SimpleFileExFlags
/usr/lib/libpython3.8.so.1.0: Py_RunMain
/usr/lib/libpython3.8.so.1.0: Py_BytesMain
/usr/lib/libc.so.6: __libc_start_main
python(_start+0x2e) [0x55e0e5e4604e]

Internal Error occurred, check this page for possible solutions:
https://taichi.readthedocs.io/en/stable/install.html#troubleshooting
(ipython-display) [bate@archit taichi]$ sudo mv /lib/libLLVM-10.so ./old
(ipython-display) [bate@archit taichi]$ ap examples/minimal.py 
[Taichi] mode=development
[Taichi] preparing sandbox at /tmp/taichi-a4cg351d
[Taichi] <dev mode>, llvm 8.0.1, commit b4c63e28, python 3.8.3
[I 06/25/20 17:59:16.230] [examples/minimal.py:<module>@3] Following TI_ARCH setting up for arch=opengl
libGL error: MESA-LOADER: failed to open iris (search paths /usr/lib/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris (search paths /usr/lib/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast (search paths /usr/lib/dri)
libGL error: failed to load driver: swrast
[W 06/25/20 17:59:16.261] [/home/bate/Develop/taichi/python/taichi/lang/__init__.py:init@171] Arch=Arch.opengl is not supported, falling back to CPU
[Taichi] Starting on arch=x64
42
(ipython-display) [bate@archit taichi]$ 

Why does GLFW load LLVM???

@archibate
Copy link
Collaborator Author

archibate commented Jun 25, 2020

One thing common among #958 #1100 #1106 #1113:
They're all trying to load shared object /lib/libLLVM-9.so, which conflicts with our statically linked LLVM-8.

Also note that they all calling into a function called llvm::cl::OptionCategory::registerCategory().
@yuanming-hu Can we disable this by some LLVM cmake configs?

@archibate
Copy link
Collaborator Author

Trying to run glxgears:

(ipython-display) [bate@archit taichi]$ glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
(ipython-display) [bate@archit taichi]$ sudo mv /lib/libLLVM-10.so old
(ipython-display) [bate@archit taichi]$ glxgears
libGL error: MESA-LOADER: failed to open iris (search paths /usr/lib/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris (search paths /usr/lib/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast (search paths /usr/lib/dri)
libGL error: failed to load driver: swrast
X Error of failed request:  GLXBadContext
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  6 (X_GLXIsDirect)
  Serial number of failed request:  46
  Current serial number in output stream:  45

Seems GLX is depend on LLVM-10?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
opengl OpenGL backend potential bug Something that looks like a bug but not yet confirmed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant