SIGSEGV 在做 "import cppyy"
SIGSEGV on doing "import cppyy"
我有一个 docker 图像,其中 cppyy 导入开始崩溃。我尝试比较 pip freeze
和 apt list --installed
工作和非工作 docker 图像之间的输出,但没有发现差异。
仍然处于非工作状态 docker,导入 cppyy 导致 SIGSEGV。
python -c "import cppyy"
结果如下堆栈跟踪:
0x00007ff5fea9f6fd in Cppyy::IsEnum(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at /tmp/pip-install-fnbk157s/cppyy-backend_25a6e780aa5148f0b795ce9be8955f8f/src/clingwrapper.cxx:992 (discriminator 1) from /root/.local/lib/python3.8/site-packages/cppyy_backend/lib/libcppyy_backend.so
0x00007ff5feaa73e0 in Cppyy::ResolveName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at /tmp/pip-install-fnbk157s/cppyy-backend_25a6e780aa5148f0b795ce9be8955f8f/src/clingwrapper.cxx:392 from /root/.local/lib/python3.8/site-packages/cppyy_backend/lib/libcppyy_backend.so
0x00007ff5feaa7c15 in Cppyy::GetScope(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at /usr/include/c++/9/bits/basic_string.h:6151 from /root/.local/lib/python3.8/site-packages/cppyy_backend/lib/libcppyy_backend.so
0x00007ff5fcb44e22 in CPyCppyy::CreateScopeProxy(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, _object*, unsigned int) at /tmp/pip-install-fnbk157s/cpycppyy_e0cc3a6d83714b2aa9d7ba41e49f3748/src/ProxyWrappers.cxx:550 (discriminator 10) from /root/.local/lib/python3.8/site-packages/libcppyy.cpython-38-x86_64-linux-gnu.so
0x00007ff5fcb0ae6c in <unknown> from /root/.local/lib/python3.8/site-packages/libcppyy.cpython-38-x86_64-linux-gnu.so
任何调试的指针?
你可以看看我在 GitHub https://github.com/wlav/cppyy/issues/42
上打开的问题
这是一个解决方法
$ python -m pip install cppyy-cling==6.25.2
$ python -m pip install cppyy-backend==1.14.7 --no-cache-dir --no-use-pep517
$ python -m pip install cppyy==2.2.0
2.3.0 版本已解决此问题
我有一个 docker 图像,其中 cppyy 导入开始崩溃。我尝试比较 pip freeze
和 apt list --installed
工作和非工作 docker 图像之间的输出,但没有发现差异。
仍然处于非工作状态 docker,导入 cppyy 导致 SIGSEGV。
python -c "import cppyy"
结果如下堆栈跟踪:
0x00007ff5fea9f6fd in Cppyy::IsEnum(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at /tmp/pip-install-fnbk157s/cppyy-backend_25a6e780aa5148f0b795ce9be8955f8f/src/clingwrapper.cxx:992 (discriminator 1) from /root/.local/lib/python3.8/site-packages/cppyy_backend/lib/libcppyy_backend.so
0x00007ff5feaa73e0 in Cppyy::ResolveName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at /tmp/pip-install-fnbk157s/cppyy-backend_25a6e780aa5148f0b795ce9be8955f8f/src/clingwrapper.cxx:392 from /root/.local/lib/python3.8/site-packages/cppyy_backend/lib/libcppyy_backend.so
0x00007ff5feaa7c15 in Cppyy::GetScope(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at /usr/include/c++/9/bits/basic_string.h:6151 from /root/.local/lib/python3.8/site-packages/cppyy_backend/lib/libcppyy_backend.so
0x00007ff5fcb44e22 in CPyCppyy::CreateScopeProxy(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, _object*, unsigned int) at /tmp/pip-install-fnbk157s/cpycppyy_e0cc3a6d83714b2aa9d7ba41e49f3748/src/ProxyWrappers.cxx:550 (discriminator 10) from /root/.local/lib/python3.8/site-packages/libcppyy.cpython-38-x86_64-linux-gnu.so
0x00007ff5fcb0ae6c in <unknown> from /root/.local/lib/python3.8/site-packages/libcppyy.cpython-38-x86_64-linux-gnu.so
任何调试的指针?
你可以看看我在 GitHub https://github.com/wlav/cppyy/issues/42
上打开的问题这是一个解决方法
$ python -m pip install cppyy-cling==6.25.2
$ python -m pip install cppyy-backend==1.14.7 --no-cache-dir --no-use-pep517
$ python -m pip install cppyy==2.2.0
2.3.0 版本已解决此问题