@@ -302,9 +302,12 @@ StubLauncher::Launch()
302
302
// that the stub process is unhealthy and return early. Waiting until the
303
303
// health thread is spawn would make sure would prevent this issue.
304
304
bi::managed_external_buffer::handle_t message;
305
- RETURN_IF_ERROR ( ReceiveMessageFromStub (message) );
305
+ auto err = ReceiveMessageFromStub (message);
306
306
307
307
if (stub_process_kind_ == " AUTOCOMPLETE_STUB" ) {
308
+ if (err != nullptr ) {
309
+ throw BackendModelException (err);
310
+ }
308
311
try {
309
312
AutocompleteStubProcess ();
310
313
}
@@ -315,6 +318,7 @@ StubLauncher::Launch()
315
318
TRITONSERVER_ErrorNew (TRITONSERVER_ERROR_INTERNAL, ex.what ()));
316
319
}
317
320
} else if (stub_process_kind_ == " MODEL_INSTANCE_STUB" ) {
321
+ RETURN_IF_ERROR (err);
318
322
RETURN_IF_ERROR (ModelInstanceStubProcess ());
319
323
} else {
320
324
return TRITONSERVER_ErrorNew (
@@ -460,9 +464,12 @@ StubLauncher::Launch()
460
464
// that the stub process is unhealthy and return early. Waiting until the
461
465
// health thread is spawn would prevent this issue.
462
466
bi::managed_external_buffer::handle_t message;
463
- RETURN_IF_ERROR ( ReceiveMessageFromStub (message) );
467
+ auto err = ReceiveMessageFromStub (message);
464
468
465
469
if (stub_process_kind_ == " AUTOCOMPLETE_STUB" ) {
470
+ if (err != nullptr ) {
471
+ throw BackendModelException (err);
472
+ }
466
473
try {
467
474
AutocompleteStubProcess ();
468
475
}
@@ -473,6 +480,7 @@ StubLauncher::Launch()
473
480
TRITONSERVER_ErrorNew (TRITONSERVER_ERROR_INTERNAL, ex.what ()));
474
481
}
475
482
} else if (stub_process_kind_ == " MODEL_INSTANCE_STUB" ) {
483
+ RETURN_IF_ERROR (err);
476
484
RETURN_IF_ERROR (ModelInstanceStubProcess ());
477
485
} else {
478
486
return TRITONSERVER_ErrorNew (
0 commit comments