pai icon indicating copy to clipboard operation
pai copied to clipboard

hdfs access random failure

Open leonfg opened this issue 7 years ago • 3 comments

The following job sometimes fail to copy code from hdfs and sometimes OK. Pai version: 0.12.0 Job config:

{
  "jobName": "distribute_train_mninst",
  "image": "openpai/pai.example.tensorflow",
  "virtualCluster": "default",
  "taskRoles": [
    {
      "name": "ps_server",
      "taskNumber": 1,
      "cpuNumber": 2,
      "memoryMB": 32768,
      "gpuNumber": 0,
      "command": "cd code && python train.py --data_dir=$PAI_DATA_DIR --output_dir=$PAI_OUTPUT_DIR --num_gpus=0  --ps_hosts=$PAI_TASK_ROLE_ps_server_HOST_LIST --worker_hosts=$PAI_TASK_ROLE_worker_HOST_LIST --job_name=ps --task_index=$PAI_CURRENT_TASK_ROLE_CURRENT_TASK_INDEX"
    },
    {
      "name": "worker",
      "taskNumber": 2,
      "cpuNumber": 2,
      "memoryMB": 32768,
      "gpuNumber": 1,
      "command": "cd code && python train.py --data_dir=$PAI_DATA_DIR --output_dir=$PAI_OUTPUT_DIR --num_gpus=1 --ps_hosts=$PAI_TASK_ROLE_ps_server_HOST_LIST --worker_hosts=$PAI_TASK_ROLE_worker_HOST_LIST --job_name=worker --task_index=$PAI_CURRENT_TASK_ROLE_CURRENT_TASK_INDEX"
    }
  ],
  "dataDir": "$PAI_DEFAULT_FS_URI/temp_mnist/data/",
  "outputDir": "$PAI_DEFAULT_FS_URI/temp_mnist/output/",
  "codeDir": "$PAI_DEFAULT_FS_URI/temp_mnist/code/"
}

Error log:

 Log Type: YarnContainerDebug.log

Log Upload Time: Wed Jun 05 08:27:30 +0000 2019

Log Length: 52917

Showing 4096 bytes of 52917 total. Click here for the full log.

