[llvm-bugs] [Bug 43830] New: lldb crashes when loading Python 3.6 interpreter

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 28 09:42:32 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=43830

            Bug ID: 43830
           Summary: lldb crashes when loading Python 3.6 interpreter
           Product: lldb
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: sguelton at redhat.com
                CC: jdevlieghere at apple.com, llvm-bugs at lists.llvm.org

Reproducer:

$ lldb -o script
(lldb) script
 #0 0x00007f89c6b890ee llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/sguelton/sources/llvm-project/llvm/lib/Support/Unix/Signals.inc:533:22
 #1 0x00007f89c6b89181 PrintStackTraceSignalHandler(void*)
/home/sguelton/sources/llvm-project/llvm/lib/Support/Unix/Signals.inc:594:1
 #2 0x00007f89c6b87323 llvm::sys::RunSignalHandlers()
/home/sguelton/sources/llvm-project/llvm/lib/Support/Signals.cpp:68:20
 #3 0x00007f89c6b88b6a SignalHandler(int)
/home/sguelton/sources/llvm-project/llvm/lib/Support/Unix/Signals.inc:385:1
 #4 0x00007f89c65d3680 __restore_rt (/lib64/libpthread.so.0+0xf680)
 #5 0x00007f89c0fd5cf4 PyModule_GetState
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0xe3cf4)
 #6 0x00007f89a36e0ed9 _init
(/opt/rh/rh-python36/root/usr/lib64/python3.6/lib-dynload/readline.cpython-36m-x86_64-linux-gnu.so+0x3ed9)
 #7 0x00007f89b79acff5 rl_initialize (/lib64/libedit.so.0+0x20ff5)
 #8 0x00007f89a36e168f PyInit_readline
