gradle/gradle · warning

More progress was logged than there should be ({} > {})

Error message

More progress was logged than there should be ({} > {})

What it means

ProgressBar tracks an operation's progress against a declared total. update() increments the counter and, when current exceeds total, warns. The warning is deliberately submitted to a dedicated single-thread executor because logging synchronously at that point would deadlock: log output itself flows through the progress rendering path. It means a ProgressLogger caller advanced progress more times than the total it declared, or declared the wrong total.

Source

Thrown at platforms/core-runtime/logging/src/main/java/org/gradle/internal/logging/console/ProgressBar.java:156

            0,
            totalProgress);
    }

    public void moreProgress(int totalProgress) {
        total += totalProgress;
        formatted = null;
    }

    public void update(boolean failing) {
        this.current++;
        if (current > total) {
            if (deadlockPreventer == null) {
                deadlockPreventer = Executors.newSingleThreadExecutor();
            }
            Future<?> ignored = deadlockPreventer.submit(() -> {
                // do not do this directly or a deadlock happens
                // to prevent that deadlock, execute it separately in another thread
                LOGGER.warn("More progress was logged than there should be ({} > {})", current, total);
            });
        }
        this.failing = this.failing || failing;
        formatted = null;
    }

    public List<Span> formatProgress(boolean timerEnabled, long elapsedTime) {
        String elapsedTimeStr = elapsedTimeFormatter.format(elapsedTime);
        if (formatted != null && elapsedTimeStr.equals(lastElapsedTimeStr)) {
            return formatted;
        }

        int consoleCols = consoleMetaData.getCols();

        // Calculate progress percentage for both display and taskbar
        int progressPercent = (int) (current * 100.0 / total);

        // Prepend taskbar progress sequence (invisible control sequence)

View on GitHub (pinned to 534f27719b)

Solutions

  1. Cosmetic only: the bar exceeds 100% but nothing fails; safe to ignore if occasional.
  2. Identify the offending operation: run with --console=plain or --info and note which progress operation passes its total.
  3. Plugin authors: pass the exact total when creating the operation and call progress() at most total times; recompute totals after filtering.
  4. Reproducible cases in Gradle's own progress reporting should be reported upstream with the operation name.

Example fix

// before: declared total smaller than actual updates
ops.newOperation('copy')
   .start('Copying files', files.size() - 1, false)
files.each { op.progress() } // files.size() updates -> overflow

// after: exact total
ops.newOperation('copy')
   .start('Copying files', files.size(), false)
Defensive patterns

Strategy: validation

Validate before calling

// compute the exact total from the same collection you iterate
int total = files.size(); // not size() - 1, not a guess
ProgressLogger op = ops.newOperation('copy');
op.start('Copying files', total, false);
for (File f : files) {
    op.progress(); // called exactly `total` times
}

Prevention

When it happens

Trigger: A build operation calls progress/updated more often than the total it announced (e.g., a test executor declaring total=N but emitting N+1 progress events), two operations miscounting, or a wrong total computed before filtering. Typical for plugins or integrations driving the internal ProgressLogger API.

Common situations: Plugins misusing the ProgressLogger API; filtering logic making executed work exceed the precomputed total (e.g., test filtering); concurrent unguarded updates racing past the total.

Related errors


AI-assisted analysis of gradle/gradle@534f27719b (2026-08-22). Data as JSON: /api/errors/75cbbaae4f39d2d4. Report an issue: GitHub.