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

.db3 file access error in windows CI #927

Closed
adityapande-1995 opened this issue Dec 2, 2021 · 1 comment
Closed

.db3 file access error in windows CI #927

adityapande-1995 opened this issue Dec 2, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@adityapande-1995
Copy link

adityapande-1995 commented Dec 2, 2021

Description

This error appears consistently in vanilla foxy CI in the test case TestRos2BagRecord.test_incomplete_qos_profile, TestRos2BagRecord.test_qos_simple. First discovered in PR : ros2/launch_ros#289

Expected Behavior

The db3 file should be found and CI should pass

Actual Behavior

The following error is thrown: https://ci.ros2.org/job/ci_windows/15875/testReport/junit/ros2bag.test/test_record_qos_profiles/test_record_qos_profiles/

FAIL: TestRos2BagRecord.test_qos_simple
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python38\lib\shutil.py", line 613, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\tmplmfz5xs0\\ros2bag_test_basic_0.db3'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python38\lib\tempfile.py", line 803, in onerror
    _os.unlink(path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\tmplmfz5xs0\\ros2bag_test_basic_0.db3'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\ci\ws\src\ros2\rosbag2\ros2bag\test\test_record_qos_profiles.py", line 75, in test_qos_simple
    assert not matches, print('ros2bag CLI did not produce the expected output')
  File "C:\Python38\lib\tempfile.py", line 828, in __exit__
    self.cleanup()
  File "C:\Python38\lib\tempfile.py", line 832, in cleanup
    self._rmtree(self.name)
  File "C:\Python38\lib\tempfile.py", line 814, in _rmtree
    _shutil.rmtree(name, onerror=onerror)
  File "C:\Python38\lib\shutil.py", line 737, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\Python38\lib\shutil.py", line 615, in _rmtree_unsafe
    onerror(os.unlink, fullname, sys.exc_info())
  File "C:\Python38\lib\tempfile.py", line 806, in onerror
    cls._rmtree(path)
  File "C:\Python38\lib\tempfile.py", line 814, in _rmtree
    _shutil.rmtree(name, onerror=onerror)
  File "C:\Python38\lib\shutil.py", line 737, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\Python38\lib\shutil.py", line 596, in _rmtree_unsafe
    onerror(os.scandir, path, sys.exc_info())
  File "C:\Python38\lib\shutil.py", line 593, in _rmtree_unsafe
    with os.scandir(path) as scandir_it:
NotADirectoryError: [WinError 267] The directory name is invalid: 'C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\tmplmfz5xs0\\ros2bag_test_basic_0.db3'

To reproduce error

Haven't tried reproducing this locally, but a running vanialla foxy CI reproduces this, as seen here : ros2/launch_ros#289 (comment)

System (please complete the following information)

  • OS: Windows (CI)
  • ROS 2 Distro: foxy

Additional context

Could be related to #926 and improper shutdown of rosbag2 process.

@MichaelOrlov
Copy link
Contributor

  • Closing this issue since Foxy distro reached the End Of Life milestone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants