Skip to content

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

Merged
BareosBot merged 2 commits intobareos:bareos-25from
sebsura:backport/bareos-25/fix-fd-spurious-wakeups-rc
Jan 22, 2026
Merged

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

Conversation

@sebsura
Copy link
Contributor

@sebsura sebsura commented Jan 21, 2026

Backport of PR #2508 to bareos-25

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 25 This is a backport from master to bareos-25 labels Jan 21, 2026
@pstorz pstorz self-assigned this Jan 21, 2026
@pstorz pstorz self-requested a review January 21, 2026 09:56
@pstorz pstorz added this to the 25.0.2 milestone Jan 21, 2026
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-25/fix-fd-spurious-wakeups-rc branch from 811cf9a to 3c01411 Compare January 21, 2026 11:52
thvorr and others added 2 commits January 22, 2026 08:18
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-25/fix-fd-spurious-wakeups-rc branch from 7c26da8 to b5d5ff4 Compare January 22, 2026 08:18
@BareosBot BareosBot merged commit eb042fd into bareos:bareos-25 Jan 22, 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 25 This is a backport from master to bareos-25

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants