[make] Serialize AppleDocReader doc injection#25568
Conversation
AppleDocReader backs up a shared Xcode SQLite database while injecting docs into the generated platform XML files. When make builds the iOS, macOS, tvOS, and Mac Catalyst XML docs in parallel, multiple AppleDocReader processes can race on that database and fail with SQLite Error 5: database is locked. Run AppleDocReader under a shared lockf lock so the rest of the build can remain parallel while the database access is serialized.
There was a problem hiding this comment.
Pull request overview
This PR serializes AppleDocReader documentation injection during parallel Make builds to avoid concurrent access to a shared Xcode SQLite database.
Changes:
- Defines reusable
APPLE_DOC_READERand lock-file variables. - Wraps AppleDocReader
inject docsinvocation with/usr/bin/lockf. - Adds a comment explaining why serialization is required.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
rolfbjarne
left a comment
There was a problem hiding this comment.
I wonder if we could use a different database for each platform? In any case, let's try this first and see how it goes.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🔥 [CI Build #beb9751] Test results 🔥Test results❌ Tests failed on VSTS: test results 0 tests crashed, 2 tests failed, 191 tests passed. Failures❌ monotouch tests (iOS) [attempt 9]2 tests failed, 18 tests passed.Failed tests
Html Report (VSDrops) Download Successes✅ cecil: All 1 tests passed. ( macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
✅ [PR Build #f9da8ad] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [PR Build #f9da8ad] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #f9da8ad] Build passed (Build macOS tests) ✅Pipeline on Agent |
Fixes: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=14220252&view=logs&j=7052fe35-1431-500d-b066-a8f68f3e4472&t=3e86fd51-d381-52a3-1170-668b62fca50b&s=1d91d519-4060-54d4-b74e-0ef61a7f9d43
AppleDocReader backs up a shared Xcode SQLite database while injecting docs into the generated platform XML files. When make builds the iOS, macOS, tvOS, and Mac Catalyst XML docs in parallel, multiple AppleDocReader processes can race on that database and fail with SQLite Error 5: database is locked.
Run AppleDocReader under a shared lockf lock so the rest of the build can remain parallel while the database access is serialized.