Actions
Bug #8835
closedFileExistsError during coverage processing
Status:
Closed
Priority:
Immediate
Assignee:
Category:
Results processing
Target version:
Start date:
04/17/2018
Due date:
% Done:
0%
Estimated time:
Detected in build:
svn
Platform:
Published in build:
Description
I observed the following exception:
Raise exception: Traceback (most recent call last): File "/home/debian/klever/core/core/components.py", line 425, in run self.main() File "/home/debian/klever/core/core/components.py", line 329, in callbacks_caller ret = attr(*args, **kwargs) File "/home/debian/klever/core/core/vrp/__init__.py", line 229, in fetcher self.process_finished_task(task_id, opts, verifier, shadow_src_dir) File "/home/debian/klever/core/core/components.py", line 329, in callbacks_caller ret = attr(*args, **kwargs) File "/home/debian/klever/core/core/vrp/__init__.py", line 463, in process_finished_task os.makedirs(os.path.join(self.conf['main working directory'], coverage_info_dir)) File "/usr/lib/python3.5/os.py", line 241, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/var/lib/klever/work/native-scheduler/scheduler/jobs/802ef5bdb590cea00f9d0d04ad0627ce/klever-core-work-dir/total coverages/-10-7ae3580-f5c693a/linux:alloc:spinlock'
that resulted in an unknown in the RP component. Surprisingly, there was a total coverage for the respective subjob and the rule specification.
Because of this is likely a tricky data race, I don't attach a corresponding job.
Updated by Evgeny Novikov over 6 years ago
The bug fix is trivial, replace non-atomic:
if not os.path.exists(dir): os.makedirs(dir))
with "atomic":
os.makedirs(dir, exist_ok=True)
Updated by Evgeny Novikov over 6 years ago
What is the progress with this extremely important issue?
Updated by Alexey Polushkin over 6 years ago
- Status changed from New to Resolved
Resovled in branch 'fix_race_mkdir'
Updated by Evgeny Novikov over 6 years ago
- Status changed from Resolved to Closed
I merged the branch to master in 57ecf96d.
Actions