-
Notifications
You must be signed in to change notification settings - Fork 18
fix abi problem #99
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
fix abi problem #99
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes an ABI (Application Binary Interface) conflict between pylibseekdb (built with ABI=0) and onnxruntime (built with ABI=1) that causes a coredump when both libraries are loaded in certain orders. The solution imports onnxruntime before any code that might load pylibseekdb, ensuring the ABI=1 library is loaded first.
- Adds an early import of
onnxruntimein the package's__init__.pyto establish proper library loading order - Includes explanatory comment documenting the ABI conflict and workaround strategy
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import importlib.metadata | ||
|
|
||
| # Note: pylibseekdb built with ABI=0 and onnxruntime built with ABI=1, so there's a conflict between the two libraries. | ||
| # pylibseekdb is built both with ABI=0 and the -Bsymbolic flag, so we can load libraries with ABI=1 first |
Copilot
AI
Dec 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammar issue: The word "both" is awkwardly placed. It should be "pylibseekdb is built with both ABI=0 and the -Bsymbolic flag" or simply remove "both" since it's not necessary when using "and".
| # pylibseekdb is built both with ABI=0 and the -Bsymbolic flag, so we can load libraries with ABI=1 first | |
| # pylibseekdb is built with both ABI=0 and the -Bsymbolic flag, so we can load libraries with ABI=1 first |
| """ | ||
| import importlib.metadata | ||
|
|
||
| # Note: pylibseekdb built with ABI=0 and onnxruntime built with ABI=1, so there's a conflict between the two libraries. |
Copilot
AI
Dec 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammar issue: "pylibseekdb built with" should be "pylibseekdb is built with" for correct sentence structure.
| # Note: pylibseekdb built with ABI=0 and onnxruntime built with ABI=1, so there's a conflict between the two libraries. | |
| # Note: pylibseekdb is built with ABI=0 and onnxruntime is built with ABI=1, so there's a conflict between the two libraries. |
Summary
close #98
If python dlopen pylibseekdb and then other libraries with ABI=1, then it would coredump.
For details, please refer to #98
Solution Description
Force pyseekdb load a library with ABI=1 flag before opening pylibseekdb.