Menu

#20 Event Heap client receives events in a wrong order

open
Event Heap (9)
5
2012-09-15
2003-07-18
No

An Event Heap client sometimes receives events in a
wrong order.

As long as the event type, the source client, and the
session ID are the same among events, any clients are
supposed to receive these events in such an order as
the sender client posted them. In other words, the
sequence number is supposed to be always increasing.
However, we experienced the sequence was
partially "flipped". See the attached client trace: this
client received PR2Input events from
iwork.patchpanel.Intermediary_1876150418 in the order
of 2500, 2502, 2501 in the sequence number, where
2501 and 2502 are flipped.

According to the client trace, the receiver client seems
not guilty. It only repeats calling waitForEvent in a
single thread. Besides, there seems no chance to take
the resulted events in the wrong order between
receiving the packet from recv system call and
deserializing/returning it to the application. Probably the
server is responsible, and it is a timing issue. Also, the
sender client may be involved in the cause somehow
because this phenomenon happens depending on the
sender client. It happend when the events are created
by the PatchPanel, but not when created by the
PointRight.

Discussion

  • Tomoto Shimizu Washio

    The trace of the EH client (see the strange sequence numbers)

     
  • Tomoto Shimizu Washio

    Logged In: YES
    user_id=629201

    Supplement:
    Note that the server returned 2501 although the client
    requested an event later than 2502.
    One hypothesis is event 2502 somehow cut in after the
    server made the decision to return event 2501.

     

Log in to post a comment.