+[08:27:24] PAI_CONTAINER_HOST_IP=192.168.11.203
+[08:27:24] PAI_CONTAINER_HOST_PORT_LIST='http:25367;ssh:25368;'
+[08:27:24] PAI_CONTAINER_ID=container_e02_1559722912879_0001_01_000002
+[08:27:24] PAI_JOB_NAME=lmq~distribute_train_mninst
+[08:27:24] PAI_USER_NAME=lmq
+[08:27:24] PAI_DEFAULT_FS_URI=hdfs://192.168.11.202:9000
+[08:27:24] PAI_TASK_ROLE_COUNT=2
+[08:27:24] PAI_TASK_ROLE_LIST=ps_server,worker
+[08:27:24] PAI_RESOURCE=0,2,32768,64
+[08:27:24] PAI_MIN_FAILED_TASK_COUNT_ps_server=1
+[08:27:24] PAI_MIN_SUCCEEDED_TASK_COUNT_ps_server=
+[08:27:24] PAI_CURRENT_TASK_ROLE_NAME=ps_server
+[08:27:24] PAI_CURRENT_TASK_ROLE_CURRENT_TASK_INDEX=0
+[08:27:24] PAI_CONTAINER_HOST_http_PORT_LIST=25367
+[08:27:24] PAI_CONTAINER_HOST_ssh_PORT_LIST=25368
+[08:27:24] PAI_CONTAINER_HOST_PORT=25367
+[08:27:24] PAI_CONTAINER_SSH_PORT=25368
+[08:27:24] PAI_HOST_IP_ps_server_0=192.168.11.203
+[08:27:24] PAI_PORT_LIST_ps_server_0_http=25367
+[08:27:24] PAI_ps_server_0_http_PORT=25367
+[08:27:24] PAI_PORT_LIST_ps_server_0_ssh=25368
+[08:27:24] PAI_ps_server_0_ssh_PORT=25368
+[08:27:24] PAI_TASK_ROLE_TASK_COUNT_ps_server=1
+[08:27:24] PAI_TASK_ROLE_ps_server_HOST_LIST=192.168.11.203:25367
+[08:27:24] PAI_HOST_IP_worker_0=192.168.11.201
+[08:27:24] PAI_PORT_LIST_worker_0_http=19693
+[08:27:24] PAI_worker_0_http_PORT=19693
+[08:27:24] PAI_PORT_LIST_worker_0_ssh=19694
+[08:27:24] PAI_worker_0_ssh_PORT=19694
+[08:27:24] PAI_HOST_IP_worker_1=192.168.11.203
+[08:27:24] PAI_PORT_LIST_worker_1_http=9705
+[08:27:24] PAI_worker_1_http_PORT=9705
+[08:27:24] PAI_PORT_LIST_worker_1_ssh=9706
+[08:27:24] PAI_worker_1_ssh_PORT=9706
+[08:27:24] PAI_TASK_ROLE_TASK_COUNT_worker=2
+[08:27:24] PAI_TASK_ROLE_worker_HOST_LIST=192.168.11.201:19693,192.168.11.203:9705
+[08:27:24] PAI_CURRENT_CONTAINER_IP=192.168.11.203
+[08:27:24] PAI_TASK_ROLE_INDEX=0
+[08:27:24] PAI_USERNAME=lmq
+[08:27:24] PAI_DATA_DIR=hdfs://192.168.11.202:9000/temp_mnist/data/
+[08:27:24] PAI_OUTPUT_DIR=hdfs://192.168.11.202:9000/temp_mnist/output/
+[08:27:24] PAI_CODE_DIR=hdfs://192.168.11.202:9000/temp_mnist/code/
+[08:27:24] PAI_TASK_ROLE_NAME=ps_server
+[08:27:24] PAI_TASK_ROLE_NUM=1
+[08:27:24] PAI_CURRENT_TASK_ROLE_TASK_COUNT=1
+[08:27:24] PAI_TASK_CPU_NUM=2
+[08:27:24] PAI_CURRENT_TASK_ROLE_CPU_COUNT=2
+[08:27:24] PAI_TASK_MEM_MB=32768
+[08:27:24] PAI_CURRENT_TASK_ROLE_MEM_MB=32768
+[08:27:24] PAI_TASK_GPU_NUM=0
+[08:27:24] PAI_CURRENT_TASK_ROLE_GPU_COUNT=0
+[08:27:24] PAI_CURRENT_TASK_ROLE_SHM_MB=64
+[08:27:24] PAI_CURRENT_TASK_ROLE_MIN_FAILED_TASK_COUNT=1
+[08:27:24] PAI_CURRENT_TASK_ROLE_MIN_SUCCEEDED_TASK_COUNT=
+[08:27:24] PAI_TASKS_NUM=3
+[08:27:24] PAI_JOB_TASK_COUNT=3
+[08:27:24] PAI_TASK_ROLES_NUM=2
+[08:27:24] PAI_JOB_TASK_ROLE_COUNT=2
+[08:27:24] PAI_TASK_ROLE_LIST=ps_server,worker
+[08:27:24] PAI_JOB_TASK_ROLE_LIST=ps_server,worker
+[08:27:24] PAI_CURRENT_CONTAINER_PORT=25367
+[08:27:24] bootstrap_dir=tmp/pai-root/bootstrap
+[08:27:24] mkdir -p tmp/pai-root/bootstrap
+[08:27:24] hdfs dfs -get hdfs://192.168.11.202:9000/Container/lmq/lmq~distribute_train_mninst/DockerContainerScripts/0.sh tmp/pai-root/bootstrap/docker_bootstrap.sh
+[08:27:27] code_dir=tmp/pai-root/code
+[08:27:27] mkdir -p tmp/pai-root/code
+[08:27:27] [[ -n hdfs://192.168.11.202:9000/temp_mnist/code/ ]]
+[08:27:27] hdfs dfs -stat hdfs://192.168.11.202:9000/temp_mnist/code/
+[08:27:28] echo 'Can not stat hdfs://192.168.11.202:9000/temp_mnist/code/'
+[08:27:28] exit 1
+[08:27:28] exit_handler
+[08:27:28] rc=1
+[08:27:28] printf '[DEBUG] Performing clean up action...\n'
+[08:27:28] [[ 1 -eq 125 ]]
+[08:27:28] [[ '' != true ]]
+[08:27:28] [[ 1 -eq 143 ]]
+[08:27:28] [[ 1 -eq 137 ]]
+[08:27:28] printf '[DEBUG] Write exit code 1 to file /var/lib/hadoopdata/nm-local-dir/nmPrivate/application_1559722912879_0001/container_e02_1559722912879_0001_01_000002/container_e02_1559722912879_0001_01_000002.pid.exitcode.\n'
+[08:27:28] echo 1
++[08:27:28] docker inspect '--format={{.State.Pid}}' lmq-distribute_train_mninst-container_e02_1559722912879_0001_01_000002
+[08:27:28] pid=
+[08:27:28] [[ -n '' ]]
+[08:27:28] exit 1


Log Type: stderr

Log Upload Time: Wed Jun 05 08:27:30 +0000 2019

Log Length: 873

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100  6171  100  6171    0     0   677k      0 --:--:-- --:--:-- --:--:--  677k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 11853  100 11853    0     0   894k      0 --:--:-- --:--:-- --:--:--  894k
stat: `hdfs://192.168.11.202:9000/temp_mnist/code/': No such file or directory


Log Type: stdout

Log Upload Time: Wed Jun 05 08:27:30 +0000 2019

Log Length: 405

[INFO] GPU_ID


[INFO] NVIDIA_DEVICES


[WARNING] Failed to request info from webhdfs, sleep 20 s ...
Can not stat hdfs://192.168.11.202:9000/temp_mnist/code/
[DEBUG] Performing clean up action...
[DEBUG] Write exit code 1 to file /var/lib/hadoopdata/nm-local-dir/nmPrivate/application_1559722912879_0001/container_e02_1559722912879_0001_01_000002/container_e02_1559722912879_0001_01_000002.pid.exitcode

leonfg avatar Jun 06 '19 01:06 leonfg

@leonfg - could you please fill in more information for us to get a fully understand of the issue?

Organization Name:

Short summary about the issue/question:

Brief what process you are following:

How to reproduce it:

OpenPAI Environment:

OpenPAI version:
Cloud provider or hardware configuration:
OS (e.g. from /etc/os-release):
Kernel (e.g. uname -a):
Hardware (e.g. core number, memory size, storage size, GPU type etc.):
Others:

Anything else we need to know:

scarlett2018 avatar Jun 10 '19 02:06 scarlett2018

@leonfg We'd appreciate that if you provide more information as @scarlett2018 mentioned. Please also check your HDFS Datanodes and see if there is anything abnormal, you can use webhdfs for more information:

<your ip for PAI>/webhdfs

You can find logs in Utilities->Logs

wangdian avatar Jun 10 '19 03:06 wangdian

Hi everyone this problem never reappear until that day.

leonfg avatar Jun 17 '19 00:06 leonfg