lkml.org 
[lkml]   [2013]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf record: Delete file if a failure occurs writing the perf data file

* David Ahern <dsahern@gmail.com> wrote:

> If perf fails to write data to the data file (e.g., ENOSPC error) it fails
> with the message:
> failed to write perf data, error: No space left on device
>
> and stops — killing the workload too. The file is an unknown state.
> Trying to read it (e.g., perf report) fails with a SIGBUS error.

Ouch - guys please first investiage that SIGBUS, we should not behave
unexpectedly on _any_ (read: random) perf.data file contents. The SIGBUS
likely suggests that the parsing isn't robust enough.

> Fix by deleting the file on a failure.

That only works around the issue - if the same data file is produced by
some other method (or maliciously) then perf report will still SIGBUS ...

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2013-11-11 11:01    [W:0.073 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site