Ansible occasionally crashes during task execution

When running a task which runs a script in Ansible 2.9.27 it occasionally crashes during the execution. This issue is intermittent.

A GitHub issue has been created for this bug: (1) Ansible occasionally crashes during task execution · Issue #76321 · ansible/ansible (github.com). However, the response I got was that my build3.sh script running in the task is removing the directory that Ansible is running under, which is not the case. The script is running ‘BitBake’, which is a make-like build tool, and does not remove the underlying directory.

I would highly appreciate it if anyone could take a second look at the error in my GitHub issue and point me towards possible root causes of this bug.

Sincerely,
Maksym Iliev

The current working directory (cwd or pwd) where ansible was executed from has been deleted in the middle of the execution. Regardless of whether the script you are running is responsible for it, doesn’t matter.

The problem is somewhere during the execution, something is deleting the current working directory, which causes ansible to fail.

I recommend determining the cause, or changing to another working directory you know will not be deleted prior to having ansible execute.