Include s_kcrashErrorMessage in our traces
ClosedPublic

Authored by apol on Mar 11 2020, 3:50 PM.

Details

Summary

CCBUG: 375913

Test Plan

Called kill -SIGSEGV plasma-discover and got to see the string I passed.

Diff Detail

Repository
R871 DrKonqi
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
apol created this revision.Mar 11 2020, 3:50 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 11 2020, 3:50 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
apol requested review of this revision.Mar 11 2020, 3:50 PM

Probably should also get added to one of the parser tests to make sure it doesn't fall on the face.

Talking about parser, I feel like this might benefit from highlighting somehow, currently it's very squished in with the random stuff in the header. That'll make it hard to search bugzilla for, globally, but also across different errors within the same application, as the only identifying element is $1 and I'm sure that's profoundly ambiguous as a search term. Admittedly the only way to improve it I can think of is print "Content of s_kcrashErrorMessage:"\nprint s_kcrashErrorMessage\n". The fact that this also prints empty messages doesn't exactly fill me with joy but I have no input on how to improve it either.

Application: dragon (dragon), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
$1 = "!!! HALLO THIS IS A MESSAGE !!", '\000' <repeats 993 times>
[Current thread is 1 (Thread 0x7f255f320880 (LWP 19076))]

Thread 18 (Thread 0x7f250cff9700 (LWP 19093)):
#0  0x00007f255628d9f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x2544640) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0
apol updated this revision to Diff 77452.Mar 11 2020, 7:00 PM

Include a usage in the test app, adapt to changes in kcrash

sitter accepted this revision.Mar 12 2020, 11:57 AM

LGTM for when the kcrash diff is ready.

This revision is now accepted and ready to land.Mar 12 2020, 11:57 AM
This revision was automatically updated to reflect the committed changes.

When this symbol isn't present, gdb just aborts and you don't get any back trace anymore:

Error in sourced command file:
No symbol "s_kcrashErrorMessage" in current context.