Client socket time out when run verl.trainer.main_ppo with ray in Ascend NPU 910B
i am trying verl in Ascend NPU 910B, has anybody encounter this problem? can anybody give me some advice? thanks very much!
source code: main branch + https://github.com/volcengine/verl/pull/332
enviroment: Ascend NPU 910B CANN toolkit & kernel 8.1.RC1 torch 2.5.1 torch-npu 2.5.1.dev20250320 vllm 0.7.3+empty vllm-ascend 0.7.3rc2 python 3.10.0
execute script:
PYTHONUNBUFFERED=1 python3.10 -m verl.trainer.main_ppo
data.train_files=/gsm8k/main/train-00000-of-00001.parquet
data.val_files=/gsm8k/main/test-00000-of-00001.parquet
data.train_batch_size=256
data.max_prompt_length=512
data.max_response_length=256
actor_rollout_ref.model.path=/Qwen2.5-0.5B-Instruct
actor_rollout_ref.actor.optim.lr=1e-6
actor_rollout_ref.actor.ppo_mini_batch_size=64
actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=4
actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
actor_rollout_ref.rollout.tensor_model_parallel_size=1
actor_rollout_ref.rollout.gpu_memory_utilization=0.4
actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=4
critic.optim.lr=1e-5
critic.model.path=/Qwen2.5-0.5B-Instruct
critic.ppo_micro_batch_size_per_gpu=4
algorithm.kl_ctrl.kl_coef=0.001
trainer.logger=['console']
+trainer.val_before_train=False
trainer.default_hdfs_dir=null
trainer.n_gpus_per_node=1
trainer.nnodes=1
trainer.save_freq=10
trainer.test_freq=10
trainer.total_epochs=15 2>&1 | tee verl_demo.log
after 30 minites running, it will print below error log:
(TaskRunner pid=904050) dataset len: 1319
(TaskRunner pid=904050) Size of train dataloader: 29
(TaskRunner pid=904050) Test~Total training steps: 435
(pid=904548) /home/ma-user/python3.10/lib/python3.10/site-packages/torch_npu/utils/collect_env.py:58: UserWarning: Warning: The /usr/local/Ascend/ascend-toolkit/latest owner does not match the current owner.
(pid=904548) warnings.warn(f"Warning: The {path} owner does not match the current owner.")
(pid=904548) /home/ma-user/python3.10/lib/python3.10/site-packages/torch_npu/utils/collect_env.py:58: UserWarning: Warning: The /usr/local/Ascend/ascend-toolkit/8.0.RC2/aarch64-linux/ascend_toolkit_install.info owner does not match the current owner.
(pid=904548) warnings.warn(f"Warning: The {path} owner does not match the current owner.")
(WorkerDict pid=904548) [E331 20:50:12.688969421 socket.cpp:1011] [c10d] The client socket has timed out after 1800000ms while trying to connect to (10.123.132.218, 38321).
(WorkerDict pid=904548) [W331 20:50:12.694407484 TCPStore.cpp:358] [c10d] TCP client failed to connect/validate to host 10.123.132.218:38321 - retrying (try=0, timeout=1800000ms, delay=56413ms): The client socket has timed out after 1800000ms while trying to connect to (10.123.132.218, 38321).
(WorkerDict pid=904548) Exception raised from throwTimeoutError at /pytorch/torch/csrc/distributed/c10d/socket.cpp:1013 (most recent call first):
(WorkerDict pid=904548) frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0xb8 (0xfff0ca1b8908 in /home/ma-user/python3.10/lib/python3.10/site-packages/torch/lib/libc10.so)
(WorkerDict pid=904548) frame #1:
This seems to be a server issue, you can turn off the firewall. And we only tested based on 2 * 8NPS.
This seems to be a server issue, you can turn off the firewall. And we only tested based on 2 * 8NPS.
Can I just use 1 npu to test? I don't have many resources to test. How can I use it if we can use 1 NPU? Or I must use multiple NPU to test? Thank you for your reply.
I changed my script to blow code, it was found in source code of #332 , It seems like have the same problem as i posted yesterday. `set -x
export VLLM_ATTENTION_BACKEND=XFORMERS
python3.10 -m verl.trainer.main_ppo
algorithm.adv_estimator=grpo
data.train_files=/gsm8k/main/train-00000-of-00001.parquet
data.val_files=/gsm8k/main/test-00000-of-00001.parquet
data.train_batch_size=128
data.max_prompt_length=512
data.max_response_length=128
data.filter_overlong_prompts=True
data.truncation='error'
data.prompt_key=question
actor_rollout_ref.model.path=/Qwen2.5-0.5B-Instruct
actor_rollout_ref.actor.optim.lr=1e-6
actor_rollout_ref.model.use_remove_padding=False
actor_rollout_ref.actor.ppo_mini_batch_size=64
actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=20
actor_rollout_ref.actor.use_kl_loss=True
actor_rollout_ref.actor.kl_loss_coef=0.001
actor_rollout_ref.actor.kl_loss_type=low_var_kl
actor_rollout_ref.model.enable_gradient_checkpointing=True
actor_rollout_ref.actor.fsdp_config.param_offload=False
actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=40
actor_rollout_ref.rollout.enable_chunked_prefill=False
actor_rollout_ref.rollout.tensor_model_parallel_size=2
actor_rollout_ref.rollout.name=vllm
actor_rollout_ref.rollout.gpu_memory_utilization=0.6
actor_rollout_ref.rollout.n=5
actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=40
actor_rollout_ref.ref.fsdp_config.param_offload=True
algorithm.kl_ctrl.kl_coef=0.001
trainer.critic_warmup=0
trainer.logger=['console']
trainer.project_name='verl_grpo_example_gsm8k'
trainer.experiment_name='qwen2_7b_function_rm'
trainer.n_gpus_per_node=1
trainer.nnodes=1
trainer.save_freq=-1
trainer.test_freq=5
trainer.total_epochs=15 $@`
This seems to be a server issue, you can turn off the firewall. And we only tested based on 2 * 8NPS.
Can I just use 1 npu to test? I don't have many resources to test. How can I use it if we can use 1 NPU? Or I must use multiple NPU to test? Thank you for your reply.
I changed my script to blow code, it was found in source code of #332 , It seems like have the same problem as i posted yesterday. `set -x
export VLLM_ATTENTION_BACKEND=XFORMERS
python3.10 -m verl.trainer.main_ppo algorithm.adv_estimator=grpo data.train_files=/gsm8k/main/train-00000-of-00001.parquet data.val_files=/gsm8k/main/test-00000-of-00001.parquet data.train_batch_size=128 data.max_prompt_length=512 data.max_response_length=128 data.filter_overlong_prompts=True data.truncation='error' data.prompt_key=question actor_rollout_ref.model.path=/Qwen2.5-0.5B-Instruct actor_rollout_ref.actor.optim.lr=1e-6 actor_rollout_ref.model.use_remove_padding=False actor_rollout_ref.actor.ppo_mini_batch_size=64 actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=20 actor_rollout_ref.actor.use_kl_loss=True actor_rollout_ref.actor.kl_loss_coef=0.001 actor_rollout_ref.actor.kl_loss_type=low_var_kl actor_rollout_ref.model.enable_gradient_checkpointing=True actor_rollout_ref.actor.fsdp_config.param_offload=False actor_rollout_ref.actor.fsdp_config.optimizer_offload=False actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=40 actor_rollout_ref.rollout.enable_chunked_prefill=False actor_rollout_ref.rollout.tensor_model_parallel_size=2 actor_rollout_ref.rollout.name=vllm actor_rollout_ref.rollout.gpu_memory_utilization=0.6 actor_rollout_ref.rollout.n=5 actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=40 actor_rollout_ref.ref.fsdp_config.param_offload=True algorithm.kl_ctrl.kl_coef=0.001 trainer.critic_warmup=0 trainer.logger=['console'] trainer.project_name='verl_grpo_example_gsm8k' trainer.experiment_name='qwen2_7b_function_rm' trainer.n_gpus_per_node=1 trainer.nnodes=1 trainer.save_freq=-1 trainer.test_freq=5 trainer.total_epochs=15 $@`
It is necessary to use multiple NPUS.
It is necessary to use multiple NPUS.
Can I use 2 * 1NPS to test? Is there anything that needs additional configuration? THX
It is necessary to use multiple NPUS.
Can I use 2 * 1NPS to test?
You can use 1 * 2NPUS for functional testing, but you may encounter oom errors.
You can use 1 x 2NPUS for functional testing, but you may encounter oom errors.
I ran this program in an 1 x 2NPUS machine again, but it also has the same problem, What config or code should I change in project to adjust 1 x 2NPUS machine?
This issue doesn't seem like a code problem, it looks more like an environment problem. Please make sure the running environment is fine.
Me too! Did you figure out how to fix this bug?
我增加环境变量 export MY_HOST_IP=127.0.0.1 解决了这个问题
定时清理检查结果:这个 issue 最近一次由当前运行账号以外账号产生的公开回复或公开引用是 2025-07-12T13:34:23Z。本轮检查日期为 2026-07-04,该时间已经超过 6 个月。检查来源包括 issue comments API https://api.github.com/repos/verl-project/verl/issues/849/comments?per_page=100 和 timeline API https://api.github.com/repos/verl-project/verl/issues/849/timeline?per_page=100。
按照本仓库的定时 issue 清理标准,我会先留下这条说明并关闭该 issue。若作者或社区成员仍能提供新的复现、证据或需求背景,请继续评论请求重开,或创建新的 issue 并引用这里的上下文。
Scheduled cleanup check: the latest public reply or public reference from an account other than the current automation account was 2025-07-12T13:34:23Z. The check date for this run is 2026-07-04, so that activity is more than 6 months old. The checked public sources were the issue comments API https://api.github.com/repos/verl-project/verl/issues/849/comments?per_page=100 and the timeline API https://api.github.com/repos/verl-project/verl/issues/849/timeline?per_page=100.
Following the scheduled issue cleanup policy, I am leaving this note first and then closing the issue. If the author or community can still provide a fresh reproduction, evidence, or requirement context, please comment to request reopening or open a new issue that links back to this one.
This response was generated by a scheduled Codex GPT5.5 issue processing task.