You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "aglinxinyuan (via GitHub)" <gi...@apache.org> on 2026/08/19 23:23:58 UTC

[I] File-handle leak aborts the operator suite, plus an unseeded spec and a vacuous assertion [texera]

aglinxinyuan opened a new issue, #7799:
URL: https://github.com/apache/texera/issues/7799

   ### Describe the bug
   
   Three defects in test code. The first blocks coverage measurement outright on Windows.
   
   **1. `FileScanSourceOpExecSpec` leaks a file handle, aborting the suite and killing the whole module's coverage run.**
   
   In `"create LargeBinary when reading file with LARGE_BINARY type"`, `createTuplesFromFile` throws mid-`map` with `IllegalStateException: LargeBinaryManager.create() requires a base URI, but none was set on the current thread`. That abandons the `AutoClosingIterator` before exhaustion, so its close-on-exhaustion hook never fires and the handle stays open. `afterAll` then fails with `test_large_binary.txt: The process cannot access the file because it is being used by another process`, which **aborts the suite**.
   
   The consequence is bigger than one suite: `WorkflowOperator/jacoco` exits 1 and **emits no report directory at all**, so the whole module cannot be measured. POSIX `unlink` hides this on Linux CI, which is why it has gone unnoticed.
   
   (The `.zip` fixture is stranded too — it only *looks* fine because `.gitignore:10` is `*.zip`. `afterAll` never reaches it, because the `.txt` delete throws first.)
   
   **2. `IntervalOpExecSpec` is unseeded-random.** It imports `scala.util.Random.{nextInt, nextLong}` and uses them at four sites — input ordering twice, a 1k-row dataset, and the interval constant. The coverage footprint of `IntervalJoinOpExec` therefore drifts between runs of identical source: CI has reported 2 missed + 14 partial where a local run gave 0 missed + 13 partial.
   
   **3. `PveResourceSpec` has a vacuous path-traversal assertion.** `getPythonBin(testCuid, "..") shouldBe None` claims to pin the guard at `PveManager.scala:91` (`if (!resolved.startsWith(root)) return None`), but `".."` **matches** the name regex at line 88 (`^[A-Za-z0-9._-]+$` admits dots) and `<VenvRoot>/<cuid>/../pve` normalizes to `<VenvRoot>/pve` — still under root. The `None` actually comes from the `Files.exists` check on line 92.
   
   Proof: deleting line 91 entirely leaves that test passing, with results identical to baseline. Line 91 is in fact **unreachable by construction** — the regex forbids `/`, and `cuid` is an `Int` — so it is defensive code, not untested code.
   
   ### How to reproduce?
   
   Run `sbt "WorkflowOperator/jacoco"` on Windows for (1) — the suite aborts and no report is produced. For (2), run `IntervalOpExecSpec` twice and compare the per-line jacoco counters for `IntervalJoinOpExec`. For (3), delete `PveManager.scala:91` and observe that the traversal test still passes.
   
   ### Version/Branch
   
   main
   
   ### Task Type
   
   - [ ] Refactor / Cleanup
   - [ ] DevOps / Deployment / CI
   - [x] Testing / QA
   - [ ] Documentation
   - [ ] Performance
   - [ ] Other
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] File-handle leak aborts the operator suite, plus an unseeded spec and a vacuous assertion [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7799:
URL: https://github.com/apache/texera/issues/7799#issuecomment-5349203910

   <!-- texera:template-compliance -->
   👋 Thanks for opening this issue, @aglinxinyuan!
   
   It looks like the issue description doesn't quite follow our template yet:
   
   - The **What happened?** section is missing; please keep the template's headings.
   
   Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed.
   
   You can find the template prompts by editing the description, or see [CONTRIBUTING.md](https://github.com/apache/texera/blob/main/CONTRIBUTING.md) for the full contribution flow.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] File-handle leak aborts the operator suite, plus an unseeded spec and a vacuous assertion [texera]

Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan closed issue #7799: File-handle leak aborts the operator suite, plus an unseeded spec and a vacuous assertion
URL: https://github.com/apache/texera/issues/7799


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org