Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-45033

Non deteministic ordering of execution with parallel states

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.4.0, 5.5.0 Alpha
    • Core: State Machine
    • None

    Description

      QState machine uses QSet internally in several places, whereas the standard uses an ordered set everywhere.
      This leads to several places where the order is given by the hash order of the QSet (randomized by default).

      This introduces non-deterministic behavoiur for example if one has i+=1 and i*=2 as code that is executed.
      For example in the attached sample where the order of execution of the code in the transitions changes from run to run, thus storing different values in i at the end of the transitions.
      To fix this one should order all code execution.
      Ordering is trivial when the state machine is serialized, but to be efficiently computable in dynamically created state machines requires something like an explicit counter.

      This also affects QTBUG-44783 and (partially) QTBUG-44963

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            fawzi Fawzi Mohamed
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes