question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dsub 0.4.3 crashes on ubuntu 20.04

See original GitHub issue

When I run the hello world example

dsub \
   --provider local \
   --logging "${TMPDIR:-/tmp}/dsub-test/logging/" \
   --output OUT="${TMPDIR:-/tmp}/dsub-test/output/out.txt" \
   --command 'echo "Hello World" > "${OUT}"' \
   --wait

it crashes as follows:

***WARNING: No Docker image specified. The default, `ubuntu:14.04` will be used.
***WARNING: For reproducible pipelines, specify an image with the `--image` flag.
Job properties:
  job-id: echo--hylke--201220-165144-45
  job-name: echo
  user-id: hylke
Launched job-id: echo--hylke--201220-165144-45
To check the status, run:
  dstat --provider local --jobs 'echo--hylke--201220-165144-45' --users 'hylke' --status '*'
To cancel the job, run:
  ddel --provider local --jobs 'echo--hylke--201220-165144-45' --users 'hylke'
Waiting for job to complete...
Waiting for: echo--hylke--201220-165144-45.
Traceback (most recent call last):
  File "/home/hylke/.local/bin/dsub", line 8, in <module>
    sys.exit(main())
  File "/home/hylke/.local/lib/python3.8/site-packages/dsub/commands/dsub.py", line 1106, in main
    dsub_main(prog, argv)
  File "/home/hylke/.local/lib/python3.8/site-packages/dsub/commands/dsub.py", line 1091, in dsub_main
    launched_job = run_main(args)
  File "/home/hylke/.local/lib/python3.8/site-packages/dsub/commands/dsub.py", line 1168, in run_main
    return run(
  File "/home/hylke/.local/lib/python3.8/site-packages/dsub/commands/dsub.py", line 1322, in run
    error_messages = _wait_after(provider, [job_metadata['job-id']],
  File "/home/hylke/.local/lib/python3.8/site-packages/dsub/commands/dsub.py", line 786, in _wait_after
    jobs_left = _wait_for_any_job(provider, job_ids_to_check, poll_interval,
  File "/home/hylke/.local/lib/python3.8/site-packages/dsub/commands/dsub.py", line 1015, in _wait_for_any_job
    tasks = provider.lookup_job_tasks({'*'}, job_ids=job_ids)
  File "/home/hylke/.local/lib/python3.8/site-packages/dsub/providers/local.py", line 519, in lookup_job_tasks
    task = self._get_task_from_task_dir(j, u, task_id, task_attempt)
  File "/home/hylke/.local/lib/python3.8/site-packages/dsub/providers/local.py", line 669, in _get_task_from_task_dir
    end_time = self._get_end_time_from_task_dir(task_dir)
  File "/home/hylke/.local/lib/python3.8/site-packages/dsub/providers/local.py", line 583, in _get_end_time_from_task_dir
    datetime.datetime.strptime(f.readline().strip(),
  File "/usr/lib/python3.8/_strptime.py", line 568, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/usr/lib/python3.8/_strptime.py", line 349, in _strptime
    raise ValueError("time data %r does not match format %r" %
ValueError: time data '' does not match format '%Y-%m-%d %H:%M:%S.%f

Any ideas how to get the Hello World example to work?

Versions: dsub: 0.4.3 Ubuntu: 20.04 Python: 3.8.5 Docker: 19.03.11

Thanks,

Hylke

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
wnojopracommented, Jan 4, 2021

I’m happy to see you were able to get it working. I am not familiar with snap, but it looks like the way it containerizes docker prevents it from accessing /tmp. I can’t think of a workaround with dsub other than to use the apt package of docker as you have done.

On our end we’ll update the documentation to make this clear, and provider better error handling in the local provider.

0reactions
hylkedonkercommented, Dec 30, 2020

It seems that the problem is indeed related to Docker, which does not like the /tmp folder. For example, this does not work

$ docker run \
   --env-file=/tmp/docker.env \
   "ubuntu:14.04"
docker: open /tmp/docker.env: no such file or directory.
See 'docker run --help'.

But if I copy /tmp/docker.env to my $HOME folder, it works okay:

$ docker run \
   --env-file=$HOME/docker.env \
   "ubuntu:14.04"
$

Solution: I removed the snap Docker package

sudo snap remove docker

and installed the apt Docker package instead (after adding the Docker apt repository)

sudo apt-get install docker-ce docker-ce-cli containerd.io

Now it seems to be working as expected (I am now running Docker version 20.10.1, build 831ebea):

$ dsub \                
   --provider local \
   --logging "${TMPDIR:-/tmp}/dsub-test/logging/" \
   --output OUT="${TMPDIR:-/tmp}/dsub-test/output/out.txt" \
   --command 'echo "Hello World" > "${OUT}"' \
   --wait
***WARNING: No Docker image specified. The default, `ubuntu:14.04` will be used.
***WARNING: For reproducible pipelines, specify an image with the `--image` flag.
Job properties:
  job-id: echo--hylke--201230-204230-26
  job-name: echo
  user-id: hylke
Launched job-id: echo--hylke--201230-204230-26
To check the status, run:
  dstat --provider local --jobs 'echo--hylke--201230-204230-26' --users 'hylke' --status '*'
To cancel the job, run:
  ddel --provider local --jobs 'echo--hylke--201230-204230-26' --users 'hylke'
Waiting for job to complete...
Waiting for: echo--hylke--201230-204230-26.
  echo--hylke--201230-204230-26: SUCCESS
echo--hylke--201230-204230-26
Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I tell why 20.04 is crashing?
1 Answer 1 · boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode · open a terminal window by pressing Ctrl +...
Read more >
RStudio crashes on Ubuntu 20.04 · Issue #6782
System details RStudio Edition : Desktop RStudio Version : 1.2.5042 / 1.4.285 OS Version : Ubuntu 20.04 R Version : 4.0.0 (2020-04-24) Steps ......
Read more >
Late payment causes software crash in Ubuntu 20.04
Background: Problem seems to have been triggered when a Ubuntu System update (libwebkit-gtk) was installed mid September. As this was a security ...
Read more >
Wireshark crashes on startup on Ubuntu 20.04 (#17405) · Issues
Wireshark crashes on start. This happens when installed from apt or built from source (I also tried purging and re-installing), ...
Read more >
How to Fix Fallout 3 Crashing on Launch After Steam Update ...
A few of you have been having crashing issues with Fallout 3 when clicking "play" on the launcher after the recent Steam update, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found