Repository navigation
Read the firmware's meta.json from a crash bundle, and its chip and sensor when the log has lost them - #413
Conversation
PR Summary by QodoUse bundled crash metadata when chip and sensor are missing
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1.
|
|
Both findings addressed in 0a2540c:
|
…ensor when the log has lost them OpenIPC/firmware now writes meta.json into each crash bundle: the build, the kernel, the command line, the chip, the sensor, the majestic version and the pipeline's settings. The WebUI sends it as the meta field, but a bundle downloaded and sent from /club carries it only inside, where it was ignored. A pstore record is the tail of the kernel's log, and on a camera whose log fills up the lines naming the chip and sensor are gone from it: a gk7205v300 + imx335 flooding its log with sensor i2c aborts sent a crash filed under no chip at all. meta.json still names them, and is now used for the SoC and sensor when neither the camera nor the log says.
…oes not cost the crash The 16-record limit counts dmesg records only, so a bundle of sixteen and its meta.json is within it. A meta.json found in the bundle that is not JSON is left out; one sent as the meta field must still be JSON.
The events in TestMetaInTheBundle share the test's one fixed time, so the newest by received_at was any of them.
|
Rebased onto master. My commit fixing the daily-limit clock is dropped: #414 fixed the same thing on master (an event is stamped and counted on one clock). The test lookup by event id is kept, as its own commit. |
OpenIPC/firmware#2556 makes
S98crashlogwrite ameta.jsoninto each crash bundle: the firmware build, kernel, command line, chip, sensor, majestic version, and the pipeline's settings without secrets. OpenIPC/majestic-webui#647 sends it as themetafield. A bundle downloaded from the WebUI and sent from/club, though, carriesmeta.jsononly inside the archive, and the server ignored it.Why it matters
A pstore record is the tail of the kernel's log. A gk7205v300 + imx335 whose log was flooded with sensor i2c aborts sent a crash with no chip or sensor in it at all: the boot lines naming them were long gone from the record.
meta.jsonstill names them.What changes
Unpackkeepsmeta.json. When nometafield is sent, the server uses the bundle's copy, redacted like the field.meta.jsonwhen neither the camera's form fields nor the log name them. They pass the same chip-name check as the form fields; what the camera sends outright still wins.CRASH.mddocuments it.Tests
TestMetaInTheBundle:meta.jsonis stored with it;service/run.sh test ./internal/crashes/passes. On dev, a real bundle withmeta.jsonfrom a gk7205v300 + imx335, sent with ametafield, was stored with the build, chip and 44 configuration lines.