fix(#349): kernel patch for PCDM_StorageDriver/PCDM_Reader reentrancy SIGSEGV (v1.15.9)#354
Merged
Merged
Conversation
… SIGSEGV (v1.15.9) CDF_Application caches one storage/retrieval driver instance per format and shares it across every Store()/Retrieve() call for that format, but the driver's Write()/Read() mutate instance-level scratch state with no synchronization — concurrent Save/SaveAs of the same format corrupts it (SIGSEGV, confirmed by TSan: 136 races + crash on stock kernel, 0 after fix). Fixes upstream via Open-Cascade-SAS/OCCT#1393 (repro) / #1394 (fix, CI green). A separate, previously-masked race surfaced during validation (CDM_Application::myMetaDataLookUpTable) is out of scope here, filed as #353. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
Scripts/patches/0014-CDF-driver-reentrancy-mutex-349.patch) fixing the SIGSEGV behind Concurrent Save/SaveAs to the same format corrupts a shared, cached storage driver instance (SIGSEGV) #349:CDF_Application-cachedPCDM_StorageDriver/PCDM_Readerinstances are not reentrant, so concurrentSave/SaveAs/Retrieveof the same document format corrupt shared driver scratch state.PCDM_StorageDriver/PCDM_Readereach get amutable std::mutexguarding their ownWrite()/Read(), held at the three call sites that use a cached, possibly-shared driver instance (CDF_StoreList::Store,CDF_Application::Retrieve,CDF_Application::Read).CDM_Application::myMetaDataLookUpTable) is out of scope for Concurrent Save/SaveAs to the same format corrupts a shared, cached storage driver instance (SIGSEGV) #349 and filed as CDM_Application::myMetaDataLookUpTable unsynchronized (race surfaced by #349 fix) #353.Test plan
-O0 -g) signal-handler reproducer (Scripts/repro/349-ocaf-driver-reentrancy/occt_349_barrier.cpp): reliable SIGSEGV on stock kernel, clean across repeated runs with the patchswift test --filter OCAFSaveLoadBinaryTests/OCCTXCAFTests(339 tests) cleanswift test(4423 tests / 1282 suites) clean🤖 Generated with Claude Code