Comments (2)
The root problem is caused by a race between a hub.worker.assign_task
call and periodic task assignment to workers by the hub. Ideally, a subtask should be created already with the worker assigned so that the necessary condition for this race does not hold.
from openscanhub.
This happens when the sub-task for the baseline scan is assigned to a different worker, which itself should never happen.
Moreover, it seems to happen only when the AnalyzerVersionRetriever
sub-task is also created. The first sub-task is always on the same worker as the parent task, which is expected. Then another worker steals the sub-task for the baseline scan in some unprotected window.
Consequently, the incorrectly assigned sub-task crashes with osh.hub.scan.models.ScanBinding.DoesNotExist: ScanBinding matching query does not exist
and the parent task crashes with:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/kobo/worker/taskmanager.py", line 423, in run_task
task.run()
File "/usr/lib/python3.9/site-packages/osh/worker/tasks/task_errata_diff_build.py", line 52, in run
self.hub.worker.assign_task(subtask_id)
File "/usr/lib64/python3.9/xmlrpc/client.py", line 1122, in __call__
return self.__send(self.__name, args)
File "/usr/lib64/python3.9/xmlrpc/client.py", line 1464, in __request
response = self.__transport.request(
File "/usr/lib/python3.9/site-packages/kobo/xmlrpc.py", line 598, in request
result = transport_class.request(self, *args, **kwargs)
File "/usr/lib64/python3.9/xmlrpc/client.py", line 1166, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python3.9/site-packages/kobo/xmlrpc.py", line 511, in _single_request3
return self.parse_response(response)
File "/usr/lib64/python3.9/xmlrpc/client.py", line 1354, in parse_response
return u.close()
File "/usr/lib64/python3.9/xmlrpc/client.py", line 668, in close
raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault 1: Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/kobo/hub/models.py", line 861, in assign_task
self.__lock(worker_id, new_state=TASK_STATES["ASSIGNED"], initial_states=(TASK_STATES["FREE"], TASK_STATES["CREATED"]))
File "/usr/lib/python3.6/site-packages/kobo/hub/models.py", line 836, in __lock
raise ObjectDoesNotExist()
django.core.exceptions.ObjectDoesNotExist
from openscanhub.
Related Issues (20)
- client: change default hub url to `openscanhub.fedoraproject.org` HOT 8
- hub: merge `errata` and `scan` Django applications
- hub: do not use `noarch` as the default worker architecture
- client: rename `shortcuts` and `common` modules to something more descriptive
- Fedora PoC feedback HOT 4
- Web interface: design/accessibility issues HOT 2
- hub: merge code in `hub/scan/scanner.py` responsible for scheduling of build tasks
- hub: actions in scan admin should change task states properly
- hub: tweak configration of systemd units and timers
- Allow passing SRPM as URL HOT 10
- containers: dummy SMTP server does not log to file
- hub: domain name for notification e-mails should be configurable
- Shall we remove `Hostname` field from e-mail notifications? HOT 1
- Shall we remove support for CentOS Stream 8? HOT 7
- ci: deprecation warning in the CodeQL job
- hub: separate internal features from the rest of the code base HOT 3
- client: searching is broken/unintuitive when multiple options are specified
- tests: groups tests in dedicated module
- How shall we mark false positives? HOT 1
- Use the term "findings" instead of "defects" in the reports
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openscanhub.