Repository navigation
[GH-3276] Suppress campskeleton degenerate-collision stderr flooding in StraightSkeleton - #3280
Closed
minhpham1810 wants to merge 1 commit into
Closed
minhpham1810 wants to merge 1 commit into
minhpham1810 wants to merge 1 commit into
Conversation
…ack traces in StraightSkeleton
Member
|
Thanks for the detailed analysis in this PR. However, I'd like to fix this at the source instead: org.datasyslab:campskeleton is a fork we control, so the library itself should stop printing rather than Sedona filtering stderr. I've pushed a fix to the fork (jiayuasu/campskeleton@9b47397), released as 0.0.2-20260823. It routes all diagnostics on the core algorithm path (CoSitedCollision.validateChains, Skeleton.skeleton/validate/findLiveLoop, Output.merge) through java.util.logging at FINE level, so they are silent by default but can still be enabled for debugging. Closing this in favor of the dependency bump. |
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.
Did you read the Contributor Guide?
Is this PR related to a ticket?
[GH-XXX] my subject. Closes ST_ApproximateMedialAxis and ST_StraightSkeleton flood stderr with 'Planes do not intersect at a single point' traces #3276What changes were proposed in this PR?
ST_ApproximateMedialAxisandST_StraightSkeletoncould flood executor logs: thecampskeletonlibrary (org.datasyslab:campskeleton, an external jar not vendored in this repo) catches its own internaljava.lang.Error: Planes do not intersect at a single point.— raised for degenerate collision events, typically from polygons with many short, near-collinear edges — and prints the full stack trace toSystem.errinstead of failing. A single 557-vertex polygon could print this trace 130-190 times per call, and a batch job skeletonizing a few thousand polygons produced 100k+ traces in a single run, burying real errors.Since the library itself isn't vendored here, this PR suppresses the flooding from the Sedona side (
StraightSkeleton.computeSkeleton): before invoking the library, it installs a process-wide, line-buffering filter onSystem.errthat recognizes and silently drops exactly this known-harmless stack trace (logging one DEBUG-level line per occurrence instead) while passing every other line through unchanged. The filter re-validates on every call via a cheap reference check, so it self-heals if something else replacesSystem.err, and it avoids holding any lock around the actual (expensive, parallelizable) skeleton computation.How was this patch tested?
Added
StraightSkeletonTest#testDegenerateCollinearPolygonDoesNotFloodStderr, which runs the 557-vertex repro polygon from the issue, capturesSystem.errduring the call, and asserts none of campskeleton's degenerate-collision trace lines leak through, while the skeleton output is still produced correctly.Ran the full
StraightSkeletonTest(24/24) andFunctionsTest/raster.FunctionsTestsuites (327/327) locally — all pass. Also verified with a standalone harness against the issue's exact repro polygon: before the fix, ~71KB / 130+ suppressed-trace occurrences leaked to stderr; after the fix, 0 bytes leak, with identical skeleton output (1087 edges either way).Did this PR include necessary documentation updates?