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
Running the nrunner with tests nested in other frameworks hangs [99.0 regression] #5521
Comments
Hi @eskultety, thanks for the very detailed reporting! To attempt to rule out libvirt-tck specific details, I wrote the following "mock TAP test":
The goal was to check if Avocado was waiting or not for child processes created by tests ( I'll continue to investigate this, but it certainly opens up a separate discussion (apart from this issue still under investigation) that I'd like to get your feedback on: Do you anticipate situation where a test will spawn processes that will live beyond the test, and that should not be waited on by the test runner? Second, do you believe it's possible that those specific libvirt-tck tests are doing something along these lines, and, across executions with different Avocado versions, some executions needed to spawn these processes and others didn't? |
No, that would be IMO spurious behavior, all resources used by the test suite should be cleaned afterwards with no remnants.
Hmm, not sure I fully understand the question, but let me answer "No, I don't believe it is" simply because I think we would have caught such behavior already as these tests have not been changed for a very long time. However, at the same time, let me say that it would help us a lot if we could get any kind of output from those tests, IOW if you run the |
OK, I have definitely found the root cause of this issue, and it's actually linked to your debugging complaint. I'll follow up with a plan to resolve resolve it. |
@eskultety an update here. The core issue is indeed a difference between The Because of the debugging aspects you mentioned, I'm looking into making Anyway, that's only to keep you in the loop and let you know that I aim for both the bugfix and the "streamable" logs to be in for version 100.0. |
Most of the information that generic executables (exec-test) tests generate will be done with their STDOUT and STDERR. Avocado, since 0a8178d, inadvertently reduced the size capacity when keeping and storing the STDOUT and STDERR. Still, limits will always exist, either in memory buffer sizes, network buffer sizes, or even filesystem file size limits or overall storage resources. This change increases considerably the limits of an "exec-test" by using, when available, the given "output_dir" parameter to a runnable or task. Whenever a test is run under "avocado run", a task will be used, and a task always has an "output_dir", so, unless one is running "avocado-runner-exec-test" manually and *not* providing an output_dir, the STDOUT and STDERR limits are now the filesystem limits. The tests document the existing limits: * 64kib when using PIPEs * Considerably larger limits (filesystem ones) when using an output_dir It also "documents" a new behavior introduced here that produces an error if an output_dir is attempted to be reused, to avoid overwriting unintended stdout/stderr files. Fixes: avocado-framework#5521 Signed-off-by: Cleber Rosa <crosa@redhat.com>
Most of the information that generic executables (exec-test) tests generate will be done with their STDOUT and STDERR. Avocado, since 0a8178d, inadvertently reduced the size capacity when keeping and storing the STDOUT and STDERR. Still, limits will always exist, either in memory buffer sizes, network buffer sizes, or even filesystem file size limits or overall storage resources. This change increases considerably the limits of an "exec-test" by using, when available, the given "output_dir" parameter to a runnable or task. Whenever a test is run under "avocado run", a task will be used, and a task always has an "output_dir", so, unless one is running "avocado-runner-exec-test" manually and *not* providing an output_dir, the STDOUT and STDERR limits are now the filesystem limits. The tests document the existing limits: * 64kib when using PIPEs * Considerably larger limits (filesystem ones) when using an output_dir It also "documents" a new behavior introduced here that produces an error if an output_dir is attempted to be reused, to avoid overwriting unintended stdout/stderr files. Fixes: avocado-framework#5521 Signed-off-by: Cleber Rosa <crosa@redhat.com>
Most of the information that generic executables (exec-test) tests generate will be done with their STDOUT and STDERR. Avocado, since 0a8178d, inadvertently reduced the size capacity when keeping and storing the STDOUT and STDERR. Still, limits will always exist, either in memory buffer sizes, network buffer sizes, or even filesystem file size limits or overall storage resources. This change increases considerably the limits of an "exec-test" by using, when available, the given "output_dir" parameter to a runnable or task. Whenever a test is run under "avocado run", a task will be used, and a task always has an "output_dir", so, unless one is running "avocado-runner-exec-test" manually and *not* providing an output_dir, the STDOUT and STDERR limits are now the filesystem limits. The tests document the existing limits: * 64kib when using PIPEs * Considerably larger limits (filesystem ones) when using an output_dir It also "documents" a new behavior introduced here that produces an error if an output_dir is attempted to be reused, to avoid overwriting unintended stdout/stderr files. Fixes: avocado-framework#5521 Signed-off-by: Cleber Rosa <crosa@redhat.com>
Most of the information that generic executables (exec-test) tests generate will be done with their STDOUT and STDERR. Avocado, since 0a8178d, inadvertently reduced the size capacity when keeping and storing the STDOUT and STDERR. Still, limits will always exist, either in memory buffer sizes, network buffer sizes, or even filesystem file size limits or overall storage resources. This change increases considerably the limits of an "exec-test" by using, when available, the given "output_dir" parameter to a runnable or task. Whenever a test is run under "avocado run", a task will be used, and a task always has an "output_dir", so, unless one is running "avocado-runner-exec-test" manually and *not* providing an output_dir, the STDOUT and STDERR limits are now the filesystem limits. The tests document the existing limits: * 64kib when using PIPEs * Considerably larger limits (filesystem ones) when using an output_dir It also "documents" a new behavior introduced here that produces an error if an output_dir is attempted to be reused, to avoid overwriting unintended stdout/stderr files. Fixes: avocado-framework#5521 Signed-off-by: Cleber Rosa <crosa@redhat.com>
Most of the information that generic executables (exec-test) tests generate will be done with their STDOUT and STDERR. Avocado, since 0a8178d, inadvertently reduced the size capacity when keeping and storing the STDOUT and STDERR. Still, limits will always exist, either in memory buffer sizes, network buffer sizes, or even filesystem file size limits or overall storage resources. This change increases considerably the limits of an "exec-test" by using, when available, the given "output_dir" parameter to a runnable or task. Whenever a test is run under "avocado run", a task will be used, and a task always has an "output_dir", so, unless one is running "avocado-runner-exec-test" manually and *not* providing an output_dir, the STDOUT and STDERR limits are now the filesystem limits. The tests document the existing limits: * 64kib when using PIPEs * Considerably larger limits (filesystem ones) when using an output_dir It also "documents" a new behavior introduced here that produces an error if an output_dir is attempted to be reused, to avoid overwriting unintended stdout/stderr files. Fixes: avocado-framework#5521 Signed-off-by: Cleber Rosa <crosa@redhat.com>
Most of the information that generic executables (exec-test) tests generate will be done with their STDOUT and STDERR. Avocado, since 0a8178d, inadvertently reduced the size capacity when keeping and storing the STDOUT and STDERR. Still, limits will always exist, either in memory buffer sizes, network buffer sizes, or even filesystem file size limits or overall storage resources. This change increases considerably the limits of an "exec-test" by using, when available, the given "output_dir" parameter to a runnable or task. Whenever a test is run under "avocado run", a task will be used, and a task always has an "output_dir", so, unless one is running "avocado-runner-exec-test" manually and *not* providing an output_dir, the STDOUT and STDERR limits are now the filesystem limits. The tests document the existing limits: * 64kib when using PIPEs * Considerably larger limits (filesystem ones) when using an output_dir It also "documents" a new behavior introduced here that produces an error if an output_dir is attempted to be reused, to avoid overwriting unintended stdout/stderr files. Fixes: avocado-framework#5521 Signed-off-by: Cleber Rosa <crosa@redhat.com>
Most of the information that generic executables (exec-test) tests generate will be done with their STDOUT and STDERR. Avocado, since 0a8178d, inadvertently reduced the size capacity when keeping and storing the STDOUT and STDERR. Still, limits will always exist, either in memory buffer sizes, network buffer sizes, or even filesystem file size limits or overall storage resources. This change increases considerably the limits of an "exec-test" by using, when available, the given "output_dir" parameter to a runnable or task. Whenever a test is run under "avocado run", a task will be used, and a task always has an "output_dir", so, unless one is running "avocado-runner-exec-test" manually and *not* providing an output_dir, the STDOUT and STDERR limits are now the filesystem limits. The tests document the existing limits: * 64kib when using PIPEs * Considerably larger limits (filesystem ones) when using an output_dir It also "documents" a new behavior introduced here that produces an error if an output_dir is attempted to be reused, to avoid overwriting unintended stdout/stderr files. Fixes: avocado-framework#5521 Signed-off-by: Cleber Rosa <crosa@redhat.com>
Most of the information that generic executables (exec-test) tests generate will be done with their STDOUT and STDERR. Avocado, since 0a8178d, inadvertently reduced the size capacity when keeping and storing the STDOUT and STDERR. Still, limits will always exist, either in memory buffer sizes, network buffer sizes, or even filesystem file size limits or overall storage resources. This change increases considerably the limits of an "exec-test" by using, when available, the given "output_dir" parameter to a runnable or task. Whenever a test is run under "avocado run", a task will be used, and a task always has an "output_dir", so, unless one is running "avocado-runner-exec-test" manually and *not* providing an output_dir, the STDOUT and STDERR limits are now the filesystem limits. The tests document the existing limits: * 64kib when using PIPEs * Considerably larger limits (filesystem ones) when using an output_dir It also "documents" a new behavior introduced here that produces an error if an output_dir is attempted to be reused, to avoid overwriting unintended stdout/stderr files. Fixes: avocado-framework#5521 Signed-off-by: Cleber Rosa <crosa@redhat.com>
Describe the bug
When running the upstream libvirt TCK suite with avocado 99.0 some of the tests will hang until a timeout is reached in Avocado. Very specifically the tests that hang are bash scripts wrapped by the TCK framework, to illustrate the situation with frameworks in libvirt:
The native TCK Perl tests run fine, the problem occurs only when running the double wrapped Bash scripts.
An example of a problematic test:
The problem doesn't occur in Avocado 98.0
Steps to reproduce
sudo avocado --config avocado.config run --job-results-dir /avocado ./scripts/nwfilter/050-apply-verify-host.t --job-timeout 65s
Expected behavior
All jobs in the test suite finish execution, i.e. don't hang
Current behavior
The job above hangs until the timeout is reached
System information (please complete the following information):
Additional information
I bisected the issue to the following commit: 0a8178d
I only bisected it once, so take ^this with a grain of salt. FWIW I used this stupid bisect script which yielded the commit above:
The text was updated successfully, but these errors were encountered: