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

Weird SIGSEGV in protobuf import #7931

Closed
snehasinha13 opened this issue Sep 30, 2020 · 2 comments
Closed

Weird SIGSEGV in protobuf import #7931

snehasinha13 opened this issue Sep 30, 2020 · 2 comments
Assignees
Labels
inactive Denotes the issue/PR has not seen activity in the last 90 days. python

Comments

@snehasinha13
Copy link

snehasinha13 commented Sep 30, 2020

Protobuf version - 3.7.1

int main() {
auto scopedInterpreter = std::make_uniquepy::scoped_interpreter();
....
char* argv[] = {NULL, NULL};
PySys_SetArgvEx(0, argv, 0);
....
py::module proto = py::module::import("node_generator_protos.proto.launch_graph_pb2"); ====> Crashes with SIGSEGV
std::cerr << "imported proto" << std::endl;
return 0;
}

This program crashes if the C++ code also uses protobuf and its linked against protobuf shared libraries, otherwise the program runs fine.

This is stack trace that I see doing the import.
Signal: SIGSEGV 11
Timestamp: 1601481987
Local time and date: 2020-09-30 09:06:27
#0 0x7f0ab8c8788f ?? in ??:0
from object /lib/x86_64-linux-gnu/libpthread-2.27.so
#1 0x7f0a91e715a1 __strlen_avx2 in ../sysdeps/x86_64/multiarch/strlen-avx2.S:62
from object /lib/x86_64-linux-gnu/libc-2.27.so
#2 0x7f0a92d0550f PyString_FromString in ??:0
from object /opt/cruise-sysroot-1b2d6a0/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#3 0x7f0a92cca5d3 PyDict_SetItemString in ??:0
from object /opt/cruise-sysroot-1b2d6a0/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#4 0x7f0a3fb626cc ?? in ??:0
from object /home/ssinha/.cache/bazel/_bazel_ssinha/4ed03b91f931e2cafa39d4efa70ce058/external/pypi__protobuf_3_7_1/google/protobuf/pyext/_message.so
#5 0x7f0a3fb62799 google::protobuf::python::InitDescriptor() in ??:0
from object /home/ssinha/.cache/bazel/_bazel_ssinha/4ed03b91f931e2cafa39d4efa70ce058/external/pypi__protobuf_3_7_1/google/protobuf/pyext/_message.so
#6 0x7f0a3fb4bfbf google::protobuf::python::InitProto2MessageModule(_object*) in ??:0
from object /home/ssinha/.cache/bazel/_bazel_ssinha/4ed03b91f931e2cafa39d4efa70ce058/external/pypi__protobuf_3_7_1/google/protobuf/pyext/_message.so
#7 0x7f0a3fb49442 init_message in ??:0
from object /home/ssinha/.cache/bazel/_bazel_ssinha/4ed03b91f931e2cafa39d4efa70ce058/external/pypi__protobuf_3_7_1/google/protobuf/pyext/_message.so
#8 0x7f0a92bfd9a8 _PyImport_LoadDynamicModule in ??:0
from object /opt/cruise-sysroot-1b2d6a0/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#9 0x7f0a92d2a898 ?? in ??:0
from object /opt/cruise-sysroot-1b2d6a0/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#10 0x7f0a92c0bc9e ?? in ??:0
from object /opt/cruise-sysroot-1b2d6a0/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#11 0x7f0a92d2ae65 PyImport_ImportModuleLevel in ??:0
from object /opt/cruise-sysroot-1b2d6a0/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#12 0x7f0a92c6077e ?? in ??:0
from object /opt/cruise-sysroot-1b2d6a0/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#13 0x7f0a92ca8192 PyObject_Call in ??:0
from object /opt/cruise-sysroot-1b2d6a0/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#14 0x7f0a92cf43b6 PyEval_CallObjectWithKeywords in ??:0
from object /opt/cruise-sysroot-1b2d6a0/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#15 0x7f0a92c40b31 PyEval_EvalFrameEx in ??:0
from object /opt/cruise-sysroot-1b2d6a0/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

Copy link

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago.

@github-actions github-actions bot added the inactive Denotes the issue/PR has not seen activity in the last 90 days. label Mar 10, 2024
Copy link

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it.

This issue was closed and archived because there has been no new activity in the 14 days since the inactive label was added.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive Denotes the issue/PR has not seen activity in the last 90 days. python
Projects
None yet
Development

No branches or pull requests

3 participants