Validator panic during alpide data parsing
Observed behaviour
Running check all its-stave
on o2_rawtf_run00536082_tf00000001_epn094.raw
causes a panic in LaneAlpideFrameAnalyzer::analyze_alpide_frame
while parsing ALPIDE data from FEE ID 24612 as seen below.
RUST_BACKTRACE=1 fastpasta check all its-stave o2_rawtf_run00536082_tf00000001_epn094.raw --filter-fee 24612
▸▹▹▹▹ [ ]
INFO - ITS detected
▸▹▹▹▹ [ Analyzing 19 HBFs ]
WARN - Unknown ALPIDE word: 0xF5
thread 'Validator #24612' panicked at 'called `Option::unwrap()` on a `None` value', /home/mkonig/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastpasta-1.13.0/src/analyze/validators/its/alpide/lane_alpide_frame_analyzer.rs:220:52
stack backtrace:
0: rust_begin_unwind
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/panicking.rs:593:5
1: core::panicking::panic_fmt
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/panicking.rs:67:14
2: core::panicking::panic
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/panicking.rs:117:5
3: fastpasta::analyze::validators::its::alpide::lane_alpide_frame_analyzer::LaneAlpideFrameAnalyzer::analyze_alpide_frame
4: fastpasta::analyze::validators::its::alpide::check_alpide_data_frame
5: fastpasta::analyze::validators::its::cdp_running::CdpRunningValidator<T,C>::process_alpide_data
6: fastpasta::analyze::validators::its::cdp_running::CdpRunningValidator<T,C>::process_status_word
7: fastpasta::analyze::validators::its::lib::do_payload_checks
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'Analysis' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', /home/mkonig/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastpasta-1.13.0/src/analyze/validators/lib.rs:82:18
stack backtrace:
0: rust_begin_unwind
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/panicking.rs:593:5
1: core::panicking::panic_fmt
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/panicking.rs:67:14
2: core::result::unwrap_failed
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/result.rs:1651:5
3: fastpasta::analyze::validators::lib::ValidatorDispatcher<T,C>::dispatch_by_id
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
ERROR - Analysis thread terminated early: Any { .. }
▪▪▪▪▪ [ Analyzing 100 HBFs ] 1 Errors in data!... completed
▸▹▹▹▹ [ Processing 1 error messages ]
ERROR - 0x4A: [E73] FEE ID:24612 ALPIDE data frame ending at 0x14E Invalid number of lanes: 13, expected 14. Lanes: [4, 6, 7, 8, 9, 10, 11, 12, 13, 0, 1, 3, 5]
▪▪▪▪▪ [ Processing 1 error messages ] ... completed
▪▪▪▪▪ [ Generating report ] ... completed
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ REPORT │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ GLOBAL STATS │
│ ═══════════════════════════════════════════════════════════════════════════════════════ │
│ STATISTIC VALUE NOTES │
│ Total Errors 1 E73 │
│ Run Trigger Type 0x6A03 SOC │
│ Total RDHs 140592 │
│ Links observed 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 │
│ FEE IDs seen 0 1 2 3 4 5 6 7 8 9 10 11 256 257 258 259 260 261 262 263 │
│ 264 265 266 267 512 513 514 515 516 517 518 519 520 521 522 │
│ 523 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 │
│ 4107 4108 4109 4110 4111 4352 4353 4354 4355 4356 4357 4358 │
│ 4359 4360 4361 4362 4363 4364 4365 4366 4367 4608 4609 4610 │
│ 4611 ... 360 more │
│ +-------------------------+---------------------------------------------------+---------------------------------------+ │
│ | DETECTED ATTRIBUTES | FILTER STATS | ALPIDE STATS | │
│ | ═══════════════════════ | ═════════════════════════════════════════════════ | ═════════════════════════════════════ | │
│ | attribute detected | statistic value notes | statistic value notes | │
│ | RDH Version 7 | RDHs 300 | Chip Trailers seen 0 | │
│ | Data Format 2 | HBFs 100 | Busy Violations 0 | │
│ | System ID ITS | Data size 138.28 KiB RDHs: 18.75 KiB | Data Overrun 0 | │
│ | | Payloads: 119.53 KiB | Transmission in Fatal 0 | │
│ | | FEE ID 24612 | Flushed Incomplete 0 | │
│ | | Layers/Staves L6_36 | Strobe Extended 0 | │
│ | | | Busy Transitions 0 | │
│ +-------------------------+---------------------------------------------------+---------------------------------------+ │
│ Processed in 48.47ms │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Key information
WARN - Unknown ALPIDE word: 0xF5
thread 'Validator #24612' panicked at 'called `Option::unwrap()` on a `None` value', /home/mkonig/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastpasta-1.13.0/src/analyze/validators/its/alpide/lane_alpide_frame_analyzer.rs:220:52
And an error found very early in the data:
ERROR - 0x4A: [E73] FEE ID:24612 ALPIDE data frame ending at 0x14E Invalid number of lanes: 13, expected 14. Lanes: [4, 6, 7, 8, 9, 10, 11, 12, 13, 0, 1, 3, 5]
Line that panics: self.validated_bc = unique_bcs.first().unwrap().bunch_counter;
So it seems like no bunch counters are found for the lane which is very odd.
Edited by Marc Konig