Project

Profile

Help

Issue #8986

closed

Double-Crtl-C to pulpcore-worker does not stop subprocess handling task

Added by bmbouter about 1 year ago. Updated about 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 100
Quarter:

Description

To reproduce

  1. Have pulpcore==3.14 with the new-style tasking system and pulp_file
  2. Add a sleep(60) statement to the sync task for pulp_file
  3. Start the api and content app, I used sudo systemctl start pulpcore-content pulpcore-api
  4. Start the pulpcore-worker interactively using pulpcore-worker
  5. Start a sync and watch it take a while on the sync due to the sleep(60)
  6. Send one Ctrl-C and then another
  7. Observe the pulpcore-worker exit immediately after the second Ctrl-C
  8. Wait 1-2 minutes watching that tty
  9. Observe even after the parent process exits, a message like: pulp [81a75ff321a8452393384660c20dba0f]: pulpcore.tasking.pulpcore_worker:INFO: Task completed a7dca11f-5555-4725-95d0-7b768b460fe4

Also note that if you look at the sync task before issuing the Ctrl-Cs it'll show running because it's halted at sleep(60) and no progress reports were made. After the logging statement is emitted, it will show progress reports and completed.


Related issues

Copied to Pulp - Backport #9086: Backport #8986 "Double-Crtl-C to pulpcore-worker does not stop subprocess handling task" to 3.14.zCLOSED - CURRENTRELEASEmdellweg

Actions
Actions #1

Updated by bmbouter about 1 year ago

  • Severity changed from 2. Medium to 3. High
Actions #2

Updated by dkliban@redhat.com about 1 year ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 100
Actions #3

Updated by dkliban@redhat.com about 1 year ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to mdellweg
Actions #4

Updated by pulpbot about 1 year ago

  • Status changed from ASSIGNED to POST
Actions #5

Updated by dalley about 1 year ago

  • Copied to Backport #9086: Backport #8986 "Double-Crtl-C to pulpcore-worker does not stop subprocess handling task" to 3.14.z added
Actions #6

Updated by dalley about 1 year ago

  • Sprint/Milestone set to 3.15.0

Added by mdellweg about 1 year ago

Revision 80d7d6d8

Fixed non-gracefully shutting down workers

When hitting ctrl-c twice, workers should also kill their supervised tasks. And shut them down.

fixes #8986 https://pulp.plan.io/issues/8986

Actions #7

Updated by mdellweg about 1 year ago

  • Status changed from POST to MODIFIED
Actions #8

Updated by pulpbot about 1 year ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF