DF-5627 / run.log
PPBHX: harness start (production ppb_base.c) PPBHX: --- DF-5626 ppb_poll_bus PPB_POLL busy-spin (ppb_base.c:60-67) --- PPBHX: DF-5626 busy max=5 : ret=35 rstr_reads=50000 (expect exactly 50000 = 5*10000 busy port reads) wall=1000010us (expect >=50000: pure DELAY, never sleeps) PPBHX: DF-5626 busy max=100: ret=35 rstr_reads=1000000 (expect exactly 1000000) wall=19670196us (>=1s single uninterruptible busy window = do_peripheral_wait arg) PPBHX: DF-5626 sleep ctrl max=3: ret=35 rstr_reads=10002 (expect 10002 = 10000 busy + 2 checks) wall=240003us (~30ms but only 10ms busy: PPB_POLL flag is what turns the wait into a full busy spin) PPBHX: --- DF-5625 ppb_ecp_sync/ppb_reset_epp_timeout return void methods (ppb_base.c:159-163,170-174 vs ppc.c:144,1785) --- PPBHX: DF-5625 ppb_ecp_sync() -> 0x66 (void method left marker 0x66 in %eax) PPBHX: DF-5625 ppb_ecp_sync() -> 0x99 (void method left marker 0x99 in %eax) PPBHX: DF-5625 ppb_reset_epp_timeout() -> 0x5a (void method left marker 0x5a in %eax; marker hits=3) PPBHX: DF-5625 the 'int' returns track the void callee's last register state: not a defined value (C UB through the DEVMETHOD dispatch); callers that error-check get garbage PPBHX: --- DF-5627 ppb_get_epp_protocol uninitialized on BUS_READ_IVAR failure (ppb_base.c:100-108) --- PPBHX: DF-5627 stack dirtied 0x41 -> protocol=0x41414141 PPBHX: DF-5627 stack dirtied 0x42 -> protocol=0x42424242 PPBHX: DF-5627 stack dirtied 0x43 -> protocol=0x43434343 PPBHX: DF-5627 fake controller read_ivar returned ENOENT without writing (ppb_base.c:105 discards it); the return value is stale stack content -> in-tree consumer mode2xfer (ppb_msq.c:85) would take the default PANIC branch (DF-5576) or silently pick the wrong EPP protocol PPBHX: --- DF-5628 ppb_poll_bus hz/100 tick arithmetic (ppb_base.c:77,83) --- PPBHX: DF-5628 hz=100 -> hz/100=1 tick(s) per poll sleep; kern.hz is a boot tunable (subr_param.c:199): hz<100 makes the quotient 0 and tsleep(...,0) arms NO timeout (kern_synch.c:691) PPBHX: DF-5628 after 6 ticks: park thread wchan==ident:1 wmesg=ppbhz0 -> STILL ASLEEP: a 10ms timeout never fired because timo==0 means 'sleep forever' in DragonFly tsleep PPBHX: DF-5628 park thread woke (explicit wakeup only, no timeout existed) PPBHX: DF-5628b hz forced to 50 (kern.hz tunable space): production ppb_poll_bus(max=3, PPB_NOINTR) on park thread, peer never matches PPBHX: DF-5628b after ~300ms (busy prologue over): hz-park thread wchan==bus:1 wmesg=ppbpoll -> STILL PARKED IN PRODUCTION ppb_poll_bus: the 30ms timeout never fired (50/100==0 -> timo==0 -> no callout) PPBHX: DF-5628b hz=50 production ppb_poll_bus returned 0 only after wakeup+match (with a working timeout it would have returned EWOULDBLOCK=35 on its own long ago) PPBHX: DF-5628b hz restored to 100 PPBHX: harness done