The GitHub Actions job "Coverage" on commons-math.git/fix/synchronized-descriptive-statistics-mutators has failed. Run started by GitHub user Lyin-OTTF (triggered by aherbert).
Head commit for run: df21ddf924e89153fe9c754834253943b883a389 / Lyin-OTTF <[email protected]> Synchronize getPercentile of SynchronizedDescriptiveStatistics DescriptiveStatistics.getPercentile sets the quantile on the shared percentile implementation and then calls apply, which is synchronized in SynchronizedDescriptiveStatistics. The setQuantile step ran outside the instance lock, so a concurrent getPercentile call could swap the quantile in between the two steps and a caller could end up computing a percentile for a quantile it never requested. Override getPercentile as synchronized so the quantile update and the apply are atomic with respect to the other synchronized methods on the same instance. Add a reflection test guarding the synchronized modifier and a concurrency test that holds the instance monitor while another thread requests a different quantile, asserting the requested quantile is the one applied. Signed-off-by: Lyin-OTTF <[email protected]> Report URL: https://github.com/apache/commons-math/actions/runs/39389950228 With regards, GitHub Actions via GitBox
