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

Python bindings for absl::Status cause ODR violation #20

Open
apronchenkov opened this issue Apr 26, 2024 · 0 comments
Open

Python bindings for absl::Status cause ODR violation #20

apronchenkov opened this issue Apr 26, 2024 · 0 comments

Comments

@apronchenkov
Copy link

The issue can manifest itself in multiple ways. One of the most straightforward examples is that returning an absl::Status with a payload from C++ to Python can cause the process to crash (approximately 1 in 50k times; code that reproduces the issue: https://github.com/apronchenkov/pybind11_absl_cord_odr_issue).

It appears that the root cause of the issue seems is that pybind11_abseil includes statically linked components of Abseil, which may conflict with Abseil usages within the Python extensions.

copybara-service bot pushed a commit to google/arolla that referenced this issue Apr 29, 2024
ODR violations were occasionally observed in presubmit test runs. Our investigation revealed that the issue stems from the Python bindings for absl::Status in pybind11_abseil (see the reported issue: pybind/pybind11_abseil#20).

Note: We have tested that this change helps by manually increasing the number of iterations in //py/arolla/py_utils:py_utils_test to 10**6.
PiperOrigin-RevId: 629017121
Change-Id: Iab0ff1f460971ef69e6a9653c10b7e2dddccfdcc
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

1 participant