CV-Bowen opened a new pull request, #22326:
URL: https://github.com/apache/nuttx/pull/22326
## Summary
`drivers/rptun: optionally silence syslog on a remote-triggered panic`:
when a core panics it asks its peers to panic as well, and each of them
prints its own assertion report, register and task dump into the same
console or log buffer while the crashing core is still printing.
Add `RPTUN_REMOTE_PANIC_SILENT`, default n: before panicking on the
peer's request, set the system wide log mask to `LOG_NONE` with
`nx_setlogmask()` (apache/nuttx#22233). The mask is not restored; a
coredump to syslog still prints, because it raises the mask itself.
`LOG_NONE` is added to `<syslog.h>` for this.
## Impact
- New Kconfig `RPTUN_REMOTE_PANIC_SILENT`, default n; no change unless
enabled.
- New `LOG_NONE` (0) in `<syslog.h>`.
## Testing
Host: Ubuntu 22.04.5 LTS x86_64, QEMU version 10.2.1, sim: cc (Ubuntu
13.1.0-8ubuntu1~22.04) 13.1.0, qemu-armv8a: aarch64-none-elf-gcc (Arm GNU
Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205
The commit builds sim:rpserver, sim:rpproxy, qemu-armv8a:rpserver and
qemu-armv8a:rpproxy with 0 warnings, with and without
`CONFIG_RPTUN_REMOTE_PANIC_SILENT`. imx93-qsb:rpmsg (default n): ITCM
unchanged.
qemu-armv8a:rpserver + qemu-armv8a:rpproxy (both with the default
`CONFIG_RPTUN_AUTO_RESET_IN_PANIC_NOTIFIER=y`). The server runs
`rptun reset /dev/rptun/proxy 2`; the proxy panics and its panic
notifier asks the server to panic too. Crash-log lines
(`dump_*`/`up_dump_*`/"Assertion") printed by each core within 10 s:
| server option | server lines | proxy lines |
|---|---|---|
| n | 36 | 36 |
| y | 0 | 36 |
```
option n, server console:
[ 4.054623] [ 0] [ EMERG] [server] dump_assert_info: Assertion failed
Panic by remote core: proxy: at file: /drivers/rptun/rptun.c:1018 task:
Idle_Task ...
option y, server console: (nothing after the command)
```
No regression in rpmsg: sim:rpserver/rpproxy and
qemu-armv8a:rpserver/rpproxy boot and pass the fixed rpmsg cases (dump, ping,
rpmsgfs; 15/15). qemu-armv8a was built with LIBC_ENVPATH and BINFMT_CHECKEXEC
disabled, which current master needs for nxinit to start nsh there; unrelated
to this change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]