[ https://issues.apache.org/jira/browse/LUCENE-10419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17491640#comment-17491640 ]
Dawid Weiss commented on LUCENE-10419: -------------------------------------- I know what this is. Thanks for sharing the test server, Uwe - interesting that it only happens so rarely. So, RAT has this code: {code:java} def licenseMatcher = Defaults.createDefaultMatcher(); {code} but underneath it just creates a matcher on top of the same collection of licenses: {code:java} public static IHeaderMatcher createDefaultMatcher() { return new HeaderMatcherMultiplexer(Defaults.DEFAULT_MATCHERS); } {code} The array of default matchers is a final static constant; those classes are not thread safe and extend from a common class which has an internal StringBuilder. When we use multiple instances of validation tasks it causes an obvious race condition on the content of this string builder and leads to inconsistencies, signalled by the exception we observed on Uwe's servers. It's a relatively easy fix to make the rat validation code run under a monitor - it'd be better to fix rat and make the matcher truly thread-safe though. > Identify occasional validateSourcePatterns error on CI servers > -------------------------------------------------------------- > > Key: LUCENE-10419 > URL: https://issues.apache.org/jira/browse/LUCENE-10419 > Project: Lucene - Core > Issue Type: Bug > Reporter: Dawid Weiss > Assignee: Dawid Weiss > Priority: Trivial > > {code} > What went wrong: Execution failed for task > ':lucene:analysis:icu:validateSourcePatterns'. > start 1, end 0, length 0 > {code} > > This annoys me. It's a message from stringbuilder.substring somewhere - let's > get the stack of that first and see where the bug is. -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org