Repository navigation
StoreSession: report export thread creation failures - #139
Open
victorstoica114 wants to merge 1 commit into
Open
victorstoica114 wants to merge 1 commit into
victorstoica114 wants to merge 1 commit into
Conversation
Construct the export worker inside the existing error handler and catch std::exception so std::thread startup failures return false with an error. Add an optional standalone Linux regression covering one process-local EAGAIN, exact retained source bytes, and normal binary/srzip export and replay at two sizes.
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.
If std::thread construction fails in StoreSession::start(), its exception currently escapes instead of returning false with an error. StoreProgress::run() expects that return value to show the save error. This affects ordinary binary and srzip exports.
Move worker construction into the existing try block and catch std::exception, which covers std::system_error as well as the existing sigrok::Error. Retain the same error reporting, resource ownership, normal worker and setup-saving behavior. No worker becomes joinable after failed construction; a fresh StoreSession can export the same data afterward. Repeated starts on the same exporter and machine-wide OOM recovery are not promised.
The optional Linux diagnostic overrides pthread_create only within its own process and scans no physical drivers. It checks eight fault/control cases: binary/srzip, 2,048 and 2,621,441 samples, one EAGAIN, no escaped exception or false success, exact source bytes, and normal export/replay. Setup saving is disabled in this data-only fixture because it creates no view. Run it after a Unix Makefiles build with tests enabled:
Validation of this exact source on Linux and native Windows/MinGW:
Linux is a VMware guest; Windows is nested KVM. Hardware is excepted for this host file-export exception path: no acquisition, transport or firmware code changes, and no new electrical or user-desktop capture claim.
This three-file change is based directly on upstream af02198. It is independent of #136, #137 and #138 and includes no DLA, collection or Segment changes.