Repository navigation
Stop test apps' background threads, and floor pillow-heif at 1.2.1 - #218
Merged
Merged
Conversation
create_app starts a snapshot loop, and an ingest through the app starts the Find similar indexer. Nothing ever stopped either in a test, so a full run carried them into every later test: by the test_pipeline ingest tests, 82 snapshot loops and six indexers were alive. On macOS with a numpy built on OpenBLAS, a job forking the video worker while a leftover indexer was inside a threaded OpenBLAS call deadlocked in OpenBLAS's fork handler with the GIL held, and the run never finished. With numpy on Accelerate it finished, but reached 145 threads and 3.3 GB on the way, and seven snapshot loops died on cases closed under them. - state["shutdown"]() stops the snapshot loop and the indexer and waits for both. The case stays open. - The indexer waits on its stop event instead of sleeping, so a stop no longer waits out up to two seconds. - The snapshot loop skips a case closed while the app still holds it, instead of ending on ProgrammingError. - tests/conftest.py wraps create_app (and gleapp.desktop's own import of it), shuts every app down at teardown, and fails a test that leaves either thread running. Co-Authored-By: Claude Opus 5.5 <[email protected]>
On macOS, pillow-heif below 1.2.1 segfaults while encoding a HEIF once OpenCV has been imported: both bundle an x265, and pillow-heif's weak rdoQuant symbols bind to OpenCV's copy. In a full run an earlier test has always loaded cv2, so the HEIC LAVA test crashed there and passed alone. The old floor, 1.0, still admitted affected releases (1.0.0 through 1.2.0). Upstream fixed it in 1.2.1. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Two cross-platform notes with their measurements: pillow-heif below 1.2.1 crashing on macOS once OpenCV is loaded, and the suite's app threads that outlived their tests and deadlocked a fork on OpenBLAS. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The first version of the snapshot-loop test closed a case while the loop, polling every 0.02 s, was inside get_meta on the same connection. get_meta holds CaseDB.lock and close() did not, and the Linux CI job segfaulted. close() now takes the lock, so it waits for a query in flight, and a query after it raises ProgrammingError. The loop test now closes the case while it is clean, so the loop only reads the flag, and dirties it afterwards. A new test holds the lock in one thread and checks that close() in another waits for it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes two ways the full suite fails on macOS that CI does not show.
state["shutdown"](), the indexer answers a stop at once, the snapshot loop survives a case closed under it, andconftest.pyshuts every app down and fails a test that leaks either thread.CaseDB.close()now takes the lock every query takes. Closing a case while another thread queried it segfaulted on Linux CI.All three are written up in the cross-platform rules.
🤖 Generated with Claude Code