kernel crash while running kedr test suite

15 views
Skip to first unread message

tab.de...@gmail.com

unread,
Jul 21, 2016, 3:37:07 PM7/21/16
to kedr-discuss
Hi,

recently I encountered a kernel crash, while running `./run_tests.sh` (see dmesg.txt attached).
I believe the reason of this crash is that my kernel is configured such that CONFIG_NR_CPUS is greater than nr_cpus_ids.
This causes that "cpu" index computed in trace_buffer_read may be also greater than nr_cpus_ids, and that may lead to read
from some trashy memory address in ring_buffer_peek function.
I managed to workaround the issue (see trace_buffer.patch attached), but I'm not sure if this is a correct solution.
I saw "for_each_possible_cpu" usage in "trace_buffer_clear_internal" function, so should I use this one over "for_each_online_cpu"?
Also maybe "last_messages" array can be allocated dynamically? If
CONFIG_NR_CPUS is greater than nr_cpus_ids,
some of the memory will be wasted.
Let me know if should I change anything, so I can submit a pull request if you wish.

Thanks.
dmesg.txt
trace_buffer.patch

Evgenii Shatokhin

unread,
Jul 22, 2016, 4:03:32 AM7/22/16
to tab.de...@gmail.com, kedr-d...@googlegroups.com, Andrey Tsyvarev
Thanks for the info! We will take a look.

Regards,
Evgenii

Mateusz Tabaka

unread,
Jul 22, 2016, 4:17:35 AM7/22/16
to Evgenii Shatokhin, kedr-d...@googlegroups.com, Andrey Tsyvarev
Looks like this is the same issue
https://github.com/euspectre/kedr/issues/31.
Reply all
Reply to author
Forward
0 new messages