Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf/5736~1
Choose a base ref
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf/5736
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on May 19, 2025

  1. Fix a race condition in ConditionVariableTimedSleep()

    A process could exit ConditionVariableTimedSleep() after detecting a state
    change (cv != cv_sleep_target) without being removed from the list.
    
    When ConditionVariableTimedSleep() detects that the process is no longer
    in the wait list (could be signaled by ConditionVariableSignal() or
    ConditionVariableBroadcast()), it re-adds itself to ensure that we don't miss
    any additional wakeup.
    
    The issue is that it could leave ConditionVariableTimedSleep() with cv_sleep_target
    set to NULL and the process re-added in the wait list.
    
    If cv_sleep_target is set to NULL then subsequent calls to ConditionVariableCancelSleep()
    will return early without removing the process from any list.
    
    This could to an assertion failure when the process later tries to wait on a
    condition variable, as ConditionVariablePrepareToSleep() skips cleanup
    when cv_sleep_target is NULL, resulting in a process trying to be in two wait
    lists simultaneously.
    
    The fix re-assigns cv_sleep_target to cv and then ensures that cv_sleep_target
    accurately describes which condition variable we’re prepared to wait on.
    bdrouvotAWS authored and Commitfest Bot committed May 19, 2025
    Configuration menu
    Copy the full SHA
    9a4f49e View commit details
    Browse the repository at this point in the history
  2. [CF 5736] v1 - Fix a race condition in ConditionVariableTimedSleep()

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5736
    
    The branch will be overwritten each time a new patch version is posted to
    the thread, and also periodically to check for bitrot caused by changes
    on the master branch.
    
    Patch(es): https://www.postgresql.org/message-id/aBhuTqNhMN3prcqe@ip-10-97-1-34.eu-west-3.compute.internal
    Author(s): Bertrand Drouvot
    Commitfest Bot committed May 19, 2025
    Configuration menu
    Copy the full SHA
    7324b2e View commit details
    Browse the repository at this point in the history
Loading