On Fri, Aug 18, 2023 at 3:07 AM David Marchand wrote: > It is a "recurring" yet not so well known issue. > This unit test fails if any part of the DPDK did not release all > (hugepage backed) memory and associated hugepages before exiting. > > In your case here, there is a virtio-net device that the container > tries to get its hands on because DPDK scans and probes all available > resources by default (and fails to, in this case, but that's not > important). > Triggering this virtio-net probing makes ethdev allocate its shared > memzone for port data, but nothing in ethdev releases the memzone when > exiting. > Fixing this could be tricky... as the current ethdev code is really > vague around which locks protect what (if anything..). > > I think we hit this issue in the past, and avoided it by running the > tests with dynamically linked DPDK binaries (and by doing this, avoid > the net drivers get loaded). > > I can see that you are running the unit tests with a static binary in > the report you sent. > I think the default is shared mode, so I wonder what could be the > reason why UNH builds with static here. > In any case, could you have a try and switch to > -Ddefault_library=shared (or remove forcing to static mode)? > > Thanks for helping debug this David. I think the default library actually is static, but let me know if I misunderstand: https://git.dpdk.org/dpdk/tree/meson.build. If you meson configure on the output of 'meson setup build' it says static is the default. ``` default_options: [ 'buildtype=release', 'c_std=c11', 'default_library=static', 'warning_level=2', ], ``` I tried a build forcing default_library=shared, and all fast-tests unit tests failed. I can look further into this if you think shared mode might be the best way forward though. But I am assuming for now if static is indeed the default, that is the way we should build for testing. For your patch, it looks like there are actually more eal flags test failures: http://mails.dpdk.org/archives/test-report/2023-August/444170.html. In any case, for debugging purposes, I will do a run with the eal_flags_file_prefix_autotest also included and send you the meson test detail log on slack.