(/opt/rh/rh-python36/root/usr/lib64/python3.6/lib-dynload/readline.cpython-36m-x86_64-linux-gnu.so+0x468f)
 #9 0x00007f89c10c842f _PyImport_LoadDynamicModuleWithSpec
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x1d642f)
#10 0x00007f89c10c7ca4
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x1d5ca4)
#11 0x00007f89c0fd55f7 PyCFunction_Call
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0xe35f7)
#12 0x00007f89c103c9b2 _PyEval_EvalFrameDefault
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14a9b2)
#13 0x00007f89c1040c8c
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14ec8c)
#14 0x00007f89c1041aba
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14faba)
#15 0x00007f89c1041e23
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14fe23)
#16 0x00007f89c10362a7 _PyEval_EvalFrameDefault
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x1442a7)
#17 0x00007f89c1041a0a
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14fa0a)
#18 0x00007f89c1041e23
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14fe23)
#19 0x00007f89c10362a7 _PyEval_EvalFrameDefault
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x1442a7)
#20 0x00007f89c1041a0a
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14fa0a)
#21 0x00007f89c1041e23
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14fe23)
#22 0x00007f89c10362a7 _PyEval_EvalFrameDefault
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x1442a7)
#23 0x00007f89c1041a0a
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14fa0a)
#24 0x00007f89c1041e23
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14fe23)
#25 0x00007f89c10362a7 _PyEval_EvalFrameDefault
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x1442a7)
#26 0x00007f89c1041a0a
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14fa0a)
#27 0x00007f89c1041e23
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14fe23)
#28 0x00007f89c10362a7 _PyEval_EvalFrameDefault
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x1442a7)
#29 0x00007f89c1042f12 _PyFunction_FastCallDict
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x150f12)
#30 0x00007f89c0f980ce _PyObject_FastCallDict
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0xa60ce)
#31 0x00007f89c0f993f4 _PyObject_CallMethodIdObjArgs
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0xa73f4)
#32 0x00007f89c105a28f PyImport_ImportModuleLevelObject
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x16828f)
#33 0x00007f89c1039201 _PyEval_EvalFrameDefault
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x147201)
#34 0x00007f89c1042122 PyEval_EvalCodeEx
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x150122)
#35 0x00007f89c1042dbb PyEval_EvalCode
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x150dbb)
#36 0x00007f89c10352cb
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x1432cb)
#37 0x00007f89c0fd55f7 PyCFunction_Call
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0xe35f7)
#38 0x00007f89c103c9b2 _PyEval_EvalFrameDefault
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14a9b2)
#39 0x00007f89c1040c8c
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14ec8c)
#40 0x00007f89c1041aba
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14faba)
#41 0x00007f89c1041e23
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14fe23)
#42 0x00007f89c10362a7 _PyEval_EvalFrameDefault
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x1442a7)
#43 0x00007f89c1041a0a
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14fa0a)
#44 0x00007f89c1041e23
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14fe23)
#45 0x00007f89c10362a7 _PyEval_EvalFrameDefault
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x1442a7)
#46 0x00007f89c1041a0a
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14fa0a)
#47 0x00007f89c1041e23
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14fe23)
#48 0x00007f89c10362a7 _PyEval_EvalFrameDefault
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x1442a7)
#49 0x00007f89c1041a0a
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14fa0a)
#50 0x00007f89c1041e23
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x14fe23)
#51 0x00007f89c10362a7 _PyEval_EvalFrameDefault
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x1442a7)
#52 0x00007f89c1042f12 _PyFunction_FastCallDict
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x150f12)
#53 0x00007f89c0f980ce _PyObject_FastCallDict
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0xa60ce)
#54 0x00007f89c0f993f4 _PyObject_CallMethodIdObjArgs
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0xa73f4)
#55 0x00007f89c105a28f PyImport_ImportModuleLevelObject
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x16828f)
#56 0x00007f89c1039201 _PyEval_EvalFrameDefault
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x147201)
#57 0x00007f89c1042122 PyEval_EvalCodeEx
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x150122)
#58 0x00007f89c1042dbb PyEval_EvalCode
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x150dbb)
#59 0x00007f89c10cb97e
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x1d997e)
#60 0x00007f89c10cbff2 PyRun_StringFlags
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x1d9ff2)
#61 0x00007f89c0f7777e PyRun_SimpleStringFlags
(/opt/rh/rh-python36/root/usr/lib64/libpython3.6m.so.rh-python36-1.0+0x8577e)
#62 0x00007f89c5581605
lldb_private::ScriptInterpreterPythonImpl::InitializePrivate()
/home/sguelton/sources/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:3201:24
#63 0x00007f89c55775f1
lldb_private::ScriptInterpreterPythonImpl::ScriptInterpreterPythonImpl(lldb_private::Debugger&)
/home/sguelton/sources/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:456:35
#64 0x00007f89c5584dec void
__gnu_cxx::new_allocator<lldb_private::ScriptInterpreterPythonImpl>::construct<lldb_private::ScriptInterpreterPythonImpl,
lldb_private::Debugger&>(lldb_private::ScriptInterpreterPythonImpl*,
lldb_private::Debugger&)
/opt/rh/devtoolset-8/root/usr/include/c++/8/ext/new_allocator.h:136:60
#65 0x00007f89c55849fa void
std::allocator_traits<std::allocator<lldb_private::ScriptInterpreterPythonImpl>
>::construct<lldb_private::ScriptInterpreterPythonImpl,
lldb_private::Debugger&>(std::allocator<lldb_private::ScriptInterpreterPythonImpl>&,
lldb_private::ScriptInterpreterPythonImpl*, lldb_private::Debugger&)
/opt/rh/devtoolset-8/root/usr/include/c++/8/bits/alloc_traits.h:475:56
#66 0x00007f89c5584463
std::_Sp_counted_ptr_inplace<lldb_private::ScriptInterpreterPythonImpl,
std::allocator<lldb_private::ScriptInterpreterPythonImpl>,
(__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<lldb_private::Debugger&>(std::allocator<lldb_private::ScriptInterpreterPythonImpl>,
lldb_private::Debugger&)
/opt/rh/devtoolset-8/root/usr/include/c++/8/bits/shared_ptr_base.h:545:2
#67 0x00007f89c5583c2a
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<lldb_private::ScriptInterpreterPythonImpl,
std::allocator<lldb_private::ScriptInterpreterPythonImpl>,
lldb_private::Debugger&>(std::_Sp_make_shared_tag,
lldb_private::ScriptInterpreterPythonImpl*,
std::allocator<lldb_private::ScriptInterpreterPythonImpl> const&,
lldb_private::Debugger&)
/opt/rh/devtoolset-8/root/usr/include/c++/8/bits/shared_ptr_base.h:656:4
#68 0x00007f89c5583684
std::__shared_ptr<lldb_private::ScriptInterpreterPythonImpl,
(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<lldb_private::ScriptInterpreterPythonImpl>,
lldb_private::Debugger&>(std::_Sp_make_shared_tag,
std::allocator<lldb_private::ScriptInterpreterPythonImpl> const&,
lldb_private::Debugger&)
/opt/rh/devtoolset-8/root/usr/include/c++/8/bits/shared_ptr_base.h:1329:10
#69 0x00007f89c55831ff
std::shared_ptr<lldb_private::ScriptInterpreterPythonImpl>::shared_ptr<std::allocator<lldb_private::ScriptInterpreterPythonImpl>,
lldb_private::Debugger&>(std::_Sp_make_shared_tag,
std::allocator<lldb_private::ScriptInterpreterPythonImpl> const&,
lldb_private::Debugger&)
/opt/rh/devtoolset-8/root/usr/include/c++/8/bits/shared_ptr.h:361:4
#70 0x00007f89c5582cf3
std::shared_ptr<lldb_private::ScriptInterpreterPythonImpl>
std::allocate_shared<lldb_private::ScriptInterpreterPythonImpl,
std::allocator<lldb_private::ScriptInterpreterPythonImpl>,
lldb_private::Debugger&>(std::allocator<lldb_private::ScriptInterpreterPythonImpl>
const&, lldb_private::Debugger&)
/opt/rh/devtoolset-8/root/usr/include/c++/8/bits/shared_ptr.h:708:5
#71 0x00007f89c55826c8
std::shared_ptr<lldb_private::ScriptInterpreterPythonImpl>
std::make_shared<lldb_private::ScriptInterpreterPythonImpl,
lldb_private::Debugger&>(lldb_private::Debugger&)
/opt/rh/devtoolset-8/root/usr/include/c++/8/bits/shared_ptr.h:723:42
#72 0x00007f89c5577fcf
lldb_private::ScriptInterpreterPythonImpl::CreateInstance(lldb_private::Debugger&)
/home/sguelton/sources/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:609:64
#73 0x00007f89c4e2e147
lldb_private::PluginManager::GetScriptInterpreterForLanguage(lldb::ScriptLanguage,
lldb_private::Debugger&)
/home/sguelton/sources/llvm-project/lldb/source/Core/PluginManager.cpp:1544:43
#74 0x00007f89c4dc2721 lldb_private::Debugger::GetScriptInterpreter(bool)
/home/sguelton/sources/llvm-project/lldb/source/Core/Debugger.cpp:1303:35
#75 0x00007f89c4f2b7bd
lldb_private::CommandObjectScript::DoExecute(llvm::StringRef,
lldb_private::CommandReturnObject&)
/home/sguelton/sources/llvm-project/lldb/source/Interpreter/CommandObjectScript.cpp:53:77
#76 0x00007f89c4f2825a lldb_private::CommandObjectRaw::Execute(char const*,
lldb_private::CommandReturnObject&)
/home/sguelton/sources/llvm-project/lldb/source/Interpreter/CommandObject.cpp:994:26
#77 0x00007f89c4f14b4d lldb_private::CommandInterpreter::HandleCommand(char
const*, lldb_private::LazyBool, lldb_private::CommandReturnObject&,
lldb_private::ExecutionContext*, bool, bool)
/home/sguelton/sources/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:1764:17
#78 0x00007f89c4f19055
lldb_private::CommandInterpreter::IOHandlerInputComplete(lldb_private::IOHandler&,
std::string&)
/home/sguelton/sources/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:2828:16
#79 0x00007f89c4df6fdf lldb_private::IOHandlerEditline::Run()
/home/sguelton/sources/llvm-project/lldb/source/Core/IOHandler.cpp:577:44
#80 0x00007f89c4dc12cb lldb_private::Debugger::ExecuteIOHandlers()
/home/sguelton/sources/llvm-project/lldb/source/Core/Debugger.cpp:999:60
#81 0x00007f89c4f19d0e
lldb_private::CommandInterpreter::RunCommandInterpreter(bool, bool,
lldb_private::CommandInterpreterRunOptions&)
/home/sguelton/sources/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:3041:5
#82 0x00007f89c492fd76 lldb::SBDebugger::RunCommandInterpreter(bool, bool,
lldb::SBCommandInterpreterRunOptions&, int&, bool&, bool&)
/home/sguelton/sources/llvm-project/lldb/source/API/SBDebugger.cpp:1125:37
#83 0x0000000000407a8b Driver::MainLoop()
/home/sguelton/sources/llvm-project/lldb/tools/driver/Driver.cpp:620:39
#84 0x0000000000408759 main
/home/sguelton/sources/llvm-project/lldb/tools/driver/Driver.cpp:889:34
#85 0x00007f89c3aef3d5 __libc_start_main (/lib64/libc.so.6+0x223d5)
#86 0x0000000000405829 _start
(/home/sguelton/sources/llvm-project/_build-lldb/bin/lldb+0x405829)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191028/dfcb89b4/attachment-0001.html>


More information about the llvm-bugs mailing list