Fix: lttng-crash: detect truncated files
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 23 Sep 2019 18:31:33 +0000 (14:31 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 25 Sep 2019 16:29:43 +0000 (12:29 -0400)
commite6c6e235ab87233cf273f536188d842768304c55
tree3635c55cec9d9b0f2a9e79d9e0fd67ed95c46819
parentcf86ff2c4ababd01fea7ab2c9c289cb7c0a1bcd5
Fix: lttng-crash: detect truncated files

Detect truncated files which size is smaller than the ring buffer
header.

This can be caused by a situation where sessiond is killed with SIGKILL
while doing a metadata regenerate command.

Without this fix, lttng-crash is killed with a "Bus error" when
encountering a truncated file.

Fixes: #1166
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-crash/lttng-crash.c
This page took 0.030838 seconds and 4 git commands to generate.