Skip to content

info level log for pipeline abort#6459

Merged
garyschulte merged 5 commits intobesu-eth:mainfrom
garyschulte:test/log-pipeline-abort
Jan 30, 2024
Merged

info level log for pipeline abort#6459
garyschulte merged 5 commits intobesu-eth:mainfrom
garyschulte:test/log-pipeline-abort

Conversation

@garyschulte
Copy link
Contributor

@garyschulte garyschulte commented Jan 24, 2024

PR description

Add a summarize stack log util, use it in Pipeline to summarize abort errors at an info level

Fixed Issue(s)

@github-actions
Copy link

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.
  • I thought about the changelog and included a changelog update if required.
  • If my PR includes database changes (e.g. KeyValueSegmentIdentifier) I have thought about compatibility and performed forwards and backwards compatibility tests

Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion to add a comment to make it obvious we want this stacktrace at info level

} else {
LOG.info("Unexpected exception in pipeline. Aborting.");
LOG.debug("Unexpected exception in pipeline. Aborting.", t);
LOG.info("Unexpected exception in pipeline. Aborting.", t);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

          // log the stacktrace at info to help troubleshoot sync stuck issues

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it should be at warn actually

@garyschulte garyschulte force-pushed the test/log-pipeline-abort branch from 68b4ab1 to 252e3c3 Compare January 30, 2024 18:41
@garyschulte garyschulte marked this pull request as ready for review January 30, 2024 18:42
Copy link
Contributor

@jflo jflo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested improvement, non-blocking.

StackTraceElement[] stackTraceElements = throwable.getStackTrace();

List<String> stackTraceSummary = new ArrayList<>();
for (StackTraceElement element : stackTraceElements) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add some kind of bailout in case of a crazy long loop or recursion stack?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a max depth of 20, since this is supposed to be a summary 👍

@garyschulte garyschulte force-pushed the test/log-pipeline-abort branch from 80a5161 to 23f1e13 Compare January 30, 2024 20:03
Signed-off-by: garyschulte <garyschulte@gmail.com>
… pipeline abort use summarize Stack at info level

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
@garyschulte garyschulte force-pushed the test/log-pipeline-abort branch from 23f1e13 to e7d5bac Compare January 30, 2024 20:04
@garyschulte garyschulte enabled auto-merge (squash) January 30, 2024 20:12
@garyschulte garyschulte merged commit 8972d67 into besu-eth:main Jan 30, 2024
@garyschulte garyschulte deleted the test/log-pipeline-abort branch January 30, 2024 21:06
jflo pushed a commit to jflo/besu that referenced this pull request Jan 30, 2024
* info level log for pipeline abort
* add depth protection

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
jflo pushed a commit to jflo/besu that referenced this pull request Jan 30, 2024
* info level log for pipeline abort
* add depth protection

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
jflo pushed a commit to jflo/besu that referenced this pull request Jan 30, 2024
* info level log for pipeline abort
* add depth protection

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants