-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
important log messages may be truncated #6545
Comments
This should have been obvious, but the internal flux log implementation has a fixed length (2K) buffer into which the stdlog messages are rendered. Since this includes other data besides just the log message itself, messages will be truncated well below 2K characters. flux-core/src/common/libflux/flog.h Line 24 in 2bbe885
flux-core/src/common/libflux/flog.c Lines 28 to 34 in 2bbe885
Perhaps this fixed buffer was used to avoid memory allocations when OOM, though I'm guessing there's likely memory allocations if the log data is forwarded via messages or appended to the dmesg buffer? |
Yeah I was proabably thinking about the scalability of a million nodes logging towards the root or some other imaginary thinking :-) No harm in detecting truncation and trying again with a malloc maybe? Then at least the common case won't abuse the heap. |
Not sure where the truncation is occurring, but an important log message resulting from the following
flux_log()
call was truncated influx dmesg
:In this case >4000 nodes were affected, and the very long nodelist in
hosts
caused the log message to get truncated, suppressing the actual important bits of the message that sysadmins were searching for (e.g. the jobid).The text was updated successfully, but these errors were encountered: