Skip to content
TheChatArchiveThe Chat Archive
GLMz-ai/glm-5.2· unknownHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

ISSUE DESCRIPTION gRPC ManagedChannelImpl log messages contain unsubstituted…

  1. User

    ISSUE DESCRIPTION

    gRPC ManagedChannelImpl log messages contain unsubstituted placeholders Affected version: ArcadeDB server 26.4.2 Component: logging — bridge between gRPC's java.util.logging and the server's SLF4J/Logback backend

    Summary

    Some WARNING messages emitted by gRPC's ManagedChannelImpl are written to the ArcadeDB server log with the original MessageFormat placeholders ({0}, {1}) left literal instead of being substituted with the actual values.

    Example

    2026-05-21 06:53:11.234 WARNI [ManagedChannelImpl] [{0}] Failed to resolve name. status={1} 2026-05-21 06:53:11.234 WARNI [ManagedChannelImpl] [{0}] Failed to resolve name. status={1}

    Expected (illustrative):

    WARNI [ManagedChannelImpl] [channel-7] Failed to resolve name. status=UNAVAILABLE: Unable to resolve host vcc-superx-arcadedb-2.…

    Root cause (suspected)

    gRPC's internal loggers use java.util.logging with MessageFormat-style placeholders. The bridge that forwards JUL records to the ArcadeDB logging backend (SLF4J/Logback) is not translating {0}, {1} parameters into the SLF4J {} style, so the parameter array is dropped and the raw template ends up in the log file. Confirmation: the same logical event is also logged elsewhere (via GrpcLogAppender / AppendLogResponseHandler) with the full formatted message, so the data exists — it's just lost on the ManagedChannelImpl path.

    Impact

    Low severity but operationally annoying — these log lines carry zero information, so anyone scanning logs for the actual channel and gRPC status gets a stream of [{0}] Failed to resolve name. status={1} that they then have to correlate with neighbouring lines.

    Suggested fix

    Either:

    • Install SLF4JBridgeHandler (org.slf4j:jul-to-slf4j) and ensure it translates JUL LogRecord.parameters via MessageFormat.format(...) before delegating to SLF4J; or
    • Configure a JUL Handler for the io.grpc logger that uses a SimpleFormatter-compatible formatter so parameters are substituted before the message reaches the SLF4J side.

    Environment

    • ArcadeDB 26.4.2, default packaging
    • Logs viewed via kubectl logs; same behaviour observed across all 3 HA pods

    Interface

    No new interfaces are introduced.

    ADDITIONAL ADVICE

    Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use git checkout <file> to restore the file to its original state. You can also reset all changes in the repository using git reset --hard command. Additionally, you can use git stash and git stash pop to temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you call submit) using git status or git diff commands. However you don't need to use git add or git commit before submitting your changes. In fact, submit only submits currently unstaged changes because it uses git diff to get the changes that need to be submitted.

    CHECKLIST

    Before submitting your solution, please go over the following checklist and make sure you've done everything:

    • If an error was reported in the issue description, I have successfully reproduced it.
    • If an error was reported in the issue description, I have confirmed that my fix resolves the error.
    • I have thought about edge cases and made sure my fix handles them as well.
    • I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.

    Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!

    (Current directory: /arcadedb, current file: none) bash-$

  2. GLM Assistant

    Let me start by exploring the repository structure to understand the codebase and find the relevant logging bridge code.

  3. GLM Assistant

    There's a com.arcadedb.log.LogManager class. The issue is about a bridge between JUL (java.util.logging) and SLF4J/Logback. The ServerLogManager extends java.util.logging.LogManager. Let me understand how logging works. Let me look at how gRPC logs get routed. Let me search for how the JUL logging is bridged.

  4. GLM Assistant

    Now I understand the logging architecture. ArcadeDB uses JUL (java.util.logging) directly with a custom formatter (AnsiLogFormatter). The issue is about gRPC's ManagedChannelImpl which uses JUL with MessageFormat-style placeholders ({0}, {1}).

    The ArcadeDB's own logger (DefaultLogger.log) formats messages using String.formatted() (which uses %s style), but gRPC uses JUL directly, bypassing the DefaultLogger.log method. So gRPC calls Logger.log(Level, String, Object...) directly on JUL loggers, and the LogRecord carries parameters. The AnsiLogFormatter then needs to format those parameters.

    Let me look at the AnsiLogFormatter to see how it handles LogRecord parameters.

  5. GLM Assistant

    Found the issue. The AnsiLogFormatter.customFormatMessage uses message.formatted(additionalArgs) which uses String.format style (%s, %d), but gRPC uses MessageFormat style placeholders ({0}, {1}). So message.formatted(additionalArgs) doesn't substitute {0} and {1} — it leaves them literal.

    Let me look at the LogFormatter base class too.

  6. GLM Assistant

    Now I understand the issue. Both formatters use message.formatted(additionalArgs) (i.e. String.format with %s style). But gRPC (and JUL in general) uses MessageFormat style placeholders {0}, {1}. ArcadeDB's own DefaultLogger.log pre-formats %s messages before calling JUL (so they reach the formatter with no parameters), but third-party JUL loggers like gRPC pass {0}-style messages with parameters directly to JUL.

    Let me check the existing tests for the formatter.

  7. GLM Assistant

    Let me write a reproduction script to confirm the issue, and also search for any direct JUL logging with parameters in the codebase.

  8. GLM Assistant

    These are all logger.logLine calls (a different progress-bar logger), not JUL. ArcadeDB's own JUL logging goes through com.arcadedb.log.LogManager.instance().log(...) which pre-formats with String.format before calling JUL log.log(level, msg) with no parameters. So the only place where parameters reach the formatter is third-party JUL loggers (gRPC, Ratis) which use MessageFormat {0} style.

    Let me write a reproduction test to confirm the bug.

  9. GLM Assistant

    Let me try to build the engine module to get compiled classes for a reproduction test.

  10. GLM Assistant

    Now let me write a reproduction test using the actual formatter classes.

  11. GLM Assistant

    I've confirmed the bug. The {0} and {1} placeholders are left literal in both formatters. Let me examine AnsiCode.format to ensure my fix won't conflict with it.

  12. GLM Assistant

    AnsiCode.format only processes $ANSI{...} patterns (with the $ANSI{ prefix), so {0} and {1} are not touched. Good.

    Let me check the direct JUL usages in ServerMonitor and FileManager to make sure they don't log printf-style with parameters.

  13. GLM Assistant

    ServerMonitor.LOGER.log(Level.FINE, "message", e) uses the throwable overload, not params. So ArcadeDB's own code never logs printf-style messages WITH params directly to JUL. The formatter's params path is only hit by third-party JUL loggers using MessageFormat {0}.

    Let me search the tests for any usage that relies on printf-style substitution at the formatter level.

  14. GLM Assistant

    No tests directly test the formatter's params substitution with printf style, and ArcadeDB always pre-formats its own messages before JUL. The formatter's params path is only hit by third-party JUL loggers (gRPC, Ratis) using MessageFormat {0} style.

    Now let me implement the fix. I'll add a shared helper method in LogFormatter that handles both MessageFormat ({0}) and printf (%s) style parameter substitution, and use it in both formatters.

  15. GLM Assistant

    Let me view the relevant sections of both files with line numbers.

  16. GLM Assistant

    Now let me look at the imports of LogFormatter to confirm java.text.* is imported (for MessageFormat).

  17. GLM Assistant

    java.text.* is imported, so MessageFormat is available. Now let me implement the fix in LogFormatter.java. First, I'll replace the "FORMAT THE MESSAGE" block to use a new helper method.

  18. GLM Assistant

    There's a leftover duplicate at lines 152-153 from the original code. Let me remove it.

  19. GLM Assistant

    There's a duplicate method declaration. Let me view and fix precisely.

  20. GLM Assistant

    LogFormatter.java looks good now. Let me update AnsiLogFormatter.java to use the same helper method.

  21. GLM Assistant

    Now let me replace the "FORMAT THE MESSAGE" block in AnsiLogFormatter.java to use the inherited helper.

  22. GLM Assistant

    There's a duplicate return statement. Let me fix that.

  23. GLM Assistant

    Both files look good now. Let me recompile the engine module and re-run the reproduction test.

  24. GLM Assistant

    The fix works perfectly:

    1. gRPC's [{0}] Failed to resolve name. status={1} now substitutes to [channel-7] Failed to resolve name. status=UNAVAILABLE:... in both formatters.
    2. Printf-style with params still works.
    3. No-params messages work.
    4. MessageFormat with format types ({1,number,percent} → 85%) works.
    5. Invalid MessageFormat falls back gracefully without throwing.

    Now let me run the existing logging tests to make sure nothing breaks.

  25. GLM Assistant

    The surefire plugin isn't cached offline. Let me try with network access.

  26. GLM Assistant

    The test ran without errors. Let me confirm by checking the surefire reports.

  27. GLM Assistant

    All 4 LoggerTest tests pass. Let me also check whether any other tests directly use the formatters or verify log output content.

  28. GLM Assistant

    Only LoggerTest references the formatters, and it passes. Let me verify there's no separate SLF4J/Logback bridge path that the issue might be referring to (the issue mentions "SLF4J/Logback backend").

  29. GLM Assistant

    The server uses slf4j-jdk14 (SLF4J→JUL binding), so all logging ultimately flows through JUL handlers configured with ArcadeDB's AnsiLogFormatter/LogFormatter. gRPC uses JUL directly with MessageFormat {0} placeholders + parameters, which is exactly the path my fix addresses. Let me verify the configured handlers/formatters in the log properties.

  30. GLM Assistant

    Confirmed — the production config uses com.arcadedb.utility.AnsiLogFormatter as the ConsoleHandler formatter, so all JUL records (including gRPC's ManagedChannelImpl) flow through the formatter I fixed.

    Let me do a final review of the complete LogFormatter.java to ensure correctness.

  31. GLM Assistant

    The code looks correct. Let me clean up temp files and check the gRPC module for any related logging paths mentioned in the issue (GrpcLogAppender / AppendLogResponseHandler).

  32. GLM Assistant

    No AppendLogResponseHandler/GrpcLogAppender in the codebase — those are gRPC's internal paths. My fix in the ArcadeDB formatter is the correct location. Let me review the full diff.

  33. GLM Assistant

    The diff is clean. Let me check if there are any other custom formatters in the codebase that might need the same fix.

  34. GLM Assistant

    LogFormatter is the only custom JUL Formatter (with AnsiLogFormatter extending it), so my fix covers all custom formatters. Let me run a final verification: compile engine tests and run LoggerTest once more.

  35. GLM Assistant

    All tests pass. The fix is complete and verified.

    Summary

    Root Cause

    The issue was in ArcadeDB's custom JUL Formatter implementations (LogFormatter and AnsiLogFormatter). These formatters are installed on the JUL ConsoleHandler (per arcadedb-log.properties) and are the final formatting step for all JUL log records — including gRPC's ManagedChannelImpl, which logs directly against java.util.logging using MessageFormat-style placeholders ({0}, {1}) plus a parameter array.

    The formatters substituted parameters using only message.formatted(additionalArgs) (i.e. String.format / printf %s style). Since gRPC's templates contain no % specifiers, String.format left the {0}/{1} tokens literal — and because no IllegalFormatException was thrown, the raw template was emitted unchanged.

    ArcadeDB's own log calls were unaffected because DefaultLogger.log pre-formats %s messages before handing them to JUL (so they arrive at the formatter with no parameters).

    Fix

    Added a shared helper formatMessageWithParameters(message, parameters) in LogFormatter (inherited by AnsiLogFormatter) that:

    1. Returns the message as-is when there are no parameters (preserving existing behavior for ArcadeDB's pre-formatted messages).
    2. When parameters are present and the message contains a {n} placeholder, applies MessageFormat.format(...) — the standard JUL convention used by gRPC/Ratis.
    3. Otherwise falls back to printf-style String.formatted(...) (preserving compatibility with any printf-style-with-params loggers).
    4. Catches IllegalArgumentException/IndexOutOfBoundsException/IllegalFormatException and falls back to the raw template, so logging never throws.

    The {n} detection (hasMessageFormatPlaceholder) also respects MessageFormat single-quote quoting, avoiding false positives.

    Checklist

    • Reproduced the error: Yes — a reproduction script confirmed [{0}] Failed to resolve name. status={1} was emitted literally by both formatters before the fix.
    • Confirmed the fix resolves the error: Yes — after the fix the same record renders as [channel-7] Failed to resolve name. status=UNAVAILABLE: ....
    • Edge cases handled: Yes — verified MessageFormat {0}/{1}, format types ({1,number,percent}→85%), printf-style with params, no-params, invalid MessageFormat (graceful fallback), and single-quote quoting.
    • Existing tests run: Yes — LoggerTest (4 tests, the only test referencing the formatters) passes; engine test-compile succeeds.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.