galaxyproject / galaxyproject/galaxy

Interrupted Celery set_meta causes stuck non-terminal jobs

Open
#20,186 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.9k
Forks
1.2k
Avg merge
2d 16h
Merged PRs (30d)
169

Description

**Describe the bug**
I am testing out `metadata_strategy: directory_celery` and discovered that if Celery is OOM killed, nothing is recovered upon restart and the job will remain permanently non-terminal.

Also, perhaps minor, but there is no log message for dispatching celery set_meta jobs like there is for traditional set_meta jobs, so it's very hard to tell what happened. The last message you will see in the logs related to your non-terminal job doesn't help lead you to where it died.

**Galaxy Version and/or server at which you observed the bug**
Galaxy Version: 24.2.4.dev0
Commit: d21023f8fb4c3562e4cbe29ee0bc0dbd99488036

**Browser and Operating System**
Operating System: N/A
Browser: N/A

**To Reproduce**
Steps to reproduce the behavior:
1. Set `metadata_strategy: directory_celery`
2. Run a job
3. Kill celery while set_meta is running

**Expected behavior**
State is preserved and recovered across restarts, even if just to return failure.

**Screenshots**
N/A

**Additional context**
N/A

Contributor guide

Open the contributing guide

Research direction

Start by tracing the metadata_strategy: directory_celery path and the Celery set_meta dispatch and restart handling. Reproduce the failure by killing Celery during set_meta, then verify that state is preserved and recovered across restart, at least by returning failure, and that dispatching produces a useful log message.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.