ci: build: enable exception tracing on arm64 targets
For some unknown reason upstream Linux kernel in version 4.16 via commit
5ee39a71fd89 ("arm64: Disable unhandled signal log messages by default")
silenced the reporting of traces for user space exceptions and thus
making arm64 the only architecture having this disabled by default:
arch/arm64/kernel/traps.c:int show_unhandled_signals = 0;
arch/csky/kernel/traps.c:int show_unhandled_signals = 1;
arch/loongarch/mm/fault.c:int show_unhandled_signals = 1;
arch/mips/mm/fault.c:int show_unhandled_signals = 1;
arch/parisc/mm/fault.c:int show_unhandled_signals = 1;
arch/powerpc/kernel/signal.c:int show_unhandled_signals = 1;
arch/riscv/kernel/traps.c:int show_unhandled_signals = 1;
arch/s390/mm/fault.c:int show_unhandled_signals = 1;
arch/sparc/mm/fault_32.c:int show_unhandled_signals = 1;
arch/sparc/mm/fault_64.c:int show_unhandled_signals = 1;
arch/x86/mm/fault.c:int show_unhandled_signals = 1;
We would like to be aware about such exceptions at least during
development, so lets enable it in development builds in the same spirit
as we did for coredumps in commit 6cf5635bf50e ("ci: generate coredumps
during development").
References: PCF-1107, PCF-1108
Signed-off-by: Petr Štetiar <ynezz@true.cz>
This commit is contained in:
parent
cd15811ae7
commit
d31e6de673
@ -35,10 +35,11 @@
|
||||
|
||||
- |
|
||||
if [ -z "$CI_COMMIT_TAG" ] && [ "$CI_DESIGNATED_BRANCH" != "$CI_COMMIT_BRANCH" ]; then
|
||||
echo "Enabling coredumps in the build."
|
||||
echo "Enabling coredumps and exception tracing in the build."
|
||||
export CI_BUILD_ENABLE_COREDUMPS=1
|
||||
export CI_BUILD_ENABLE_EXCEPTION_TRACE=1
|
||||
else
|
||||
echo "Coredumps are disabled in this build."
|
||||
echo "Coredumps and exception tracing are disabled in this build."
|
||||
fi
|
||||
|
||||
- for script in .gitlab/scripts/build.d/*; do bash "$script"; done
|
||||
|
||||
15
.gitlab/scripts/build.d/02_ci_enable_exception_tracing.sh
Normal file
15
.gitlab/scripts/build.d/02_ci_enable_exception_tracing.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
[ -n "$CI_COMMIT_TAG" ] && exit
|
||||
[ -z "$CI_BUILD_ENABLE_EXCEPTION_TRACE" ] && exit
|
||||
|
||||
name=$(basename "$0")
|
||||
mkdir -p files/etc/uci-defaults
|
||||
|
||||
cat > "files/etc/uci-defaults/$name" <<EOF
|
||||
trace_file=/proc/sys/debug/exception-trace
|
||||
[ -f "\$trace_file" ] || exit 0
|
||||
logger -t "uci-defaults" -p daemon.warn "prplOS: enabling exception tracing"
|
||||
echo 1 > "\$trace_file"
|
||||
exit 1 # keep for every boot
|
||||
EOF
|
||||
Loading…
Reference in New Issue
Block a user