[ https://issues.apache.org/jira/browse/SOLR-16983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris M. Hostetter updated SOLR-16983: -------------------------------------- Attachment: SOLR-16983.patch Status: Open (was: Open) {quote}but the majority of them relate to "leaked" instances of {{org.eclipse.jetty.client.util.InputStreamResponseListener$Input}} that seem like false positives ... ... Fixing this could either involve adding a crap ton of {{ObjectReleaseTracker.release(inputStream)}} calls all over the code base, or we could replace/subclass {{InputStreamResponseListener}} w/our own impl that created & returned custom {{InputStream}} wrappers that handle the {{ObjectReleaseTracker}} tracking & releasing in it's own constructor and {{close()}} method. {quote} I worked up the attached patch to do this, and discovered that most of these aren't acctually false positives – they are legit bugs, because even though the {{TupleStreamParser.close()}} impl's call {{InputStream.close()}} -- there isn't anything in {{SolrStream}} that ever calls {{TupleStreamParser.close()}} ! So the patch fixes this ... but there are still lots of other remaining failures that seem to be related to leaked SolrClient/HttpClient instances... {noformat} ERROR: The following test(s) have failed: - org.apache.solr.client.solrj.io.stream.CloudAuthStreamTest.classMethod (:solr:solrj-streaming) Test output: /home/hossman/lucene/solr/solr/solrj-streaming/build/test-results/test/outputs/OUTPUT-org.apache.solr.client.solrj.io.stream.CloudAuthStreamTest.txt Reproduce with: gradlew :solr:solrj-streaming:test --tests "org.apache.solr.client.solrj.io.stream.CloudAuthStreamTest.classMethod" -Ptests.jvms=5 "-Ptests.jvmargs=-XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1 -XX:ReservedCodeCacheSize=120m" -Ptests.seed=D4A9A04D095FAD9E -Ptests.file.encoding=UTF-8 - org.apache.solr.client.solrj.io.stream.CloudAuthStreamTest.classMethod (:solr:solrj-streaming) Test output: /home/hossman/lucene/solr/solr/solrj-streaming/build/test-results/test/outputs/OUTPUT-org.apache.solr.client.solrj.io.stream.CloudAuthStreamTest.txt Reproduce with: gradlew :solr:solrj-streaming:test --tests "org.apache.solr.client.solrj.io.stream.CloudAuthStreamTest.classMethod" -Ptests.jvms=5 "-Ptests.jvmargs=-XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1 -XX:ReservedCodeCacheSize=120m" -Ptests.seed=D4A9A04D095FAD9E -Ptests.file.encoding=UTF-8 - org.apache.solr.client.solrj.io.stream.CloudAuthStreamTest.classMethod (:solr:solrj-streaming) Test output: /home/hossman/lucene/solr/solr/solrj-streaming/build/test-results/test/outputs/OUTPUT-org.apache.solr.client.solrj.io.stream.CloudAuthStreamTest.txt Reproduce with: gradlew :solr:solrj-streaming:test --tests "org.apache.solr.client.solrj.io.stream.CloudAuthStreamTest.classMethod" -Ptests.jvms=5 "-Ptests.jvmargs=-XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1 -XX:ReservedCodeCacheSize=120m" -Ptests.seed=D4A9A04D095FAD9E -Ptests.file.encoding=UTF-8 - org.apache.solr.client.solrj.impl.BasicHttpSolrClientTest.classMethod (:solr:solrj) Test output: /home/hossman/lucene/solr/solr/solrj/build/test-results/test/outputs/OUTPUT-org.apache.solr.client.solrj.impl.BasicHttpSolrClientTest.txt Reproduce with: gradlew :solr:solrj:test --tests "org.apache.solr.client.solrj.impl.BasicHttpSolrClientTest.classMethod" -Ptests.jvms=5 "-Ptests.jvmargs=-XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1 -XX:ReservedCodeCacheSize=120m" -Ptests.seed=D4A9A04D095FAD9E -Ptests.file.encoding=UTF-8 - org.apache.solr.client.solrj.embedded.SolrExampleJettyTest.classMethod (:solr:solrj) Test output: /home/hossman/lucene/solr/solr/solrj/build/test-results/test/outputs/OUTPUT-org.apache.solr.client.solrj.embedded.SolrExampleJettyTest.txt Reproduce with: gradlew :solr:solrj:test --tests "org.apache.solr.client.solrj.embedded.SolrExampleJettyTest.classMethod" -Ptests.jvms=5 "-Ptests.jvmargs=-XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1 -XX:ReservedCodeCacheSize=120m" -Ptests.seed=D4A9A04D095FAD9E -Ptests.file.encoding=UTF-8 - org.apache.solr.client.solrj.impl.Http2SolrClientTest.classMethod (:solr:solrj) Test output: /home/hossman/lucene/solr/solr/solrj/build/test-results/test/outputs/OUTPUT-org.apache.solr.client.solrj.impl.Http2SolrClientTest.txt Reproduce with: gradlew :solr:solrj:test --tests "org.apache.solr.client.solrj.impl.Http2SolrClientTest.classMethod" -Ptests.jvms=5 "-Ptests.jvmargs=-XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1 -XX:ReservedCodeCacheSize=120m" -Ptests.seed=D4A9A04D095FAD9E -Ptests.file.encoding=UTF-8 - org.apache.solr.response.TestRawTransformer.classMethod (:solr:core) Test output: /home/hossman/lucene/solr/solr/core/build/test-results/test/outputs/OUTPUT-org.apache.solr.response.TestRawTransformer.txt Reproduce with: gradlew :solr:core:test --tests "org.apache.solr.response.TestRawTransformer.classMethod" -Ptests.jvms=5 "-Ptests.jvmargs=-XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1 -XX:ReservedCodeCacheSize=120m" -Ptests.seed=D4A9A04D095FAD9E -Ptests.file.encoding=UTF-8 - org.apache.solr.metrics.SolrMetricsIntegrationTest.classMethod (:solr:core) Test output: /home/hossman/lucene/solr/solr/core/build/test-results/test/outputs/OUTPUT-org.apache.solr.metrics.SolrMetricsIntegrationTest.txt Reproduce with: gradlew :solr:core:test --tests "org.apache.solr.metrics.SolrMetricsIntegrationTest.classMethod" -Ptests.jvms=5 "-Ptests.jvmargs=-XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1 -XX:ReservedCodeCacheSize=120m" -Ptests.seed=D4A9A04D095FAD9E -Ptests.file.encoding=UTF-8 {noformat} > ObjectReleaseTracker completely useless in all SolrTestCaseJ4 based tests > ------------------------------------------------------------------------- > > Key: SOLR-16983 > URL: https://issues.apache.org/jira/browse/SOLR-16983 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Reporter: Chris M. Hostetter > Priority: Major > Attachments: SOLR-16983.bug-demo.nocommit.patch, SOLR-16983.patch, > test-output-if-clear-is-removed-from-SolrTestCaseJ4.txt.gz > > > > {{SolrTestCase}} has a {{@ClassRule}} named {{solrClassRules}} which calls > {{ObjectReleaseTracker.clearObjectTrackerAndCheckEmpty()}} in it's > {{afterIfSuccessful()}} method to ensure that any objects which use > {{ObjectReleaseTracker}} are correctly released (ie: closed) > _*...BUT...*_ > {{SolrTestCaseJ4}} has an {{@AfterClass}} method named > {{teardownTestCases()}} which calls {{ObjectReleaseTracker.clear()}} _before_ > the {{afterIfSuccessful()}} method of it's parent class's {{solrClassRules}} > gets to run. > ... Which means that {{ObjectReleaseTracker}} is completley useless in every > test that descends from {{{}SolrTestCaseJ4{}}}. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org