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

    I'll start by exploring the repository structure to understand the codebase and locate the logging-related components.

  3. Qwen Assistant

    This is a Java/Maven project. The issue is about gRPC logging where JUL (java.util.logging) messages with MessageFormat placeholders ({0}, {1}) are not being properly converted when bridged to SLF4J. Let me look for logging-related files, particularly any JUL to SLF4J bridge handlers.

  4. Qwen Assistant

    Let me search for any existing JUL bridge handler or configuration in the server module:

  5. Qwen Assistant

    Let me look for the server main class and logging configuration.

  6. Qwen Assistant

    I need to find the main server class and any logging initialization. Let me search for the ArcadeDB server main class.

  7. Qwen Assistant

    I can see a ServerLogManager class being used. Let me look at that class:

  8. Qwen Assistant

    Now let me look at the DefaultLogger which seems to be the main logger implementation:

  9. Qwen Assistant

    Now I understand the architecture. The DefaultLogger uses java.util.logging (JUL) internally. The issue is that gRPC also uses JUL, but when gRPC logs messages with parameters (using MessageFormat-style {0}, {1} placeholders), those parameters are stored in the LogRecord.parameters array. However, when ArcadeDB's logging system receives these JUL log records, it's not processing the parameters correctly.

    Let me look for where the bridge between JUL and ArcadeDB's logging might be happening:

  10. Qwen Assistant

    Now let me search for how JUL handlers are configured in the project. The issue is about gRPC's JUL messages not having their parameters formatted. Let me look for any custom JUL Handler:

  11. Qwen Assistant

    The issue is about gRPC's JUL (java.util.logging) log messages not having their parameters formatted. The key insight from the issue is:

    1. gRPC uses JUL with MessageFormat-style placeholders ({0}, {1})
    2. The ArcadeDB server log shows these placeholders unsubstituted
    3. The parameters are stored in LogRecord.parameters array
    4. The fix should ensure that when JUL LogRecords are processed, their parameters are formatted using MessageFormat

    Looking at the code, I see that ArcadeDB uses JUL internally. The DefaultLogger class logs to JUL. But the issue is that when other JUL loggers (like gRPC) log messages with parameters, those parameters aren't being formatted.

    The issue is in the JUL Handler (like ConsoleHandler or FileHandler) that processes these log records. The formatter needs to check if the LogRecord has parameters and format them.

    Let me look at the LogFormatter class:

  12. Qwen Assistant

    Let me continue looking at the LogFormatter class to understand how it formats log records.

  13. Qwen Assistant

    Now I found the issue! In LogFormatter.customFormatMessage(), the code uses message.formatted(additionalArgs) which uses String.format() style (with %s, %d, etc.), but gRPC uses MessageFormat style with {0}, {1}, etc.

    The String.formatted() method uses Formatter pattern syntax (%s, %d, etc.), not MessageFormat pattern syntax ({0}, {1}). When gRPC logs with MessageFormat placeholders and the parameters are in the LogRecord's parameters array, the String.formatted() call will fail to substitute them and either throw an exception (caught and ignored) or leave the placeholders as-is.

    Let me verify by checking how gRPC logs:

  14. Qwen Assistant

    Looking at the issue, the problem is in LogFormatter.customFormatMessage(). It uses message.formatted(additionalArgs) which is String.format() style (using %s, %d, etc.), but gRPC uses MessageFormat style with {0}, {1}, etc.

    When gRPC logs a message with MessageFormat placeholders, the String.formatted() method can't substitute {0}, {1} and either throws an IllegalFormatException (which is caught and the raw message is used) or leaves the placeholders literal.

    Let me also check the AnsiLogFormatter to see if it has the same issue:

  15. Qwen Assistant

    Now I understand the issue! Both LogFormatter and AnsiLogFormatter use message.formatted(additionalArgs) which uses String.format() style placeholders (%s, %d, etc.), but gRPC uses MessageFormat style placeholders ({0}, {1}, etc.).

    When gRPC logs a message like "[{0}] Failed to resolve name. status={1}" with parameters ["channel-7", "UNAVAILABLE: ..."], the String.formatted() method can't substitute these {0}, {1} placeholders because they're not valid String.format() patterns.

    Let me first create a test to reproduce this issue:

  16. Qwen Assistant

    I've confirmed the issue. When String.formatted() is used with MessageFormat-style placeholders ({0}, {1}), it doesn't substitute them and just returns the original message with placeholders intact. This is exactly what the issue describes.

    Now let me look at how the codebase currently handles this and implement a fix. The fix should be in both LogFormatter and AnsiLogFormatter to properly handle MessageFormat-style placeholders.

  17. Qwen Assistant

    Now I understand the issue. The LogFormatter and AnsiLogFormatter classes use message.formatted() which expects %s-style format specifiers, but gRPC uses {0}-style MessageFormat placeholders. I need to fix both formatters to handle MessageFormat-style placeholders.

    Let me fix the LogFormatter class first:

  18. Qwen Assistant

    The user seems to have encountered an error with the tool call. Let me try again with the correct syntax for opening a file.

  19. Qwen Assistant

    Now I understand the issue clearly. The LogFormatter.customFormatMessage() method uses message.formatted(additionalArgs) which expects %s-style format specifiers, but gRPC uses {0}-style MessageFormat placeholders. I need to modify both LogFormatter and AnsiLogFormatter to handle MessageFormat-style placeholders properly.

    Let me create the fix:

  20. Qwen Assistant

    Let me try using the heredoc syntax for the edit command:

  21. Qwen Assistant

    Let me try using sed to make the changes:

  22. Qwen Assistant

    OK, I was in the middle of fixing the LogFormatter.java file. Let me continue with the fix using a different approach since python3 is not available. I'll use a here-document with cat to create the fixed file.

  23. Qwen Assistant

    I've successfully updated the LogFormatter.java file. Now I need to update the AnsiLogFormatter.java file with the same fix. Let me also verify the changes to LogFormatter.java were applied correctly.

  24. Qwen Assistant

    Let me verify the changes I made to both files are correct by viewing them.

  25. Qwen Assistant

    Good, the LogFormatter.java file has been updated correctly. Now let me verify the AnsiLogFormatter.java file as well.

  26. Qwen Assistant

    Now let me create a test script to verify that the fix works correctly. I need to:

    1. Test that MessageFormat-style placeholders ({0}, {1}) are properly formatted
    2. Test that Formatter-style placeholders (%s, %d) still work
    3. Test edge cases like missing parameters, mismatched placeholders, etc.

    Let me create a test to verify the fix.

  27. Qwen Assistant

    Let me fix the missing imports in the test file.

  28. Qwen Assistant

    I need to add the import for IllegalFormatException. It's in the java.util.format package.

  29. Qwen Assistant

    The issue is that IllegalFormatException is a subclass of IllegalArgumentException, so the outer catch block already catches it. I need to restructure the catch blocks. Let me fix this.

  30. Qwen Assistant

    The test passed! However, I realize I need to simplify the fix in the actual source files to avoid the nested try-catch complexity. Let me update the LogFormatter.java and AnsiLogFormatter.java files with a cleaner implementation.

  31. Qwen Assistant

    I successfully updated the LogFormatter.java file. Now I need to update the AnsiLogFormatter.java file with the same fix.

  32. Qwen Assistant

    Now let me verify both files are correctly updated and then compile and test them.

  33. Qwen Assistant

    The code compiles successfully. Now let me run the existing tests to make sure I haven't broken anything.

  34. Qwen Assistant

    The tests passed! Now let me create a more comprehensive test to verify the fix works correctly for the gRPC case described in the issue.

  35. Qwen Assistant

    Excellent! The fix is working correctly. Now let me verify that the existing tests still pass and check if there are any other places in the codebase that might need similar fixes.

  36. Qwen Assistant

    Let me check if there are any other places in the codebase that might need similar fixes:

  37. Qwen Assistant

    Let me verify the changes I made are correct and complete by running a broader set of tests to ensure nothing is broken.

  38. Qwen Assistant

    Let me verify the fix is working correctly by reviewing the changes I made and running a quick test to confirm the changes compile and the tests pass.

  39. Qwen Assistant

    Let me check the changes I made to both files and make sure everything is correct before submitting. Let me also check the diff for AnsiLogFormatter.java.

  40. Qwen Assistant

    I see that I added an unnecessary import java.text.MessageFormat; to AnsiLogFormatter.java since it's now using the inherited formatMessage() method from the parent class. Let me fix that.

  41. Qwen Assistant

    Let me continue verifying the fix and run the tests to make sure everything is working correctly.

  42. Qwen Assistant

    The diff looks clean now. The AnsiLogFormatter now uses the formatMessage() method inherited from LogFormatter, which handles both MessageFormat-style and Formatter-style placeholders.

    Let me compile and run the tests to verify everything is working correctly.

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