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

Fixes for segfault #674

Closed
csukuangfj opened this issue Nov 11, 2022 · 3 comments
Closed

Fixes for segfault #674

csukuangfj opened this issue Nov 11, 2022 · 3 comments

Comments

@csukuangfj
Copy link
Collaborator

In the last few days, a few people (>3) have encountered the following error after updating their lhotse to the latest version:

Segmentation fault (core dump)

when they try to run one of the python scripts from icefall.

After using

gdb --args python xxx.py

(gdb) run
(gdb) backtrace

They get

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007fff75d00dd1 in google::protobuf::internal::ReflectionOps::FindInitializationErrors(google::protobuf::Message const&, std::string const&, std::vector<std::string, std::allocator<std::string> >*) ()
   from /xxxxxx/lib/python3.8/site-packages/google/protobuf/pyext/_message.cpython-38-x86_64-linux-gnu.so

(gdb) backtrace
#0  0x00007fff75d00dd1 in google::protobuf::internal::ReflectionOps::FindInitializationErrors(google::protobuf::Message const&, std::string const&, std::vector<std::string, std::allocator<std::string> >*) ()
   from /xxxxxx/lib/python3.8/site-packages/google/protobuf/pyext/_message.cpython-38-x86_64-linux-gnu.so
#1  0x00007fff75cf8d05 in google::protobuf::Message::FindInitializationErrors(std::vector<std::string, std::allocator<std::string> >*) const ()
   from /xxxxxx/lib/python3.8/site-packages/google/protobuf/pyext/_message.cpython-38-x86_64-linux-gnu.so

The tensorboard python package introduces the dependency on protobuf and the error is caused by
timpalpant/pypprof#2 (comment)


The fix is to set the following environment variable before running any python scripts:

export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
@csukuangfj
Copy link
Collaborator Author

csukuangfj commented Nov 12, 2022

I suggest that we add

export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python

to prepare.sh of each recipe.

@zhuangweiji
Copy link
Contributor

I suggest that we add

export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python

to prepare.sh of each recipe.

cool! thanks!

@naxingyu
Copy link

It works for Aborted (core dumped) too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants