Giter VIP home page Giter VIP logo

Comments (2)

lzaoral avatar lzaoral commented on September 24, 2024 1

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.

kdudka avatar kdudka commented on September 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.