Menu

#1803 imm: "CcbAugment with 2 OIs" testcase crashes

4.7.2
fixed
None
defect
imm
tests
minor
2016-06-08
2016-05-03
Hung Nguyen
No

Not always reproducible

root@SC-1:~# /hostfs/immoitest 6 4

Suite 6: Augmented CCBs
immoitest: test_saImmOiAugmentCcbInitialize.c:717: saImmOiCcbAugmentInitialize_04: Assertion `callbackCounter == 6' failed.
Aborted (core dumped)

Analysis:
Increment of 'callbackCounter' in the OI callbacks is not atomic.
Even when the 2 OIs receives 6 callbacks in total, 'callbackCounter' may not be 6.

    /* Wait for 2 completed and 2 apply callbacks */
    while(callbackCounter != 6 && threadCounter == 2)
        usleep(500);
    assert(callbackCounter == 6);

In that case, the OI threads will exit after 2 seconds (poll time out).
That results in the while() loop stopping (threadCounter != 2) and assertion failing.

'callbackCounter' and 'threadCounter" should be thread-safe.

Related

Tickets: #1803
Wiki: ChangeLog-4.7.2
Wiki: ChangeLog-5.0.1

Discussion

  • Hung Nguyen

    Hung Nguyen - 2016-05-03
    • summary: imm: CcbAugment with 2 OIs testcase crashes --> imm: "CcbAugment with 2 OIs" testcase crashes
     
  • Mathi Naickan

    Mathi Naickan - 2016-05-04
    • Milestone: 4.6.2 --> 4.7.2
     
  • Hung Nguyen

    Hung Nguyen - 2016-05-06
    • status: assigned --> review
     
  • Hung Nguyen

    Hung Nguyen - 2016-06-08
    • status: review --> fixed
     

Log in to post a comment.