Skip to content

msgchan: fix deadlock#1858

Merged
BareosBot merged 3 commits intobareos:masterfrom
sebsura:dev/ssura/master/fix-deadlock
Jul 29, 2024
Merged

msgchan: fix deadlock#1858
BareosBot merged 3 commits intobareos:masterfrom
sebsura:dev/ssura/master/fix-deadlock

Conversation

@sebsura
Copy link
Contributor

@sebsura sebsura commented Jun 17, 2024

We called a function that locks the jcr while we a already held the lock, which causes a deadlock. This commit fixes this by offering an alternative function which does no locking.

Thank you for contributing to the Bareos Project!

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Required backport PRs have been created
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR

@sebsura sebsura self-assigned this Jun 21, 2024
@arogge arogge self-requested a review June 25, 2024 10:05
@arogge arogge added this to the 24.0.0 milestone Jun 25, 2024
Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might have a slightly nicer approach, what do you think?

@sebsura sebsura force-pushed the dev/ssura/master/fix-deadlock branch from 6b90ef9 to 16aa75a Compare July 8, 2024 08:14
@sebsura sebsura requested a review from arogge July 8, 2024 08:14
@sebsura
Copy link
Contributor Author

sebsura commented Jul 8, 2024

Added the changes you suggested.

@arogge arogge added the bug This addresses a bug label Jul 25, 2024
@arogge arogge force-pushed the dev/ssura/master/fix-deadlock branch from 16aa75a to 2df077c Compare July 25, 2024 08:23
@sebsura sebsura mentioned this pull request Jul 29, 2024
7 tasks
sebsura and others added 3 commits July 29, 2024 07:14
We called a function that locks the jcr while we a already held the
lock, which causes a deadlock.  This commit fixes this by offering an
alternative function which does no locking.
The label prevented reruns from working
@BareosBot BareosBot force-pushed the dev/ssura/master/fix-deadlock branch from 9aa266f to 0422a72 Compare July 29, 2024 07:14
@BareosBot BareosBot merged commit 8ac7838 into bareos:master Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This addresses a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Jobs often stuck at fatal error state causing issues on both SD and Dir, do not get rescheduled and cannot be cancelled

3 participants