TIKA-4740 -- tika-server-core fix#2841
Open
tballison wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts how forked PipesServer JVM processes are launched so that they inherit the parent JVM’s current working directory (CWD), preserving relative-path resolution in Tika configs while still capturing native crash logs for diagnostics.
Changes:
- Stop setting
ProcessBuilder.directory(tmpDir)for shared/per-client forked server processes so the child inherits the parent CWD (fixing relative-path behavior). - Auto-inject
-XX:ErrorFile=<tmpDir>/hs_err_pid%p.log(unless already provided) sohs_errcrash logs land in the temp directory used byServerProcessIO.surfaceCrashDiagnostics().
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/SharedServerManager.java | Keep child process CWD inherited from parent; redirect hs_err crash logs into tmpDir via -XX:ErrorFile. |
| tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/PerClientServerManager.java | Same CWD inheritance change for per-client server forks; add -XX:ErrorFile injection for crash-log collection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+273
to
+276
| // Redirect stdio to per-server files instead of inheriting the parent | ||
| // JVM's handles -- on Windows inheritIO() duplicates surefire's stderr | ||
| // handle into the child, blocking the controller's pipe reader past | ||
| // parent exit and hanging CI. We deliberately do NOT call |
… back to logging to stderr
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.
Thanks for your contribution to Apache Tika! Your help is appreciated!
Before opening the pull request, please verify that
TIKA-XXXX)[TIKA-XXXX] Issue or pull request title)./mvnw clean testmainbranch. If there are conflicts, please try to rebase the pull request branch on top of a freshly pulledmainbranchtika-bom/pom.xml.We will be able to faster integrate your pull request if these conditions are met. If you have any questions how to fix your problem or about using Tika in general, please sign up for the Tika mailing list. Thanks!