mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2991] [Engine] ple_reader_selftest can crash or hang when two runs share the temp directory #1203
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#1203
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 @thc1006 on GitHub (Oct 18, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2991
Area
[Engine] (speed, kernels, models, the server and API)
Desktop app, Terminal or source?
Source (START-HERE.bat, setup.sh or a build)
What happened
ple_reader_test --selftestwrites its test tables under fixed names in the temp directory (ple_format_selftest.gguf,ple_reader_selftest_90.binandple_reader_selftest_110.bin), and the ctest entry,add_test(NAME ple_reader_selftest COMMAND ple_reader_test --selftest), passes no--dir. Two runs at the same time on one machine, for example ctest in a CUDA build and in a HIP build, overwrite and delete each other's tables while they are open.I started two copies of the 0.2.0-beta selftest (
3d1fb48, built for the CPU only) with the sameTMPDIR, six times, the second one 0, 0.3, 1, 2, 4 or 6 s after the first. In all 6 pairs, at least one run failed:collect failed: PleReader: short read inside the tableand then hung, with all its threads waiting on futexes, until it was killed after 182 and 186 s. A run alone takes about 13 s.mapped open: PLE table size mismatch. In the 6 s pair, both failed, one withcollect failed: PleReader: short read inside the tableand the other withopen: DirectFile: cannot open, as did the second run of the 4 s pair.With a separate
TMPDIRfor each run and the same six delays, all 12 runs passed. With 0.1.45 (477ac13), 5 of the 6 pairs failed, with SIGBUS, hangs andcannot openas here; those scripts and their output are inple-selftest-shared-tmp-20261018.txt.Adding
--dir ${CMAKE_CURRENT_BINARY_DIR}to theadd_testline would give each build its own files.Smallest steps or command that reproduce it
Built for the CPU only from 0.2.0-beta's
src/kernels/ngram.cpp,src/ngram/ple_reader.cpp,src/platform/direct_file.cppandsrc/ngram/ple_reader_test.cpp:Then, for each delay, two runs with the same
TMPDIR(the file above has the whole script,race.sh; a run still alive after 180 s was killed):The first FAIL line of each run with the shared
TMPDIR(rc 135 is SIGBUS, 143 the kill after 180 s):Reproduction status
Reproduced locally
Strata version
0.2.0-beta (
3d1fb48)Graphics card, memory and system
GPU not used (the selftest runs on the CPU) · 4× Tesla P100 16 GB · 62.8 GiB RAM · Ubuntu 22.04.5, kernel 6.8, g++ 11.4, TMPDIR on ZFS (OpenZFS 2.2.2)
@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.
@thc1006 commented on GitHub (Oct 19, 2026):
/reopen
@github-actions[bot] commented on GitHub (Oct 19, 2026):
Reopened, thank you. A maintainer will pick it up from here.
@Niko1221 commented on GitHub (Nov 5, 2026):
Thanks for taking the time to report this.
Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. 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.