Skip to content

Conversation

@hnwyllmm
Copy link
Member

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.

@coderabbitai
Copy link

coderabbitai bot commented Dec 29, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

Copilot AI left a 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 onnxruntime in the package's __init__.py to 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
Copy link

Copilot AI Dec 29, 2025

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".

Suggested change
# 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

Copilot uses AI. Check for mistakes.
"""
import importlib.metadata

# Note: pylibseekdb built with ABI=0 and onnxruntime built with ABI=1, so there's a conflict between the two libraries.
Copy link

Copilot AI Dec 29, 2025

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.

Suggested change
# 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.

Copilot uses AI. Check for mistakes.
@hnwyllmm hnwyllmm merged commit 8774dab into oceanbase:main Dec 29, 2025
11 checks passed
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

Successfully merging this pull request may close these issues.

1 participant