Skip to content

Conversation

taka-oyama
Copy link
Collaborator

@taka-oyama taka-oyama commented Dec 8, 2023

Coming from googleapis/google-cloud-php#6703 (comment)

Auth does not lock the cache file, so it's possible for a race condition to occur.

Below is an example of how that may happen.

  1. Process 1: Auth opens cache
  2. Process 2: Session Pool opens cache
  3. Process 2: Session Pool creates a session and saves (file is written)
  4. Process 1: Auth writes to cache (file is overwritten and session created at 3. no longer exists in cache)
  • CHANGELOG

Must be backported to 6.0.

@taka-oyama taka-oyama added the bug Something isn't working label Dec 8, 2023
@taka-oyama taka-oyama added this to the 6.1 milestone Dec 8, 2023
@taka-oyama taka-oyama self-assigned this Dec 8, 2023
taka-oyama and others added 3 commits December 11, 2023 13:07
@taka-oyama taka-oyama merged commit ab974df into master Dec 11, 2023
@taka-oyama taka-oyama deleted the fix/cache-race-condition branch December 11, 2023 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants