mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3045] [Bug]: PleReader initialization failures can wait forever for nonexistent reads #1221
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1221
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @j-luwierski on GitHub (Oct 18, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3045
What happened
PleReader::open()can hang in its error cleanup before any read has been submitted. Two CPU-only reproductions on freshly fetched upstream main477ac13cbe8e582c20484871ce459d20d82df09d:DirectFile::alloc_aligned()return null by wrappingposix_memalignto returnENOMEM.open()setsmax_inflightbefore allocating the slab, then callsclose()on failure. The free-slot vector is still empty, soclose()waits indefinitely infile.wait(..., -1). The expectedcannot allocate read bufferserror never returns.close()cleared the free slots but retained the previousmax_inflight; the second open reaches the bounds error and hangs in cleanup. Callingopen()directly on an already open reader has the same problem because it closes first.Expected: return false with the existing error, close the file, permit repeated close and a later valid open/read.
Strata version, GPU, OS
Latest upstream main checked directly against Niko1221/Strata:
477ac13c(0.1.45). Linux x86_64, GCC 14.2.0. Synthetic 16 KiB file and real DirectFile I/O; no GPU or model weights.Engine log
The lifecycle regression was compiled against unchanged upstream source and run with a two-second subprocess timeout:
These are deterministic API/error-path reproductions, not a claim that ordinary model loading exhausts memory. The proposed change delays publishing the slot count until initialization completes and resets it on close.
Searched open issues and PRs for PleReader, initialization, allocation and close. Related #2991 concerns colliding temporary files in a different selftest; #2623 concerns prefetch matching. Neither covers this initialization bookkeeping.
@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.