Repository navigation
Collect the kernel crashes cameras recover from, rank them, and pay Club stars for them - #411
Conversation
…lub stars for them A camera on OpenIPC firmware keeps the kernel's log across a crash (pstore), and its WebUI offers the owner a crash log -- which nobody upstream ever sees. The lab's gk7205v300 + imx335 had one since 2026-09-28: a NULL dereference in RGN_PutRegion called from the VENC interrupt, which reads as an ISP bug because hi_isp_run was the task it interrupted. - POST /api/v1/crashes takes the WebUI's crashlog_*.tar.gz (service/internal/ crashes, CRASH.md is the contract); a member can send the one they downloaded from /club. The records are parsed -- ARM, MIPS and arm64 backtraces, oops, BUG, WARNING, panic, a failsafe boot loop -- and filed under a signature, the top five frames without offsets, so one bug from many cameras is one row. pstore's Oops#1 and Panic#2 of one crash are one crash, and the same records sent again are one event. - Signatures are ranked by how bad a crash is and how many cameras it hits, more when today's firmware still has it. /crashes lists them publicly: signatures, chips and status, never a log, a camera or a member. - Maintainers triage at /club/crashes or with `openipc crashes status`, and see what reproducing one takes: the chips, sensors and builds it was seen on, the firmware builds matching its kernel, the task and what it interrupted, the warnings and i2c/MMZ trouble before it, and each log with MACs and IP addresses replaced by keyed hashes. The bundle as sent is kept in PostgreSQL and never served; events and bundles are append-only. - Stars (crash_stars, migration 030) are paid by the nightly settlement only: 1 per camera and bug, 3 more to the first reporter once confirmed, 5 when fixed, at most 10 a month. A crash asked for with sysrq pays nothing, and marking a signature bogus takes back what it paid. A camera's crashes are its owner's through the Open Wall's link. The leaderboard and the member's total count the third ledger. - nginx proxies /api/v1/crashes on both vhosts.
PR Summary by QodoCollect and rank camera kernel crashes with Club star rewards
AI Description
Diagram
High-Level Assessment
Files changed (40)
|
Code Review by Qodo
1.
|
…ner, keep the ledger net through merges - Titles, trace reasons, the command line and the lines before a crash are redacted before they are stored, so a panic message carrying an address reaches neither the public list nor a maintainer's detail. Redaction finds IPv6 addresses and dotted MACs, and looks at an IPv4 address's neighbours instead of matching them, so ip=10.0.0.2:10.0.0.1 loses both. - A SoC or sensor that is not a chip's name is refused (400), never stored. - The same records are one crash per camera: two cameras' identical failsafe notes are two. - MIPS's own "Oops[#1]:" header opens a trace, as do "CPU 0 Unable to handle..." lines. - A crash with a MAC pays the camera's linked owner, whoever sent it, and a member sending from /club may name only a camera of theirs. Cameras are counted by MAC, or by sender address when there is none. - The ledger is net per bug through merges: merging pays nothing again, bogus takes back what the bug and everything merged into it hold, undoing it pays again, and the monthly cap counts net stars. A signature merged into another is not marked bogus alone. - A triage keeps the fields it does not send; the CLI changes only the flags given, and the /club form starts from the merge target. - The daily limits are counted inside the insert, under the client's and the camera's locks.
|
Qodo review addressed in ecdb979. All 13 findings were real; each is fixed and has a test.
|
Thanks for the detailed update. The fixes in |
A camera on OpenIPC firmware keeps the kernel's log across a crash (pstore,
S98crashlog), and its WebUI offers the owner a crash log. Nobody upstream ever sees it. For example, the lab's gk7205v300 + imx335 has had one since 2026-09-28. It is a NULL dereference inRGN_PutRegion [open_rgn]called from the VENC interrupt (ChnlVeduISR), which reads as an ISP bug becausehi_isp_runwas the task it interrupted. That bundle is now the parser's test fixture.What this adds
POST /api/v1/crashesaccepts the WebUI'scrashlog_*.tar.gz. The contract isservice/internal/crashes/CRASH.md. A signed-in member can also send the one they downloaded, from the new My crash reports section on/club.fn [module], without offsets. One bug from many cameras is one row.Oops#1andPanic#2of one crash count as one crash, and the same records sent again are one event./crashesis public and lists signatures, chips, sensors and status. It never shows a log, a camera or a member./club/crashesis for maintainers, and so isopenipc crashes list|show|status|settle|takedown.crash_bundles, at most 256 KB each) and never served. Events and bundles are append-only, guarded like owner reports; onlytakedownremoves one.crash_stars, a third ledger, migration 030.settle-wall.bogustakes back everything a signature paid.^~ /api/v1/crasheson both vhosts (512k bodies).Not in this PR
S98crashlogadditions (OpenIPC/firmware): ameta.jsonwith versions and a strippedmajestic.yaml, printk timestamps, and keeping the last 3 crashes.Tests
service/run.sh test, includingdeploytest, passes./meand the leaderboard.deploy/nginx/check-config.shpasses.frontend/: lint, typecheck andnpm testpass (707 tests, including the /club crash section). The build produces/crashes,/ru/crashesand/club/crashes.