However, when I want to extend the search space (no using default config.pbtxt) and Model Analyzer is allowed to reload models (the default behavior), Triton Server crashes with a segmentation fault when it tries to reload some backend composing model.
With reload_model_disable: true, Model Analyzer successfully profiles all concurrency levels (1, 2, 4, 8, 16) against the already-loaded model configuration. Detect_preprocessing instance count is set to 2.
All perf_analyzer runs complete without issues and results are generated correctly.
11:11:22 [Model Analyzer] DEBUG:
{'always_report_gpu_metrics': False,
'batch_sizes': [1],
'bls_composing_models': [],
'checkpoint_directory': '/workspace/checkpoints',
'client_max_retries': 50,
'client_protocol': 'grpc',
'collect_cpu_metrics': False,
'concurrency': [],
'concurrency_sweep_disable': False,
'config_file': '/model_analyzer/config_linear_reid-no_pre-python_dm-yes.yml',
'constraints': {},
'cpu_only_composing_models': ['detect_postprocessing_reid'],
'dcgm_disable': False,
'duration_seconds': 3,
'early_exit_enable': False,
'ensemble_composing_models': [{'model_name': 'rt-detr', 'cpu_only': False, 'model_config_parameters': {'instance_group': [[{'kind': ['KIND_GPU'], 'count': [1]}]]}},
{'model_name': 'detect_postprocessing_reid', 'cpu_only': False, 'model_config_parameters': {'instance_group': [[{'kind': ['KIND_CPU'], 'count': [1]}]]}},
{'model_name': 'detect_preprocessing', 'cpu_only': False, 'model_config_parameters': {'instance_group': [[{'kind': ['KIND_CPU'], 'count': [1, 2]}]]}}],
'export_path': '/model_analyzer/linear_reid-no_pre-python_dm-yes_1280x1280/results',
'filename_model_gpu': 'metrics-model-gpu.csv',
'filename_model_inference': 'metrics-model-inference.csv',
'filename_server_only': 'metrics-server-only.csv',
'genai_perf_flags': {},
'gpu_output_fields': ['model_name',
'gpu_uuid',
'batch_size',
'concurrency',
'model_config_path',
'instance_group',
'satisfies_constraints',
'gpu_used_memory',
'gpu_utilization',
'gpu_power_usage'],
'gpus': ['all'],
'inference_output_fields': ['model_name',
'batch_size',
'concurrency',
'model_config_path',
'instance_group',
'max_batch_size',
'satisfies_constraints',
'perf_throughput',
'perf_latency_p99'],
'latency_budget': None,
'max_percentage_of_search_space': 10,
'min_percentage_of_search_space': 5,
'min_throughput': None,
'model_repository': '/models/ensemble_model_repository/linear_reid-no_pre-python_dm-yes',
'model_type': 'generic',
'monitoring_interval': 1.0,
'num_configs_per_model': 3,
'num_top_model_configs': 0,
'objectives': {'perf_throughput': 10},
'optuna_early_exit_threshold': 10,
'optuna_max_trials': 200,
'optuna_min_trials': 20,
'output_model_repository_path': '/model_analyzer/linear_reid-no_pre-python_dm-yes_1280x1280/outputs',
'override_output_model_repository': True,
'perf_analyzer_cpu_util': 480.0,
'perf_analyzer_flags': {'shape': ['raw_image:1280,1280,3']},
'perf_analyzer_max_auto_adjusts': 10,
'perf_analyzer_path': 'perf_analyzer',
'perf_analyzer_timeout': 600,
'perf_output': False,
'perf_output_path': None,
'plots': [{'name': 'throughput_v_latency', 'title': 'Throughput vs. Latency', 'x_axis': 'perf_latency_p99', 'y_axis': 'perf_throughput', 'monotonic': True},
{'name': 'gpu_mem_v_latency', 'title': 'GPU Memory vs. Latency', 'x_axis': 'perf_latency_p99', 'y_axis': 'gpu_used_memory', 'monotonic': False}],
'profile_models': [{'model_name': 'ensemble_model', 'cpu_only': False, 'objectives': {'perf_throughput': 10}, 'parameters': {'batch_sizes': [1], 'concurrency': [], 'request_rate': []}, 'weighting': 1, 'perf_analyzer_flags': {'shape': ['raw_image:1280,1280,3']}}],
'reload_model_disable': False,
'request_rate': [],
'request_rate_search_enable': False,
'run_config_profile_models_concurrently_enable': False,
'run_config_search_disable': False,
'run_config_search_max_binary_search_steps': 5,
'run_config_search_max_concurrency': 4,
'run_config_search_max_instance_count': 5,
'run_config_search_max_model_batch_size': 8,
'run_config_search_max_request_rate': 8192,
'run_config_search_min_concurrency': 1,
'run_config_search_min_instance_count': 1,
'run_config_search_min_model_batch_size': 8,
'run_config_search_min_request_rate': 16,
'run_config_search_mode': 'quick',
'server_output_fields': ['model_name',
'gpu_uuid',
'gpu_used_memory',
'gpu_utilization',
'gpu_power_usage'],
'skip_detailed_reports': False,
'skip_summary_reports': False,
'triton_docker_args': {},
'triton_docker_image': 'nvcr.io/nvidia/tritonserver:26.02-py3',
'triton_docker_labels': {},
'triton_docker_mounts': [],
'triton_docker_shm_size': None,
'triton_grpc_endpoint': 'localhost:8001',
'triton_http_endpoint': 'localhost:8000',
'triton_install_path': '/opt/tritonserver',
'triton_launch_mode': 'remote',
'triton_metrics_url': 'http://localhost:8002/metrics',
'triton_output_path': None,
'triton_server_environment': {},
'triton_server_flags': {},
'triton_server_path': 'tritonserver',
'use_concurrency_formula': False,
'weighting': None}
11:11:22 [Model Analyzer] Initializing GPUDevice handles
11:11:24 [Model Analyzer] Using GPU 0 NVIDIA RTX A2000 with UUID GPU-5b2f14e0-a8c2-32a0-fa32-063b50f7e799
11:11:24 [Model Analyzer] WARNING: Overriding the output model repo path "/model_analyzer/linear_reid-no_pre-python_dm-yes_1280x1280/outputs"
11:11:24 [Model Analyzer] Using remote Triton Server
11:11:24 [Model Analyzer] No checkpoint file found, starting a fresh run.
11:11:24 [Model Analyzer] Profiling server only metrics...
11:11:28 [Model Analyzer]
11:11:28 [Model Analyzer] Starting quick mode search to find optimal configs
11:11:28 [Model Analyzer]
11:11:28 [Model Analyzer] Creating model config: detect_preprocessing_config_default
11:11:28 [Model Analyzer]
11:11:28 [Model Analyzer] Creating model config: rt-detr_config_default
11:11:28 [Model Analyzer]
11:11:28 [Model Analyzer] Creating model config: detect_postprocessing_reid_config_default
11:11:28 [Model Analyzer]
11:11:28 [Model Analyzer] Creating ensemble model config: ensemble_model_config_default
11:11:31 [Model Analyzer] DEBUG: Model detect_preprocessing_config_default loaded
11:11:34 [Model Analyzer] DEBUG: Model rt-detr_config_default loaded
11:11:37 [Model Analyzer] DEBUG: Model detect_postprocessing_reid_config_default loaded
11:11:38 [Model Analyzer] DEBUG: Model ensemble_model_config_default loaded
11:11:38 [Model Analyzer] Profiling ensemble_model_config_default: concurrency=16
11:11:38 [Model Analyzer] DEBUG: Running ['perf_analyzer', '-m', 'ensemble_model', '-b', '1', '-u', 'localhost:8001', '-i', 'grpc', '-f', 'ensemble_model-results.csv', '--verbose-csv', '--concurrency-range', '16', '--shape', 'raw_image:1280,1280,3', '--measurement-mode', 'count_windows', '--collect-metrics', '--metrics-url', 'http://localhost:8002/metrics', '--metrics-interval', '1000']
11:11:45 [Model Analyzer] DEBUG: Reading PA results from ensemble_model-results.csv
11:11:45 [Model Analyzer] DEBUG: Measurement for [0, 0, 0, 0, 0, 0]: throughput = 81.9757, latency = 331.348 (best throughput: 81.9757, best_latency: 331.348)
11:11:45 [Model Analyzer] Saved checkpoint to /workspace/checkpoints/0.ckpt
11:11:45 [Model Analyzer] Creating model config: detect_preprocessing_config_0
11:11:45 [Model Analyzer] Setting instance_group to [{'count': 1, 'kind': 'KIND_CPU'}]
11:11:45 [Model Analyzer] Setting max_batch_size to 8
11:11:45 [Model Analyzer] Enabling dynamic_batching
11:11:45 [Model Analyzer]
11:11:45 [Model Analyzer] Creating model config: rt-detr_config_0
11:11:45 [Model Analyzer] Setting instance_group to [{'count': 1, 'kind': 'KIND_GPU'}]
11:11:45 [Model Analyzer] Setting max_batch_size to 8
11:11:45 [Model Analyzer] Enabling dynamic_batching
11:11:45 [Model Analyzer]
11:11:45 [Model Analyzer] Creating model config: detect_postprocessing_reid_config_0
11:11:45 [Model Analyzer] Setting instance_group to [{'count': 1, 'kind': 'KIND_CPU'}]
11:11:45 [Model Analyzer] Setting max_batch_size to 8
11:11:45 [Model Analyzer] Enabling dynamic_batching
11:11:45 [Model Analyzer]
11:11:45 [Model Analyzer] Creating ensemble model config: ensemble_model_config_0
11:11:45 [Model Analyzer] Setting max_batch_size to 1
11:11:48 [Model Analyzer] DEBUG: Model detect_preprocessing_config_0 loaded
11:11:50 [Model Analyzer] DEBUG: Model rt-detr_config_0 loaded
11:11:51 [Model Analyzer] DEBUG: Model detect_postprocessing_reid_config_0 loaded
11:11:52 [Model Analyzer] DEBUG: Model ensemble_model_config_0 loaded
11:11:52 [Model Analyzer] Profiling ensemble_model_config_0: concurrency=4
11:11:52 [Model Analyzer] DEBUG: Running ['perf_analyzer', '-m', 'ensemble_model', '-b', '1', '-u', 'localhost:8001', '-i', 'grpc', '-f', 'ensemble_model-results.csv', '--verbose-csv', '--concurrency-range', '4', '--shape', 'raw_image:1280,1280,3', '--measurement-mode', 'count_windows', '--collect-metrics', '--metrics-url', 'http://localhost:8002/metrics', '--metrics-interval', '1000']
11:11:56 [Model Analyzer] ERROR: Expected output file not found: ensemble_model-results.csv
11:11:56 [Model Analyzer] ERROR: perf_analyzer returned success but did not create expected output files
11:11:56 [Model Analyzer] ERROR: perf_analyzer output:
11:11:56 [Model Analyzer] ERROR: *** Measurement Settings ***
Batch size: 1
Service Kind: TRITON
Using "count_windows" mode for stabilization
Stabilizing using average latency and throughput
Minimum number of samples in each window: 50
Using synchronous calls for inference
Request concurrency: 4
Failed to maintain requested inference load. Worker thread(s) failed to generate concurrent requests.
terminate called without an active exception
11:11:56 [Model Analyzer] DEBUG: _auto_adjust_parameters called. returncode=0, output_length=424, has_failed_msg=False, has_larger_window_msg=False
11:11:56 [Model Analyzer] Running perf_analyzer failed with exit status 0:
*** Measurement Settings ***
Batch size: 1
Service Kind: TRITON
Using "count_windows" mode for stabilization
Stabilizing using average latency and throughput
Minimum number of samples in each window: 50
Using synchronous calls for inference
Request concurrency: 4
Failed to maintain requested inference load. Worker thread(s) failed to generate concurrent requests.
terminate called without an active exception
11:11:56 [Model Analyzer] DEBUG: Measurement for [0, 0, 0, 0, 0, 0]: None.
11:11:56 [Model Analyzer] No changes made to analyzer data, no checkpoint saved.
11:11:56 [Model Analyzer] DEBUG: Stepping back: [0, 0, 0, 0, 0, 0]->[0, 0, 0, 0, 0, 0]
11:11:56 [Model Analyzer]
11:11:56 [Model Analyzer] Done with quick mode search. Gathering concurrency sweep measurements for reports
11:11:56 [Model Analyzer]
11:11:56 [Model Analyzer] WARNING: Requested top 3 configs, but found only 1. Showing all available configs for this model.
11:11:56 [Model Analyzer] DEBUG: Failed to connect to Triton server (attempt 1/50): [StatusCode.UNAVAILABLE] failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:8001: recvmsg:Connection reset by peer
11:12:06 [Model Analyzer] DEBUG: Failed to connect to Triton server (attempt 11/50): [StatusCode.UNAVAILABLE] failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:8001: Socket closed
Description
I am using Model Analyzer to profile an ensemble model on a remote Triton Server
running in explicit model control mode. Profiling works fine when
reload_model_disable: trueis set (concurrency sweep only, no model reloads).However, when I want to extend the search space (no using default config.pbtxt) and Model Analyzer is allowed to reload models (the default behavior), Triton Server crashes with a segmentation fault when it tries to reload some backend composing model.
Environment
Triton started with
tritonserver --model-repository /model_repository_path/ --model-control-mode explicit.Model Analyzer started with
model-analyzer profile -f /model_analyzer/config.yml --override-output-model-repository --triton-launch-mode remote -vEnsemble Architecture
The ensemble model (
ensemble_model) has three composing models:detect_preprocessingrt-detrdetect_postprocessing_reidModel Analyzer Config
What Works
With reload_model_disable: true, Model Analyzer successfully profiles all concurrency levels (1, 2, 4, 8, 16) against the already-loaded model configuration. Detect_preprocessing instance count is set to 2.
All perf_analyzer runs complete without issues and results are generated correctly.
What Crashes
Model Analyzer log
Triton log
Is this bug related to how fast Triton server can reload the models?
thanks for your help