You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(benchmark): a pcap engine's loader OSError kills the whole environment on macOS and Windows #2129
On macOS and Windows runners, the benchmark's 3.10 and 3.11 pcap_ct environments die before measuring anything. The cause is that examples/benchmark/benchmark.py's _unavailable doesn't recognise the loader errors pcap-ct raises there. Seen in the #2128 runner-comparison run, 40047570595.
The error per runner:
macOS:OSError: dlopen(libc.so.6 …). pcap-ct's libpcap loader looks for a Linux libc.
Windows:OSError: Cannot find npcap/wpcap.dll, because Chocolatey's Wireshark doesn't install Npcap.
Why it kills the environment:
_unavailable turns an OSError into an explained "not measured" reason only when its message contains libpcap.
These two messages don't, so preflight("pypcap") in the pcap_ct environment re-raises and the whole environment exits.
On 3.12+, the not-installable note answers the pypcap check before any import, so those environments survive.
Effects:
The 3.10/3.11 columns rest on half their samples.
The reason recorded for pcap_ct is "package is not installed" rather than the real loader error.
Fix: treat an OSError raised while importing or opening a pcap engine as unavailable, with its message as the reason, whatever the wording. The engine then becomes an explained row, and the environment carries on with the other engines. Add a test with each of the two messages.
Activity
fix(benchmark): treat a pcap engine's loader OSError as unmeasured, n…