The SIO2 project
  1. The SIO2 project
  2. SIO-1583

Refactor unpackmgr to run asynchronously with sioworkers

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: Near Future
    • Fix Version/s: None
    • Component/s: OIOIOI
    • Labels:
      None

      Description

      In Celery 3.2 it won't be possible for a Celery task (in particular, unpackmgr_job) to block and wait for a result coming from another task (that is, call get(); in this case, unpackmgr_job waits for sioworkers to finish). If Celery 3.2 is going to be used, the unpack manager needs to be rewritten.

        Activity

        Kamil Braun made changes -
        Field Original Value New Value
        Fix Version/s Sprint 2/2014 [ 12004 ]
        Kamil Braun made changes -
        Summary Fix a deadlock in the unpackmgr_job Celery task Refactor unpackmgr to run asynchronously with sioworkers
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Fix Version/s Sprint 2/2014 [ 12004 ]
        Affects Version/s Near Future [ 11001 ]
        Affects Version/s Current Version [ 11000 ]
        Priority Major [ 3 ] Minor [ 4 ]
        Description The following situation leads to a deadlock:
        1. A worker is spawned in which the unpackmgr_job Celery task begins to be processed. The worker pool is now exhausted - no more workers can be spawned.
        2. unpackmgr_job calls sio.workers.run asynchronously. The sio.workers task doesn't start, since it waits for a worker to be available from the pool.
        3. unpackmgr_job calls get() on the async task. It blocks, waiting for the result.
        4. ...
        5. No profit.

        Tested: when using Django 1.6 with the Django database as a Celery broker, the deadlock actually happens. RabbitMQ works, but still, this is a major bug and needs to be fixed.
        In Celery 3.2 it won't be possible for a Celery task (in particular, unpackmgr_job) to block and wait for a result coming from another task (that is, call get(); in this case, unpackmgr_job waits for sioworkers to finish). If Celery 3.2 is going to be used, the unpack manager needs to be rewritten.
        Sebastian Jaszczur made changes -
        Status New [ 10000 ] Resolved [ 5 ]
        Assignee Szymon Acedański [ accek ]
        Resolution Fixed [ 1 ]
        Szymon Acedański made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Szymon Acedański
            Reporter:
            Kamil Braun
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: