Skip to content

Commit

Permalink
Fix intermittent CI fails regarding mutexes
Browse files Browse the repository at this point in the history
There is an issue where if there are crit_asserts in the mutex
lock/unlock functions that the code will assert in a testcase
intermittently. This commit will remove those crit_asserts to alleviate
the issue until it can be investigated further.

Change-Id: I3b8781a023092d7e660ffc783699f3c0a80b5c98
CQ:SW453293
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/71160
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
Matt Raybuck authored and dcrowell77 committed Feb 4, 2019
1 parent faafdfc commit dbc69ab
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/lib/sync.C
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ void mutex_lock(mutex_t * i_mutex)
// 2: Lock is held by a task and there is contention.
// Any other values indicates that outside influences have messed with the
// mutex and we shouldn't continue.
crit_assert(i_mutex->iv_val <= 2);

uint64_t l_lockStatus = __sync_val_compare_and_swap(&(i_mutex->iv_val),0,1);

if(unlikely(l_lockStatus != 0))
Expand Down Expand Up @@ -239,8 +237,6 @@ void mutex_unlock(mutex_t * i_mutex)
// 2: Lock is held by a task and there is contention.
// Any other values indicates that outside influences have messed with the
// mutex and we shouldn't continue.
crit_assert(i_mutex->iv_val <= 2);

uint64_t l_lockStatus = __sync_fetch_and_sub(&(i_mutex->iv_val), 1);

if(unlikely(l_lockStatus >= 2))
Expand All @@ -265,7 +261,6 @@ void recursive_mutex_lock(mutex_t * i_mutex)
// 2: Lock is held by a task and there is contention.
// Any other values indicates that outside influences have messed with the
// mutex and we shouldn't continue.
crit_assert(i_mutex->iv_val <= 2);

// Check the contents of the mutex's iv_val and if it's equal to 0, then
// assign it the value of 1. l_lockStatus is initialized with the value of
Expand Down Expand Up @@ -337,8 +332,6 @@ void recursive_mutex_unlock(mutex_t * i_mutex)
// 2: Lock is held by a task and there is contention.
// Any other values indicates that outside influences have messed with the
// mutex and we shouldn't continue.
crit_assert(i_mutex->iv_val <= 2);

uint64_t l_lockStatus = 0;

if (i_mutex->iv_ownerLockCount <= 1)
Expand Down

0 comments on commit dbc69ab

Please sign in to comment.