-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests fail non-deterministically (Error: error retrieving size of image) #217
Comments
It happens regularly in my local machine as well. I usually rerun the tests, but it's a pain for the CI. Good to know we have an issue for this. |
This only started happening when I added concurrent tests in the CI. Running them in sequence doesn't seem to generate this. |
Makes sense. I wonder if this is something that may bite users once we introduce parallel conversions. If a conversion thread is using |
I wondered the same. But that has never happened to me. |
I'm adding this issue to the 0.5.0 milestone, because it hurts development velocity, and is probably easy to fix. We may choose to drop it, of course, but it's worth investigating it. |
Running the command
|
Quick question: what's the Podman version you tested? I'm asking because while I have encountered this on Ubuntu 20.04, I haven't encountered it in Fedora or later Ubuntu versions, so it may be something that's fixed. If this is the case, we can run the tests sequentially in older versions, and in parallel for newer ones. |
Podman version |
I was taking a look at this as the issue is quite frustrating. The reason why this happens appears to be a race condition of calculating the image's digests when multiple layers are involved (no, it is not cached). The issue is similar to containers/podman#12582. What solved itI moved from podman |
Finding the first working versionbash script (in case this ever needs to be run again)setup_intructions="\n
Setup Instructions\n
------------------\n
\n
1. clone podman and its dependencies into ~/podman/ following the guide\n in https://podman.io/getting-started/installation#installing-development-versions-of-podman\n\n
2. run this script\n
"
if [ ! -f ~/podman/podsman ]; then
# Do something if the file exists
echo "ERROR: Podman source code not cloned"
echo -e $setup_intructions
exit 1
fi
versions=(v4.0.2 v4.0.3 v4.1.0 v4.1.1 v4.2.0 v4.2.1 v4.3.0 v4.3.1)
for v in "${versions[@]}"; do
echo -e "\n\n"
echo "============================================"
echo " TESTING NOW PODMAN VERSION $v"
echo "============================================"
# clean podman state
sudo rm ~/.local/share/containers -rf
# build podman
cd /home/user/podman/podman
git checkout $v
make BUILDTAGS="seccomp"
sudo make install PREFIX=/usr
podman --version
# test dangerzone
cd /home/user/dangerzone
# install container
./dev_scripts/dangerzone-install
# check that the parallel is working
time yes 'dangerzone.rocks/dangerzone' | head -n 16 | xargs -n 1 -P 16 /usr/bin/podman images --format {{.ID}}
# run tests in parallel to corrupt
make test
# check if now yes is still failing
time yes 'dangerzone.rocks/dangerzone' | head -n 16 | xargs -n 1 -P 16 /usr/bin/podman images --format {{.ID}}
done After running the script look at the output of the second
|
Instability in the automated tests sometimes would sometimes fail when running "podman images --format {{.ID}}". It turns out that in versions prior to podman 4.3.0, podman volumes (stored in ~/.local/share/contaiers) would get corrupted when multiple tests were run in parallel. The current solution is to wrap the test command to run sequentially in versions prior to the fix and in parallel for versions after that. Fixes #217
Instability in the automated tests sometimes would sometimes fail when running "podman images --format {{.ID}}". It turns out that in versions prior to podman 4.3.0, podman volumes (stored in ~/.local/share/contaiers) would get corrupted when multiple tests were run in parallel. The current solution is to wrap the test command to run sequentially in versions prior to the fix and in parallel for versions after that. Fixes #217
Instability in the automated tests sometimes would sometimes fail when running "podman images --format {{.ID}}". It turns out that in versions prior to podman 4.3.0, podman volumes (stored in ~/.local/share/contaiers) would get corrupted when multiple tests were run in parallel. The current solution is to wrap the test command to run sequentially in versions prior to the fix and in parallel for versions after that. Fixes #217
Parallel tests had given us issues in the part [1]. This time, they weren't playing well with pytest-qt. One hypothesis is that Qt application components run as singletons and don't play well when there are two instances. The symptom we were experiencing was infinite recursion and removing pytest-xdist solved the issue. [1]: #217 [2]: https://github.com/freedomofpress/dangerzone/actions/runs/5244389012/jobs/9470323475?pr=439
Parallel tests had given us issues in the part [1]. This time, they weren't playing well with pytest-qt. One hypothesis is that Qt application components run as singletons and don't play well when there are two instances. The symptom we were experiencing was infinite recursion and removing pytest-xdist solved the issue. [1]: #217 [2]: https://github.com/freedomofpress/dangerzone/actions/runs/5244389012/jobs/9470323475?pr=439
Run tests sequentially, because in subsequent commits we will add Qt tests that do not play nice when `pytest` creates new processes [1]. Also, remove the pytest wrapper, whose main task was to decide if tests can run in parallel [2]. [1]: https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2393 [2]: #217
Run tests sequentially, because in subsequent commits we will add Qt tests that do not play nice when `pytest` creates new processes [1]. Also, remove the pytest wrapper, whose main task was to decide if tests can run in parallel [2]. [1]: https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2393 [2]: #217
Run tests sequentially, because in subsequent commits we will add Qt tests that do not play nice when `pytest` creates new processes [1]. Also, remove the pytest wrapper, whose main task was to decide if tests can run in parallel [2]. [1]: https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2393 [2]: #217
Parallel tests had given us issues in the part [1]. This time, they weren't playing well with pytest-qt. One hypothesis is that Qt application components run as singletons and don't play well when there are two instances. The symptom we were experiencing was infinite recursion and removing pytest-xdist solved the issue. [1]: #217
Parallel tests had given us issues in the part [1]. This time, they weren't playing well with pytest-qt. One hypothesis is that Qt application components run as singletons and don't play well when there are two instances. The symptom we were experiencing was infinite recursion and removing pytest-xdist solved the issue. [1]: #217
See example in: https://app.circleci.com/pipelines/github/freedomofpress/dangerzone/443
This happens sometimes when I run
make test
. It only started happening when I started doing tests in parallel (pytest -n 4
).Podman with the following:
The text was updated successfully, but these errors were encountered: