多机异步运行过程grpc 超时
paddle version 0.14 模型:machine_translation 代码库地址:https://github.com/xuezhong/transformer-nist 作业运行配置: 2个pserver,4个trainer,8卡 启动脚本:
LAGS_rpc_deadline=3000000 python -u thirdparty/model/transformer_cloud/train.py --src_vocab_fpath ./thirdparty/nist06n/cn_30001.dict --trg_vocab_fpath ./thirdparty/nist06n/en_30001.dict --train_file_pattern './train_data/part-*' --val_file_pattern './test_data/part-*' --batch_size 1024 --use_token_batch True --special_token '_GO' '_EOS' '_UNK' --pass_num=100 --iterations=1000 --local False --sync False
错误日志如下:
Traceback (most recent call last):
File "thirdparty/model/transformer_cloud/train.py", line 541, in <module>
train(args)
File "thirdparty/model/transformer_cloud/train.py", line 531, in train
train_loop(exe, trainer_prog)
File "thirdparty/model/transformer_cloud/train.py", line 463, in train_loop
outs = train_exe.run(fetch_list=[sum_cost.name, token_num.name], feed=feed_list)
File "/usr/local/lib/python2.7/site-packages/paddle/fluid/parallel_executor.py", line 269, in run
self.executor.run(fetch_list, fetch_var_name)
paddle.fluid.core.EnforceNotMet: internal error in RPCClient at [/paddle/paddle/fluid/operators/fetch_barrier_op.cc:48]
PaddlePaddle Call Stacks:
0 0x7fef66eaad96p paddle::platform::EnforceNotMet::EnforceNotMet(std::__exception_ptr::exception_ptr, char const*, int) + 486
1 0x7fef67bf3c0bp paddle::operators::FetchBarrierOp::RunImpl(paddle::framework::Scope const&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&) const + 763
2 0x7fef67dfb86dp paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&) + 205
3 0x7fef67c37a33p paddle::framework::details::RPCOpHandle::RunImpl() + 883
4 0x7fef67c548b5p paddle::framework::details::OpHandleBase::Run(bool) + 117
5 0x7fef67c158bap
6 0x7fef67a9e983p std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()(), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, void> >::_M_invoke(std::_Any_data const&) + 35
7 0x7fef66ffc137p std::__future_base::_State_base::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()()>&, bool&) + 39
8 0x7fefc4d9fb23p pthread_once + 83
9 0x7fef67c146c2p
10 0x7fef66ffdc74p _ZZN10ThreadPoolC1EmENKUlvE_clEv + 404
11 0x7fefba022470p
12 0x7fefc4d9a851p
13 0x7fefc445d90dp clone + 109
同步也会出现超时和os error的问题 paddlecloud 地址: http://paddlecloud.baidu-int.com:8088/paddle/jobRunInfo?jobId=job-e6c5b7abf654e898&flag=jobs&groupName=k8s_gpu_demo&groupId=c0a1f165-6279-5320-b9e7-e0218c7a87f5¤tPage=1¤tKey=1
F0820 21:26:31.923779 925 grpc_client.cc:295] Get name:[batch_norm_0.b_0], ep:[10.255.118.14:30034] meets grpc error:OS Error
*** Check failure stack trace: ***
@ 0x7fadef02753d google::LogMessage::Fail()
@ 0x7fadef02afec google::LogMessage::SendToLog()
@ 0x7fadef027063 google::LogMessage::Flush()
@ 0x7fadef02c4fe google::LogMessageFatal::~LogMessageFatal()
@ 0x7fadefefe9d8 paddle::operators::distributed::GRPCClient::Proceed()
@ 0x7fae43bb4470 (unknown)
@ 0x7fae4d9f3851 start_thread
@ 0x7fae4d0b690d clone
@ (nil) (unknown)
*********************error messages********************
[/root/paddlejob/run.sh : 242] [start_trainer]
看日志是10.255.188.14 这个ps进程并没有ready,trainer向它发send请求时会导致RPC报错,
PS 日志看起来是在尝试准备环境:
18/08/20 21:18:28 INFO common.UpdateService: ZkstatusUpdater to nmg01-mulan-hdfs.dmop.baidu.com:54310 started
18/08/20 21:18:29 INFO common.UpdateService: ZkstatusUpdater to nmg01-mulan-hdfs.dmop.baidu.com:54310 started
18/08/20 21:18:30 INFO util.NativeCodeLoader: Loaded the native-hadoop library
18/08/20 21:24:39 INFO ipc.Client: Retrying connect to server: nmg01-mulan-adapter02.nmg01.baidu.com/10.73.47.25:54310. Already tried 0 time(s).
18/08/20 21:25:33 INFO ipc.Client: Retrying connect to server: nmg01-mulan-adapter01.nmg01.baidu.com/10.73.47.24:54310. Already tried 0 time(s).
多机异步有时候还会报这个错误
F0821 12:25:05.328846 696 exception_holder.h:34] Unknown exception caught
*** Check failure stack trace: ***
@ 0x7fc55de1f53d google::LogMessage::Fail()
@ 0x7fc55de22fec google::LogMessage::SendToLog()
@ 0x7fc55de1f063 google::LogMessage::Flush()
@ 0x7fc55de244fe google::LogMessageFatal::~LogMessageFatal()
@ 0x7fc55ebe3002 paddle::framework::details::ExceptionHolder::Catch()
@ 0x7fc55ebdf94d _ZZN6paddle9framework7details24ThreadedSSAGraphExecutor5RunOpEPNS0_13BlockingQueueIPNS1_13VarHandleBaseEEEPNS1_12OpHandleBaseEENKUlvE_clEv
@ 0x7fc55ebdfea5 paddle::framework::details::ThreadedSSAGraphExecutor::RunOp()
@ 0x7fc55ebe1a58 paddle::framework::details::ThreadedSSAGraphExecutor::Run()
@ 0x7fc55ebe7db7 paddle::framework::details::ScopeBufferedSSAGraphExecutor::Run()
@ 0x7fc55de7d75c paddle::framework::ParallelExecutor::Run()
@ 0x7fc55dd90780 _ZZN8pybind1112cpp_function10initializeIZN6paddle6pybindL13pybind11_initEvEUlRNS2_9framework16ParallelExecutorERKSt6vectorISsSaISsEERKSsE91_vIS6_SB_SD_EINS_4nameENS_9is_methodENS_7siblingEEEEvOT_PFT0_DpT1_EDpRKT2_ENUlRNS_6detail13function_callEE1_4_FUNESV_
@ 0x7fc55ddac484 pybind11::cpp_function::dispatcher()
@ 0x7fc5bcbf1631 PyEval_EvalFrameEx
@ 0x7fc5bcbf2bce PyEval_EvalCodeEx
@ 0x7fc5bcbf120a PyEval_EvalFrameEx
@ 0x7fc5bcbf2bce PyEval_EvalCodeEx
@ 0x7fc5bcb707a1 function_call
@ 0x7fc5bcb41273 PyObject_Call
@ 0x7fc5bcbef7c5 PyEval_EvalFrameEx
@ 0x7fc5bcbf1560 PyEval_EvalFrameEx
@ 0x7fc5bcbf2bce PyEval_EvalCodeEx
@ 0x7fc5bcbf2ce2 PyEval_EvalCode
@ 0x7fc5bcc129e0 PyRun_FileExFlags
@ 0x7fc5bcc12bbf PyRun_SimpleFileExFlags
@ 0x7fc5bcc28454 Py_Main
@ 0x7fc5bbedccdd __libc_start_main
*** Aborted at 1534825505 (unix time) try "date -d @1534825505" if you are using GNU date ***
PC: @ 0x0 (unknown)
*** SIGABRT (@0x2b8) received by PID 696 (TID 0x7fc5bd2eb700) from PID 696; stack trace: ***
@ 0x7fc5bc8eb500 (unknown)
@ 0x7fc5bbef08a5 __GI_raise
@ 0x7fc5bbef2085 __GI_abort
@ 0x7fc55de29fbb google::FindSymbol()
@ 0x7fc55de2a97a google::GetSymbolFromObjectFile()
@ 0x7fc55de2b042 google::SymbolizeAndDemangle()
@ 0x7fc55de28848 google::DumpStackTrace()
@ 0x7fc55de28906 google::DumpStackTraceAndExit()
@ 0x7fc55de1f53d google::LogMessage::Fail()
@ 0x7fc55de22fec google::LogMessage::SendToLog()
@ 0x7fc55de1f063 google::LogMessage::Flush()
@ 0x7fc55de244fe google::LogMessageFatal::~LogMessageFatal()
@ 0x7fc55ebe3002 paddle::framework::details::ExceptionHolder::Catch()
@ 0x7fc55ebdf94d _ZZN6paddle9framework7details24ThreadedSSAGraphExecutor5RunOpEPNS0_13BlockingQueueIPNS1_13VarHandleBaseEEEPNS1_12OpHandleBaseEENKUlvE_clEv
@ 0x7fc55ebdfea5 paddle::framework::details::ThreadedSSAGraphExecutor::RunOp()
@ 0x7fc55ebe1a58 paddle::framework::details::ThreadedSSAGraphExecutor::Run()
@ 0x7fc55ebe7db7 paddle::framework::details::ScopeBufferedSSAGraphExecutor::Run()
@ 0x7fc55de7d75c paddle::framework::ParallelExecutor::Run()
@ 0x7fc55dd90780 _ZZN8pybind1112cpp_function10initializeIZN6paddle6pybindL13pybind11_initEvEUlRNS2_9framework16ParallelExecutorERKSt6vectorISsSaISsEERKSsE91_vIS6_SB_SD_EINS_4nameENS_9is_methodENS_7siblingEEEEvOT_PFT0_DpT1_EDpRKT2_ENUlRNS_6detail13function_callEE1_4_FUNESV_
@ 0x7fc55ddac484 pybind11::cpp_function::dispatcher()
@ 0x7fc5bcbf1631 PyEval_EvalFrameEx
@ 0x7fc5bcbf2bce PyEval_EvalCodeEx
@ 0x7fc5bcbf120a PyEval_EvalFrameEx
@ 0x7fc5bcbf2bce PyEval_EvalCodeEx
@ 0x7fc5bcb707a1 function_call
@ 0x7fc5bcb41273 PyObject_Call
@ 0x7fc5bcbef7c5 PyEval_EvalFrameEx
@ 0x7fc5bcbf1560 PyEval_EvalFrameEx
@ 0x7fc5bcbf2bce PyEval_EvalCodeEx
@ 0x7fc5bcbf2ce2 PyEval_EvalCode
@ 0x7fc5bcc129e0 PyRun_FileExFlags
@ 0x7fc5bcc12bbf PyRun_SimpleFileExFlags
*********************error messages********************
[/root/paddlejob/run.sh : 242] [start_trainer]
请问这个问题是怎么解决的呢?
1.现在trainer已经可以等待pserver启动以后再启动 2.网络长时间异常现在还不能做到fault tollerance.