运行程序报错died with <Signals.SIGKILL: 9>问题定位及解决方法

运行程序报错died with

报错

当我在运行程序时,报错:

Traceback (most recent call last):
  File "/home/anaconda3/envs/scene_graph_benchmark/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/anaconda3/envs/scene_graph_benchmark/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/anaconda3/envs/scene_graph_benchmark/lib/python3.8/site-packages/torch/distributed/launch.py", line 263, in <module>
    main()
  File "/home/anaconda3/envs/scene_graph_benchmark/lib/python3.8/site-packages/torch/distributed/launch.py", line 258, in main
    raise subprocess.CalledProcessError(returncode=process.returncode,
subprocess.CalledProcessError: Command '['/home/fengsiyuan/anaconda3/envs/scene_graph_benchmark/bin/python', '-u', 'tools/relation_test_net.py', '--local_rank=0', '--config-file', 'configs/e2e_relation_X_101_32_8_FPN_1x.yaml', 'MODEL.ROI_RELATION_HEAD.USE_GT_BOX', 'False', 'MODEL.ROI_RELATION_HEAD.USE_GT_OBJECT_LABEL', 'False', 'MODEL.ROI_RELATION_HEAD.PREDICTOR', 'CausalAnalysisPredictor', 'MODEL.ROI_RELATION_HEAD.CAUSAL.EFFECT_TYPE', 'TDE', 'MODEL.ROI_RELATION_HEAD.CAUSAL.FUSION_TYPE', 'sum', 'MODEL.ROI_RELATION_HEAD.CAUSAL.CONTEXT_LAYER', 'motifs', 'TEST.IMS_PER_BATCH', '1', 'DTYPE', 'float16', 'GLOVE_DIR', '/home/fengsiyuan/Scene-Graph-Benchmark.pytorch/glove', 'MODEL.PRETRAINED_DETECTOR_CKPT', '/home/fengsiyuan/Scene-Graph-Benchmark.pytorch/checkpoints/motifs-sgdet-causal-exmp', 'OUTPUT_DIR', '/home/Scene-Graph-Benchmark.pytorch/checkpoints/motifs-sgdet-causal-exmp']' died with <Signals.SIGKILL: 9>

其中关键错误如下:

died with <Signals.SIGKILL: 9>

问题原因:

  1. 内存不足(OOM):如果你的程序占用了过多的内存,操作系统会终止它以保护系统。
  2. CPU使用溢出:如果程序占用了过多的CPU资源,可能会导致系统不稳定,从而被终止。
  3. 其他系统资源限制:例如文件句柄数、网络连接数等资源耗尽。

问题定位检查

  1. 使用dmesg命令查看系统日志,寻找与OOM内存溢出相关的消息
dmesg | grep -i 'killed process'
  1. 使用top或htop命令监控内存和CPU使用情况,看看是否有资源耗尽的情况。
top
htop

解决方法

  1. 减少资源使用:尝试减少程序的内存和CPU使用。例如,减少批处理大小(TEST.IMS_PER_BATCH)或使用更小的模型。
  2. 增加系统资源:如果可能,增加系统的内存或CPU资源。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值