Skip to content

Remove LOGP message to avoid crash with long log texts.#8351

Merged
ktf merged 1 commit intoAliceO2Group:devfrom
pbuehler:dev
Mar 15, 2022
Merged

Remove LOGP message to avoid crash with long log texts.#8351
ktf merged 1 commit intoAliceO2Group:devfrom
pbuehler:dev

Conversation

@pbuehler
Copy link
Copy Markdown
Collaborator

No description provided.

@pbuehler pbuehler requested a review from a team as a code owner March 15, 2022 10:26
@ktf ktf merged commit 8f386e7 into AliceO2Group:dev Mar 15, 2022
@ktf
Copy link
Copy Markdown
Member

ktf commented Mar 15, 2022

Not sure I get the reason for the crash.

@pbuehler
Copy link
Copy Markdown
Collaborator Author

This LOGP used to print out the contents of a json file - the --aod-writer-json. The entire text of the json was converted to a std::string and provided to LOGP as text to print. When the json file exceeded a given length, the LOGP started to crash.

@ktf
Copy link
Copy Markdown
Member

ktf commented Mar 15, 2022

@rbx @dennisklein does this sound familiar? Do we have a limit for the formatting variables in fmt?

@rbx
Copy link
Copy Markdown
Contributor

rbx commented Mar 15, 2022

I've not seen such a limitation. If there is one, it must be in fmt. LOGP passes it through to fmt directly:
https://github.com/FairRootGroup/FairLogger/blob/master/logger/Logger.h#L433

After fmt::format, the content is given to std::ostringstream, which at the end ends up in fmt::print. If there is a custom sink registered, something could go wrong there - it happens before fmt::print:
https://github.com/FairRootGroup/FairLogger/blob/master/logger/Logger.cxx#L245-L268

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants