Menu

#2906 imm: application is crashed when IMMA unlocks the mutex

future
assigned
None
defect
imm
lib
major
False
2021-09-10
2018-07-31
No

In most OpenSAF agent code, the mutex would be destroyed while it is being locked by other threads.

  /* destroy the lock */
  m_NCS_LOCK_DESTROY(&cb->cb_lock);

When the other threads come to unlock the mutex, EPERM or EINVAL will be returned.
1) EPERM: when being-locked mutex is destroyed and replaced by the new one, unlocking on that mutex is actually same as unlocking on not-being-locked mutex.

2) EINVAL: the being-locked mutex has been desotroyed and not yet intialized.

In both cases, application will be crashed. One of them was already reported in the ticket [#2885].

Related

Tickets: #2885

Discussion

  • Vu Minh Nguyen

    Vu Minh Nguyen - 2018-07-31
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -8,6 +8,6 @@
     When the other threads come to unlock the mutex, EPERM or EINVAL will be returned.
     1) EPERM: when being-locked mutex is destroyed and replaced by the new one, unlocking on that mutex is actually same as unlocking on not-being-locked mutex.
    
    -3) 2) EINVAL: the being-locked mutex has been desotroyed and not yet intialized. 
    +2) EINVAL: the being-locked mutex has been desotroyed and not yet intialized. 
    
     In both cases, application will be crashed. One of them was already reported in the ticket  [#2885].
    
     

    Related

    Tickets: #2885

  • Vu Minh Nguyen

    Vu Minh Nguyen - 2018-08-01
    • summary: imm: destroy the mutex while it is locked by other threads --> imm: application is crashed when IMMA unlocks the mutex
     
  • Vu Minh Nguyen

    Vu Minh Nguyen - 2018-08-01
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,4 @@
    -In most OpenSAF agent code, the mutex could be destroyed while it is being locked by other threads. 
    +In most OpenSAF agent code, the mutex would be destroyed while it is being locked by other threads. 
    
     ~~~
       /* destroy the lock */
    
     
  • Gary Lee

    Gary Lee - 2018-09-29
    • Milestone: 5.18.09 --> 5.18.12
     
  • Gary Lee

    Gary Lee - 2019-01-09
    • Milestone: 5.19.01 --> 5.19.03
     
  • Gary Lee

    Gary Lee - 2019-03-26
    • Milestone: 5.19.03 --> 5.19.06
     
  • Gary Lee

    Gary Lee - 2019-07-23
    • Milestone: 5.19.07 --> 5.19.10
     
  • Gary Lee

    Gary Lee - 2019-10-21
    • Milestone: 5.19.10 --> 5.20.01
     
  • Gary Lee

    Gary Lee - 2020-02-15
    • Milestone: 5.20.02 --> 5.20.05
     
  • Gary Lee

    Gary Lee - 2020-05-30
    • Milestone: 5.20.05 --> 5.20.08
     
  • Gary Lee

    Gary Lee - 2020-08-31
    • Milestone: 5.20.08 --> 5.20.11
     
  • Gary Lee

    Gary Lee - 2020-12-01
    • Milestone: 5.20.11 --> 5.21.03
     
  • Gary Lee

    Gary Lee - 2021-03-01
    • Milestone: 5.21.03 --> 5.21.06
     
  • Surbhi Tripathi

    Surbhi Tripathi - 2021-03-25
    • assigned_to: Vu Minh Nguyen --> Surbhi Tripathi
     
  • Surbhi Tripathi

    Surbhi Tripathi - 2021-04-20
    • status: assigned --> review
     
  • Surbhi Tripathi

    Surbhi Tripathi - 2021-04-21
    • status: review --> assigned
     
  • Gary Lee

    Gary Lee - 2021-06-01
    • Milestone: 5.21.06 --> 5.21.10
     
  • Surbhi Tripathi

    Surbhi Tripathi - 2021-09-10
    • Milestone: 5.21.10 --> future
     

Log in to post a comment.