Project

Profile

Help

Issue #8986

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

Added by bmbouter 3 months ago. Updated 28 days 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 - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 80d7d6d8 View on GitHub
Added by mdellweg 2 months ago

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

History

#1 Updated by bmbouter 3 months ago

  • Severity changed from 2. Medium to 3. High

#2 Updated by dkliban@redhat.com 2 months ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 100

#3 Updated by dkliban@redhat.com 2 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to mdellweg

#4 Updated by pulpbot 2 months ago

  • Status changed from ASSIGNED to POST

#5 Updated by dalley 2 months ago

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

#6 Updated by dalley 2 months ago

  • Sprint/Milestone set to 3.15.0

#7 Updated by mdellweg 2 months ago

  • Status changed from POST to MODIFIED

#8 Updated by pulpbot 28 days ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF