Skip to content

CI: tshark can't read captures on Ubuntu 26.04 runners (AppArmor profile) #2019

Closed

Description

@JarryShaw

Describe the bug
On ubuntu-latest runners that now get Ubuntu 26.04, tshark cannot read the test captures. The PyShark engine jobs and the parity legs fail with TSharkCrashException ... (retcode: 3). The cause is AppArmor: 26.04 ships an enforcing /usr/bin/tshark profile whose top-level profile only reads under /tmp and /usr/share/wireshark, so tshark -r on a file under /home/runner/work is denied.

Reproduction
On draft #2006 at 2df292ea7, job 119422725950 ran on image ubuntu-26.04 with tshark 4.6.4 and failed with:

tshark: You don't have permission to read the file "/home/runner/work/PyPCAPKit/PyPCAPKit/examples/captures/in.pcap".

The same tests pass on ubuntu-24.04 with tshark 4.2.2 (main's job 119413450042). Across the 42 PyShark/parity jobs since 04:20Z, all 3 that landed on 26.04 failed and all 39 on 24.04 passed. The parity 3.10 KTLO leg failed the same way, but it reports success because KTLO failures are downgraded to warnings.

Expected behavior
The PyShark engine tests pass on either image. Users on 25.04 and later hit the same denial with engine='pyshark' on any capture outside /tmp, which is worth a docs note.

System information

  • OS Version: Ubuntu 26.04 (GitHub Actions ubuntu-latest, image ubuntu26/20261018.168)
  • Python Implementation: CPython
  • commit: 2df292ea7 (the image is the variable; main is affected as soon as its jobs land on 26.04)

Additional context
A proposed fix is to have the tshark install steps in unit-tests.yml (the Engines job and the parity job) add a read rule for $GITHUB_WORKSPACE through the profile's local/tshark include, then reload the profile with apparmor_parser -r. This was not reproduced locally, since this host has neither tshark nor AppArmor.

Activity

  1. added
    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)
    ciPull requests that change CI or workflow configuration (ci: subject prefix)
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 21, 2026
  2. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)ciPull requests that change CI or workflow configuration (ci: subject prefix)

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions