broadinstitute / cromwell

Scientific workflow engine designed for simplicity & scalability. Trivially transition between one off use cases to massive scale production environments
http://cromwell.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
993 stars 360 forks source link

Passing an empty string to a File input leaves a job hanging indefinitely #2278

Open helgridly opened 7 years ago

helgridly commented 7 years ago

Seen on Cromwell 26-c14e64d. Reported to us as GAWB-1867.

Here's a WDL:

task HelloTask
    {
    File InFile
    command
        {
        echo "A file is here !" ;
        echo "Here is the ls" ;
        ls -alh * 
        ls -alht ${InFile} 
        head ${InFile}
        }
    output
        {
        }
    meta {author : "Eddie Salinas"}
    runtime { docker: "eddiebroad/public_test_dsdeepb_2332" }
    }

workflow HelloWorkflow
    {
    File InFile
    call HelloTask
         {
        input:InFile=InFile
        }
    }

If I accidentally pass an empty string to the input, the job stays running indefinitely:

{
  "workflowName": "HelloWorkflow",
  "submittedFiles": {
    "inputs": "{\"HelloWorkflow.InFile\":\"\"}",
    "workflow": "task HelloTask\n\t{\n\tFile InFile\n\tcommand\n\t\t{\n\t\techo \"A file is here !\" ;\n\t\techo \"Here is the ls\" ;\n\t\tls -alh * \n\t\tls -alht ${InFile} \n\t\thead ${InFile}\n\t\t}\n\toutput\n\t\t{\n\t\t}\n \tmeta {author : \"Eddie Salinas\"}\n\truntime { docker: \"eddiebroad/public_test_dsdeepb_2332\" }\n\t}\n\t\nworkflow HelloWorkflow\n\t{\n\tFile InFile\n\tcall HelloTask\n\t\t {\n\t\tinput:InFile=InFile\n\t\t}\n\t}",
    "options": "{\n  \"default_runtime_attributes\": {\n    \"zones\": \"us-central1-b us-central1-c us-central1-f\"\n  },\n  \"google_project\": \"broad-dsde-dev\",\n  \"auth_bucket\": \"gs://cromwell-auth-broad-dsde-dev\",\n  \"refresh_token\": \"cleared\",\n  \"final_workflow_log_dir\": \"gs://fc-463a83e5-a9b2-49bc-b9d2-0024e9b1afe6/bb61413a-3e29-44d1-beaa-5bbdd8cc711c/workflow.logs\",\n  \"account_name\": \"obamacloud@gmail.com\",\n  \"jes_gcs_root\": \"gs://fc-463a83e5-a9b2-49bc-b9d2-0024e9b1afe6/bb61413a-3e29-44d1-beaa-5bbdd8cc711c\",\n  \"read_from_cache\": true\n}"
  },
  "calls": {
    "HelloWorkflow.HelloTask": [{
      "preemptible": false,
      "executionStatus": "Running",
      "stdout": "gs://fc-463a83e5-a9b2-49bc-b9d2-0024e9b1afe6/bb61413a-3e29-44d1-beaa-5bbdd8cc711c/HelloWorkflow/f5c59dc3-fb98-42d9-9dbf-e9305d8e8793/call-HelloTask/HelloTask-stdout.log",
      "shardIndex": -1,
      "jes": {
        "executionBucket": "gs://cromwell-dev/cromwell-executions",
        "endpointUrl": "https://genomics.googleapis.com/",
        "googleProject": "broad-dsde-dev"
      },
      "runtimeAttributes": {
        "preemptible": "0",
        "failOnStderr": "false",
        "bootDiskSizeGb": "10",
        "disks": "local-disk 10 SSD",
        "continueOnReturnCode": "0",
        "docker": "eddiebroad/public_test_dsdeepb_2332@sha256:7ce5d574aa6a54318e75fc7adbaeda03ff60bc110464525540a751dd99e241fa",
        "cpu": "1",
        "noAddress": "false",
        "zones": "us-central1-b,us-central1-c,us-central1-f",
        "memory": "2 GB"
      },
      "callCaching": {
        "allowResultReuse": false,
        "effectiveCallCachingMode": "CallCachingOff",
        "result": "Cache Miss: You are using a floating docker tag in this task. Cromwell does not consider tasks with floating tags to be eligible for call caching.\nIf you want this task to be eligible for call caching in the future, use a docker runtime attribute with a digest instead.\nThis is the exact docker image that was used for this job: eddiebroad/public_test_dsdeepb_2332@sha256:7ce5d574aa6a54318e75fc7adbaeda03ff60bc110464525540a751dd99e241fa\nYou can replace the docker runtime attribute in your task with the above value to make this task eligible for call caching.",
        "hit": false
      },
      "inputs": {
        "InFile": ""
      },
      "backend": "JES",
      "stderr": "gs://fc-463a83e5-a9b2-49bc-b9d2-0024e9b1afe6/bb61413a-3e29-44d1-beaa-5bbdd8cc711c/HelloWorkflow/f5c59dc3-fb98-42d9-9dbf-e9305d8e8793/call-HelloTask/HelloTask-stderr.log",
      "callRoot": "gs://fc-463a83e5-a9b2-49bc-b9d2-0024e9b1afe6/bb61413a-3e29-44d1-beaa-5bbdd8cc711c/HelloWorkflow/f5c59dc3-fb98-42d9-9dbf-e9305d8e8793/call-HelloTask",
      "attempt": 1,
      "backendLogs": {
        "log": "gs://fc-463a83e5-a9b2-49bc-b9d2-0024e9b1afe6/bb61413a-3e29-44d1-beaa-5bbdd8cc711c/HelloWorkflow/f5c59dc3-fb98-42d9-9dbf-e9305d8e8793/call-HelloTask/HelloTask.log"
      },
      "start": "2017-05-17T18:00:17.932Z"
    }]
  },
  "outputs": {

  },
  "workflowRoot": "gs://fc-463a83e5-a9b2-49bc-b9d2-0024e9b1afe6/bb61413a-3e29-44d1-beaa-5bbdd8cc711c/HelloWorkflow/f5c59dc3-fb98-42d9-9dbf-e9305d8e8793/",
  "id": "f5c59dc3-fb98-42d9-9dbf-e9305d8e8793",
  "inputs": {
    "HelloWorkflow.InFile": ""
  },
  "submission": "2017-05-17T18:00:00.844Z",
  "status": "Running",
  "start": "2017-05-17T18:00:15.104Z"
}
Horneth commented 7 years ago

@jsotobroad Is this fixed by your double quote fix ?

jsotobroad commented 7 years ago

Yes this would be in the same bag that causes JesRunCreation to fail