Skip to content
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

Intermittent error E FileNotFoundError: [Errno 2] No such file or directory on lock file #7011

Closed
otrejoso opened this issue Apr 3, 2020 · 4 comments
Labels
plugin: xdist related to the xdist external plugin type: bug problem that needs to be addressed

Comments

@otrejoso
Copy link

otrejoso commented Apr 3, 2020

Occasionally, we are getting the following error E FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/l8/4lzs8dfx2ps1p1rdhlz8h2_40000gn/T/pytest-of-localadmin/garbage-8d871a48-8450-41da-b378-b01aa7c7d35b/.lock'
There is no really much backtracke, but tends to repro once in a while in some of our jenkins machines. I have seen this happening in all of our supported OS (Windows Mac and Linux)

Any ideas? or suggestions?

Thanks

     [exec] 
     [exec] scheduling tests via LoadScheduling
     [exec] 
     [exec] tests/test_basic_notarization.py::TestBasicNotarization::test_notarize_product_zip[macosx-local] 
     [exec] tests/test_basic_notarization.py::TestBasicNotarization::test_notarize_product_gui_dmg[macosx-local] 
     [exec] tests/test_basic_notarization.py::TestBasicNotarization::test_notarize_product_dmg[macosx-local] 
     [exec] [gw2] [ 33%] ERROR tests/test_basic_notarization.py::TestBasicNotarization::test_notarize_product_gui_dmg[macosx-local] 
     [exec] [gw1] [ 66%] PASSED tests/test_basic_notarization.py::TestBasicNotarization::test_notarize_product_dmg[macosx-local] 
     [exec] [gw0] [100%] PASSED tests/test_basic_notarization.py::TestBasicNotarization::test_notarize_product_zip[macosx-local] 
     [exec] 
     [exec] ==================================== ERRORS ====================================
     [exec] _ ERROR at setup of TestBasicNotarization.test_notarize_product_gui_dmg[macosx-local] _
     [exec] [gw2] darwin -- Python 3.7.5 /private/tmp/src/k0/product/test/tests_pti/.pti_artifactory/venv/bin/python
     [exec] /usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pathlib.py:1294: in unlink
     [exec]     self._accessor.unlink(self)
     [exec] E   FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/l8/4lzs8dfx2ps1p1rdhlz8h2_40000gn/T/pytest-of-localadmin/garbage-8d871a48-8450-41da-b378-b01aa7c7d35b/.lock'
     [exec] - generated xml file: /private/tmp/src/k0/product/test/tests_pti/test_output/pti_test_results_notarize_zip.xml -
     [exec] - generated html file: file:///private/tmp/src/k0/product/test/tests_pti/test_output/report.html -
     [exec] =========================== short test summary info ============================
     [exec] ERROR tests/test_basic_notarization.py::TestBasicNotarization::test_notarize_product_gui_dmg[macosx-local]
     [exec] ==================== 2 passed, 1 error in 197.25s (0:03:17) ====================
@Zac-HD Zac-HD added plugin: xdist related to the xdist external plugin type: bug problem that needs to be addressed labels Apr 4, 2020
@ibozhilov
Copy link

I am facing the same issue. It started after we updated from pytest 5.0.1 to 5.4.1. The issue happens more often in my case, only on Jenkins and on one particular and simple test:

def test_create_venv(tmp_path):
    os.chdir(tmp_path)
    create_file()
    assert os.path.isfile('/path/to/file')

I guess the test does not matter as the Error is at setup. Any suggestions will be appreciated.

Thanks.

@blueyed
Copy link
Contributor

blueyed commented Apr 6, 2020

Maybe due to #6987?
Try pinning pytest and/or not use xdist for now.

@ibozhilov
Copy link

Yeah, seems that the issue is the same. Thanks for linking and the quick response.

@blueyed
Copy link
Contributor

blueyed commented Apr 7, 2020

Closing as duplicate of #6987.

@blueyed blueyed closed this as completed Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: xdist related to the xdist external plugin type: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

4 participants