Skip to content
TheChatArchiveThe Chat Archive
QwenQwen/Qwen3.6-27B· alibabaHugging 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

    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. Qwen Assistant

    Let me analyze the issue:

    1. The problem is that gRPC's ManagedChannelImpl log messages contain unsubstituted placeholders ({0}, {1}) instead of actual values
    2. The root cause is that gRPC uses java.util.logging (JUL) with MessageFormat-style placeholders, and the bridge to SLF4J/Logback is not translating the parameters
    3. The fix should involve properly handling JUL LogRecord parameters

    Let me start by exploring the repository structure to understand how logging is set up.

  3. Qwen Assistant

    Let me explore the repository structure more, focusing on logging-related files.

  4. Qwen Assistant

    Let me search for logging-related files, especially anything related to JUL (java.util.logging) bridges or gRPC logging.

  5. Qwen Assistant

    Good, I found some logging-related files. Let me look at the DefaultLogger.java and LogFormatter.java files which are likely the key files for logging infrastructure.

  6. Qwen Assistant

    Now let me look at the LogFormatter.java and AnsiLogFormatter.java to understand how formatting works:

  7. Qwen Assistant

    I see the issue now. The LogFormatter class uses message.formatted(additionalArgs) which uses String.format() style (with %s, %d, etc.), but gRPC uses MessageFormat style placeholders ({0}, {1}). Let me verify this by looking at how gRPC logs:

  8. Qwen Assistant

    Now I understand the problem. The LogFormatter.customFormatMessage() and AnsiLogFormatter.customFormatMessage() both use message.formatted(additionalArgs) which is the Java String.format() style (using %s, %d, etc.). However, gRPC's JUL loggers use MessageFormat style placeholders ({0}, {1}).

    When gRPC creates a LogRecord with {0} placeholders and passes the parameters array, the current code tries message.formatted(args) which uses String.format() style. Since {0} is not valid for String.format(), it throws IllegalFormatException which is caught, and then the raw message with {0} placeholders is printed.

    The fix should check if the message contains MessageFormat-style placeholders ({0}, {1}, etc.) and use MessageFormat.format() in that case.

    Let me first look at the existing test file for the logger:

  9. Qwen Assistant

    Now I understand the issue. The LogFormatter.format() and AnsiLogFormatter.format() methods use message.formatted(args) which expects String.format() style placeholders like %s, %d, etc. But gRPC's JUL loggers use MessageFormat style placeholders like {0}, {1}.

    When message.formatted(args) is called with {0} style placeholders, it throws IllegalFormatException, which is caught and the raw message (with placeholders) is output.

    The fix should try both formatting styles. Let me first create a test script to confirm the issue:

  10. Qwen Assistant

    Let me create a simple test script to reproduce the issue and confirm the fix:

  11. Qwen Assistant

    Interesting! I see that String.format doesn't throw an exception for {0} placeholders - it just ignores them and outputs them literally. So the issue is that message.formatted(params) doesn't throw an exception when given {0} style placeholders, it just doesn't substitute them.

    This means the current code in LogFormatter and AnsiLogFormatter doesn't detect that the formatting failed. The catch (IllegalFormatException ignore) block is never triggered for MessageFormat-style placeholders.

    Now let me understand the fix needed:

    1. The LogFormatter.customFormatMessage() and AnsiLogFormatter.customFormatMessage() methods need to detect when the message contains MessageFormat-style placeholders ({0}, {1}, etc.) and use MessageFormat.format() instead of String.format().

    Let me check if there's a pattern to detect MessageFormat-style placeholders:

  12. Qwen Assistant

    Good, the detection pattern works. Now I need to implement the fix in both LogFormatter.java and AnsiLogFormatter.java. The fix should:

    1. Check if the message contains MessageFormat-style placeholders ({0}, {1}, etc.)
    2. If so, use MessageFormat.format() to format the message
    3. Otherwise, use the existing String.format() style (message.formatted())

    Let me implement the fix. I'll modify the LogFormatter.java first:

  13. Qwen Assistant

    The open command needs to be used differently. Let me try without the file argument in the JSON.

  14. Qwen Assistant

    Now I'll modify the LogFormatter.java to add support for MessageFormat-style placeholders. The key change is in the customFormatMessage method where the message formatting happens. I need to:

    1. Add a MessageFormat import
    2. Modify the formatting logic to detect and use MessageFormat when appropriate
  15. Qwen Assistant

    Now let me also update the AnsiLogFormatter.java with the same fix:

  16. Qwen Assistant

    Now let me verify the changes compile correctly by running the build:

  17. Qwen Assistant

    I need to add the Pattern import. The java.util.* import doesn't include Pattern - I need to add java.util.regex.Pattern explicitly. Let me fix this:

  18. Qwen Assistant

    Now let me try to compile again:

  19. Qwen Assistant

    The code compiles. Now let me create a test script to verify the fix works correctly:

  20. Qwen Assistant

    Test 6 shows that MessageFormat formats numbers with locale-specific separators (2,424 instead of 2424). This is expected behavior for MessageFormat and is actually correct - it's how Java's MessageFormat works. gRPC would be fine with this since it typically logs strings and status objects, not raw integers. Let me adjust the test to account for locale:

  21. Qwen Assistant

    All tests pass. Now let me run the existing tests in the engine module to make sure I haven't broken anything:

  22. Qwen Assistant

    The LoggerTest passed. Let me also check if there are any tests specifically for the LogFormatter or AnsiLogFormatter:

  23. Qwen Assistant

    Let me check if there are any more tests related to logging:

  24. Qwen Assistant

    Let me verify the changes I've made by looking at the diff:

  25. Qwen Assistant

    The changes look correct. Let me run a broader set of tests to make sure everything still works:

  26. Qwen Assistant

    Tests passed. Let me also run a quick integration test by writing a more comprehensive test that uses the actual LogFormatter classes:

  27. Qwen Assistant

    Now let me create a test script that tests the actual LogFormatter classes to confirm the fix works end-to-end:

  28. Qwen Assistant

    The fix works correctly:

    1. MessageFormat style placeholders ({0}, {1}): Now properly substituted with actual values (e.g., [channel-7] Failed to resolve name. status=UNAVAILABLE: Unable to resolve host)
    2. String.format style placeholders (%s): Still work correctly (e.g., [my-logger] Connected to server-1)

    Let me also run a broader set of tests to make sure nothing is broken:

  29. Qwen Assistant

    The full test suite takes too long. Let me just run a few more specific tests that are most likely to be affected:

  30. Qwen Assistant

    All tests pass. Let me also think about edge cases:

    1. Null parameters: Handled - the code checks if (additionalArgs != null) before processing
    2. Empty parameters array: Handled - the pattern matcher won't find anything and the message is output as-is
    3. Mixed placeholders: If a message has both {0} and %s, the code will use MessageFormat for the {0} pattern, which is the correct behavior since gRPC-style messages use MessageFormat
    4. Braces without digit pattern: The regex \{\d+\} specifically matches {0}, {1}, etc. but not arbitrary text in braces like { some text }
    5. No placeholders: The pattern won't match, so the original message.formatted() path is not taken when there are no args (falls to buffer.append(message))

    Let me verify edge case handling one more time:

  31. Qwen Assistant

    All edge cases pass. Let me now clean up the temporary test files and verify the final state of my changes:

  32. Qwen Assistant

    Let me view the final state of both modified files to confirm everything is correct:

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