| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
❌ Integration test FAILEDRequested by @dconeybe on commit 26e918b
Add flaky tests to go/fpl-cpp-flake-tracker |
Sorry, something went wrong.
| // Return failure, since the timeout expired. | ||
| return false; | ||
| case EINVAL: | ||
| assert("sem_timedwait() failed with EINVAL" == 0); |
There was a problem hiding this comment.
Just making sure, you want this to NOT actually assert in release builds, yes? (the default assert behavior?)
Sorry, something went wrong.
| #else // not windows and not mac - should be Linux. | ||
| timespec t = internal::MsToAbsoluteTimespec(milliseconds); | ||
| return sem_timedwait(semaphore_, &t) == 0; | ||
| while (true) { |
There was a problem hiding this comment.
Would it be possible to add a test exercising this failure/fix to semaphore_test.cc? (Or, even better, does re-enabling the disabled MultithreadedStressTest in that file now work?)
Sorry, something went wrong.
There was a problem hiding this comment.
I'll take a look.
Sorry, something went wrong.
Sorry, something went wrong.
|
Vindication! One of the nightly test runs failed with this assertion failure: semaphore.h:189: bool firebase::Semaphore::TimedWait(int): Assertion `"sem_timedwait() failed with EINVAL" == 0' failed. https://github.com/firebase/firebase-cpp-sdk/runs/7338303645 According to https://linux.die.net/man/3/sem_timedwait, EINVAL occurs in one of two cases:
|
Sorry, something went wrong.
…s with the TimedWait() fix in #1021
| Back | FazBrowse Home | New Git URL |
This fixes a latent bug where Future::Wait(int timeout_milliseconds) would occasionally return prematurely, when neither the timeout had expired nor the Future been completed. This was due to the implementation of Semaphore::TimedWait(int milliseconds) which calls sem_timedwait() on Linux and Android and neglected to check if the errno was EINTR, in which case the wait should be restarted.
This bug surfaced as the integration tests for Firestore's TransactionTest.TestMaxAttempts flakily failing due to a call to Future.Await(int timeout_milliseconds) returning as if it had timed out when, in fact, no timeout had occurred.
Note that this fix only affects Linux and Android (which runs Linux under the hood).