Menu

#1527 log: terminated due to use SaImmOiHandleT concurrently from 02 threads

4.7.1
fixed
nobody
None
defect
log
-
4.6
major
2015-12-09
2015-10-07
No

When standby takes active role, "new" active logsv starts one thread imm_impl_restore_thread to set OI implementer for LOG service. In the meantime, the main thread is still there, ready to receive any coming requests.

So, the picture here is there are 02 threads using one OiHandle concurrently - imm_impl_restore_thread and main thread. It violates the IMM rule, stated in IMM PR doc,
"the developer must avoid using the same handle concurrently from several threads."

In the trace log below, there are 02 problems caused by using OiHandle in 02 different threads:
1) Get ERR_BAD_OPERATION as do request to IMM while no implementer have been set.

Sep 17 18:22:04 SC-2 osaflogd[15047]: NO ACTIVE request
Sep 17 18:22:04 SC-2 osaflogd[15047]: ER ERR_BAD_OPERATION: The SaImmOiHandleT is not associated with any implementer name
...
Sep 17 18:22:04 SC-2 osafimmnd[15026]: NO Implementer connected: 211 (safLogService) <7, 2020f>

2) Get ERR_LIBRARY as double LOCK from IMM side, logsv terminated.

Sep 17 20:07:59 SC-2 osafimmnd[14962]: NO Implementer connected: 401 (safLogService) <7, 2020f>
...
Sep 17 20:07:59 SC-2 osaflogd[14975]: saImmOiClassImplementerSet FAILED, rc = 2
….
Sep 17 20:08:09 SC-2 osafamfnd[15047]: NO 'safComp=LOG,safSu=SC-2,safSg=2N,safApp=OpenSAF' faulted due to 'avaDown' : Recovery is 'nodeFailfast'
Sep 17 20:08:09 SC-2 osafamfnd[15047]: ER safComp=LOG,safSu=SC-2,safSg=2N,safApp=OpenSAF Faulted due to:avaDown Recovery is:nodeFailfast

Related

Tickets: #1527
Tickets: #1531
Tickets: #1609
Wiki: ChangeLog-4.7.1

Discussion

  • Vu Minh Nguyen

    Vu Minh Nguyen - 2015-10-08
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,6 +1,6 @@
     When standby takes active role, "new" active logsv starts one thread `imm_impl_restore_thread` to set OI implementer for LOG service. In the meantime, the main thread is still there, ready to receive any coming requests. 
    
    -So, the picture here is there are 02 threads using one OiHandle. It violates the IMM rule, stated in IMM PR doc, 
    +So, the picture here is there are 02 threads using one OiHandle concurrently - `imm_impl_restore_thread` and main thread. It violates the IMM rule, stated in IMM PR doc, 
     `"the developer must avoid using the same handle concurrently from several threads."`
    
     In the trace log below, there are 02 problems caused by using OiHandle in 02 different threads:
    
     
  • Vu Minh Nguyen

    Vu Minh Nguyen - 2015-11-03
    • status: unassigned --> assigned
    • assigned_to: Vu Minh Nguyen
     
  • Vu Minh Nguyen

    Vu Minh Nguyen - 2015-11-23
    • status: assigned --> accepted
     
  • elunlen

    elunlen - 2015-12-03
    • status: accepted --> review
    • assigned_to: Vu Minh Nguyen --> elunlen
    • Type: enhancement --> defect
    • Milestone: 5.0.FC --> 4.6.2
     
  • elunlen

    elunlen - 2015-12-09

    The fix will be pushed to 4.7 and default only. The problem exist also in 4.6 but the patch for 4.7 and default cannot be used in 4.6. A risk for 4.6 is that the tested patch cannot be used. A patch for 4.6 will be quite digfferent and may be a risk.

     
  • elunlen

    elunlen - 2015-12-09
    • Version: --> 4.6
    • Milestone: 4.6.2 --> 4.7.1
     
  • elunlen

    elunlen - 2015-12-09
    • status: review --> fixed
     
  • elunlen

    elunlen - 2015-12-09

    changeset: 7164:c0d0d0b6c5c4
    tag: tip
    parent: 7162:ef5fb872bddf
    user: Lennart Lund lennart.lund@ericsson.com
    date: Wed Dec 09 13:55:15 2015 +0100
    summary: lgs: Correcting OI initializing thread handling [#1527]

    rev: c0d0d0b6c5c445aa24698b7448a44110e52af48b

    changeset: 7163:d5bfe1044dbe
    branch: opensaf-4.7.x
    parent: 7161:93df04ded5e1
    user: Lennart Lund lennart.lund@ericsson.com
    date: Wed Dec 09 13:55:15 2015 +0100
    summary: lgs: Correcting OI initializing thread handling [#1527]

    rev: d5bfe1044dbe08deb2eba6761919952f06467564

     

    Related

    Tickets: #1527

  • elunlen

    elunlen - 2015-12-09
    • assigned_to: elunlen --> nobody
     

Log in to post a comment.