Skip to content

core/filed: fix spurious wakeups race condition in filed.#2514

Merged
BareosBot merged 2 commits intobareos:bareos-24from
sebsura:backport/bareos-24/fix-fd-spurious-wakeups-rc
Feb 3, 2026
Merged

core/filed: fix spurious wakeups race condition in filed.#2514
BareosBot merged 2 commits intobareos:bareos-24from
sebsura:backport/bareos-24/fix-fd-spurious-wakeups-rc

Conversation

@sebsura
Copy link
Contributor

@sebsura sebsura commented Jan 21, 2026

Backport of PR #2508 to bareos-24

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
  • Correct milestone is set
Source code quality (if there were changes to the original PR)
  • 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

Backport quality

@sebsura sebsura added bug This addresses a bug is a backport to 24 labels Jan 21, 2026
@pstorz pstorz self-assigned this Jan 21, 2026
@pstorz pstorz self-requested a review January 21, 2026 09:56
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

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

Looks good!

@pstorz pstorz added this to the 24.0.9 milestone Jan 21, 2026
@pstorz pstorz self-requested a review January 21, 2026 10:00
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

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

Looks good!

@sebsura sebsura force-pushed the backport/bareos-24/fix-fd-spurious-wakeups-rc branch from bbfb8db to a41ded8 Compare January 21, 2026 11:53
thvorr and others added 2 commits February 3, 2026 11:12
This patch fixes a race condition in filed due to spurious wakeups.

Without this fix, a thread waiting on the compute_fin condition
variable may wake up spuriously immediately after the lock counter
is decremented but before notify_one() is called. In that window,
the thread can bail out prematurely, which later leads to a
segmentation fault when the other thread calls notify_one().

(cherry picked from commit 2fcf4c2)
@BareosBot BareosBot force-pushed the backport/bareos-24/fix-fd-spurious-wakeups-rc branch from 7420bb4 to 5663fd9 Compare February 3, 2026 11:12
@BareosBot BareosBot merged commit 25086fe into bareos:bareos-24 Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This addresses a bug is a backport to 24

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants