InsightSoftwareConsortium / InsightSoftwareConsortium/ITKIOOMEZarrNGFF
Investigate thread safety
- Dominant language
- C++
- Stars
- 10
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
From https://github.com/InsightSoftwareConsortium/ITKIOOMEZarrNGFF/pull/44#issuecomment-1671733922:
> When I run tests in parallel with ctest -j8, I get:
```
9 - IOOMEZarrNGFF_readSubregion (Subprocess aborted)
```
>Serially, they pass.
I have been able to reproduce these errors with the `-j` flag with different tests failing. In particular I've noticed errors where Tensorstore appears to fail to read different image dimensions. There may be an issue with store contexts not being unique among threads or processes.
## Tasks
- Add a test to verify that using two `OMEZarrNGFFImageIO` instances with two `ImageReaders` of different dimensions in sequence does not result in an error + metadata is read correctly
- Investigate failures in running tests in parallel
- Add a test to verify that running multiple threads with one `OMEZarrNGFFImageIO` instance and `ImageReader` per thread with different data sources / regions does not result in failures
- If thread/process/context safety issues are identified, start by documenting the issue ("multiple instances are not allowed") or seeing if we can enforce one context at a time.
- If safety issues are identified, revisit and determine how/whether we can refactor for thread/process/context safety.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the failures with ctest -j8 and review the OMEZarrNGFFImageIO and ImageReader usage described in the issue. Add coverage for sequential instances and concurrent threads using different dimensions, data sources, and regions, then verify metadata and reads remain correct. If safety limits are found, document or enforce them before considering a broader refactor.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-vision, testing
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100