You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Pulsar logs are truncated when logging to files and Pulsar runs out of direct memory when -Dpulsar.allocator.exit_on_oom=true #17587
I searched in the issues and found nothing similar.
Version
2.10.x
Minimal reproduce step
It's possible to reproduce the issue when running Pulsar in a configuration where Pulsar logs to log files. (a VM based deployment). To reproduce, configure the direct memory to a low value and stress the broker with sufficient load so that the direct memory runs out.
This problem doesn't appear in Kubernetes environments since logging uses System.out / stdout which flushes after each line by default.
What did you expect to see?
the Pulsar logs should be writted to disk before Pulsar exits the Java process
What did you see instead?
Pulsar log files are truncated and don't contain the last logged lines
changed the title [-][Bug] Pulsar logs are truncated when logging to files and Pulsar runs out of direct memory [/-][+][Bug] Pulsar logs are truncated when logging to files and Pulsar runs out of direct memory when -Dpulsar.allocator.exit_on_oom=true[/+]on Sep 12, 2022
Activity
[-][Bug] Pulsar logs are truncated when logging to files and Pulsar runs out of direct memory [/-][+][Bug] Pulsar logs are truncated when logging to files and Pulsar runs out of direct memory when -Dpulsar.allocator.exit_on_oom=true[/+]lhotari commentedon Sep 12, 2022
It seems that
LogManager.shutdown();should be called beforeRuntime.getRuntime().haltis called in the Pulsar code base.