nDPI/.github
Ivan Nardi 27071bc6e7
CI: fix armhf tests failing due to QEMU readdir bug (#3088)
Problem:
--------
The armhf CI tests were failing because readdir() returns NULL with
errno=EOVERFLOW when running 32-bit ARM emulation via QEMU user-mode
on a 64-bit host. This is a known QEMU bug (#1805913).

Root cause: The host kernel's getdents64 syscall returns 64-bit inode
numbers. When QEMU passes these to 32-bit ARM glibc, they overflow the
32-bit range, causing glibc to return EOVERFLOW. This affects any code
that lists directory contents (e.g., ndpi_load_categories_dir).

See: https://bugs.launchpad.net/qemu/+bug/1805913
     https://gitlab.com/qemu-project/qemu/-/issues/263

Possible fixes:
---------------
1. Use tmpfs filesystem - inode numbers start small (1, 2, 3...)
   and fit in 32-bit range
2. Use real ARM hardware or full system emulation instead of
   user-mode emulation
3. Skip directory-loading tests on armhf emulation
4. Wait for QEMU to fix the bug (open since 2018)

Implemented fix:
----------------
Use tmpfs for the build and test environment:
- Switch from 'uses: docker://' to 'run: docker run --privileged'
  to allow mounting tmpfs inside the container
- Create tmpfs at /build and copy entire source tree there
- Build and run tests from tmpfs where inode numbers are small

This approach was validated locally - all tests pass with tmpfs
while they fail on the host-mounted filesystem.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 11:57:24 +01:00
..
ISSUE_TEMPLATE Move from PCRE to PCRE2 (#2134) 2023-11-01 14:16:49 +01:00
workflows CI: fix armhf tests failing due to QEMU readdir bug (#3088) 2026-01-15 11:57:24 +01:00
PULL_REQUEST_TEMPLATE.md Performed some grammar and typo fixes (#2511) 2024-07-19 11:22:35 +02:00