C++一些错误

0

死锁

terminate called after throwing an instance of 'std::system_error'
  what():  Resource deadlock avoided
已中止 (核心已转储)

这个问题在Windows上面是没问题的,但是Linux就是出现,最后发现原来是std::async执行需要释放完成才能结束线程。

CUDA

2024-12-25 20:56:05.198288284 [E:onnxruntime:face-feature, cuda_call.cc:123 CudaCall] CUDA failure 700: an illegal memory access was encountered ; GPU=0 ; hostname=dmx-SYS-7048GR-TR ; file=/onnxruntime_src/onnxruntime/core/providers/cuda/gpu_data_transfer.cc ; line=63 ; expr=cudaMemcpyAsync(dst_data, src_data, bytes, cudaMemcpyHostToDevice, static_cast<cudaStream_t>(stream.GetHandle()));
2024-12-25 20:56:05.198362619 [E:onnxruntime:face-feature, cuda_call.cc:123 CudaCall] CUDA failure 700: an illegal memory access was encountered ; GPU=0 ; hostname=dmx-SYS-7048GR-TR ; file=/onnxruntime_src/onnxruntime/core/providers/cuda/cuda_execution_provider.cc ; line=448 ; expr=cudaStreamSynchronize(static_cast<cudaStream_t>(stream_));
2024-12-25 20:56:05.198362540 [E:onnxruntime:face-feature, cuda_call.cc:123 CudaCall] CUDA failure 700: an illegal memory access was encountered ; GPU=0 ; hostname=dmx-SYS-7048GR-TR ; file=/onnxruntime_src/onnxruntime/core/providers/cuda/cuda_execution_provider.cc ; line=448 ; expr=cudaStreamSynchronize(static_cast<cudaStream_t>(stream_)); static_cast<cudaStream_t>(stream.GetHandle()));
2024-12-25 20:56:05.198398418 [E:onnxruntime:face-feature, cuda_call.cc:123 CudaCall] CUDA failure 700: an illegal memory access was encountered ; GPU=0 ; hostname=dmx-SYS-7048GR-TR ; file=/onnxruntime_src/onnxruntime/core/providers/cuda/cuda_execution_provider.cc ; line=448 ; expr=cudaStreamSynchronize(static_cast<cudaStream_t>(stream_));
terminate called recursively
terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException'
  what():  /onnxruntime_src/onnxruntime/core/providers/cuda/cuda_call.cc:129 std::conditional_t<THRW, void, onnxruntime::common::Status> onnxruntime::CudaCall(ERRTYPE, const char*, const char*, SUCCTYPE, const char*, const char*, int) [with ERRTYPE = cudaError; bool THRW = true; SUCCTYPE = cudaError; std::conditional_t<THRW, void, common::Status> = void] /onnxruntime_src/onnxruntime/core/providers/cuda/cuda_call.cc:121 std::conditional_t<THRW, void, onnxruntime::common::Status> onnxruntime::CudaCall(ERRTYPE, const char*, const char*, SUCCTYPE, const char*, const char*, int) [with ERRTYPE = cudaError; bool THRW = true; SUCCTYPE = cudaError; std::conditional_t<THRW, void, common::Status> = void] CUDA failure 700: an illegal memory access was encountered ; GPU=0 ; hostname=dmx-SYS-7048GR-TR ; file=/onnxruntime_src/onnxruntime/core/providers/cuda/cuda_stream_handle.cc ; line=36 ; expr=cudaEventDestroy(event_);

这个问题很奇怪,摄像头媒体不会出问题,但是游戏流就容易崩,反正现在在CreateTensorRun加锁就没问题了。