Skip to content

fix: Improve error handling for Python backend model initialization failures - #408

Merged
pskiran1 merged 8 commits into
mainfrom
spolisetty_pb_model_load
Aug 7, 2025
Merged

fix: Improve error handling for Python backend model initialization failures#408
pskiran1 merged 8 commits into
mainfrom
spolisetty_pb_model_load

Conversation

@pskiran1

@pskiran1 pskiran1 commented Jul 21, 2025

Copy link
Copy Markdown
Member
  • This change aims to prevent the server from hanging when a Python backend model fails to initialize. It replaces an indefinite wait for a message from the stub process with the ReceiveMessageFromStub function, which correctly detects errors from the stub process.
  • Additionally, it fixes shm cleanup when a model fails to initialize (DLIS-8432).

@pskiran1
pskiran1 requested review from krishung5 and yinggeh July 21, 2025 17:07
@pskiran1

Copy link
Copy Markdown
Member Author

Found a bug that the Python backend internal SHM is not destroyed upon model initialization failure, and have created an internal ticket DLIS-8432.

@pskiran1 pskiran1 changed the title fix: Improve error handling for Python backend model initialization failures [Do Not Merge] fix: Improve error handling for Python backend model initialization failures Aug 4, 2025
@pskiran1 pskiran1 changed the title [Do Not Merge] fix: Improve error handling for Python backend model initialization failures fix: Improve error handling for Python backend model initialization failures Aug 5, 2025
@pskiran1
pskiran1 requested a review from yinggeh August 5, 2025 19:04
@pskiran1
pskiran1 requested a review from kthui August 6, 2025 14:56
Comment thread src/stub_launcher.cc
Comment thread src/pb_stub.cc
@yinggeh
yinggeh self-requested a review August 7, 2025 00:08

@kthui kthui left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work making the stub launch process more robust!

Comment thread src/stub_launcher.cc
Comment thread src/stub_launcher.cc

@krishung5 krishung5 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, great work!

@yinggeh yinggeh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@pskiran1
pskiran1 merged commit 8f2df55 into main Aug 7, 2025
3 checks passed
@pskiran1
pskiran1 deleted the spolisetty_pb_model_load branch August 7, 2025 10:56
mc-nv pushed a commit that referenced this pull request Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants