EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: "epicsMutex pthread_mutex_unlock failed" with pyepics/pcaspy
From: Michael Davidsaver <[email protected]>
To: Jameson Graef Rollins <[email protected]>, [email protected]
Date: Wed, 13 May 2015 17:25:04 -0400
On 05/13/2015 05:03 PM, Jameson Graef Rollins wrote:
> ...
> I think this is just a symlink issue.

Ok

> ...  I do however see a
> "_cas.so" that's included with the pcaspy package [1].

This is the one I meant.  This all looks normal.

So I'm 0 for 3 so far :)

>>> Thread 1 (Thread 0x7f8658d49700 (LWP 26265)):
...
>>> #4  0x00007f86529e2d05 in cantProceed (msg=<optimized out>) at ../../../src/libCom/misc/cantProceed.c:69
>>> #5  0x00007f8652568525 in casPVI::getExtServer() const () from /ligo/apps/ubuntu12/epics-3.14.12.2_long/base/lib/linux-x86_64/libcas.so.3.14
>>> #6  0x00007f8652c2efa3 in PV::postEvent (this=0x30a0200, value=...) at pcaspy/pv.cpp:83
>>> #7  0x00007f8652c1fdc9 in _wrap_PV_postEvent (args=<optimized out>) at pcaspy/casdef_wrap.cpp:9193
>>> #8  0x0000000000571b58 in PyEval_EvalFrameEx ()
> 
> Ok!  So what's to be done here?  Is this a problem in the pcaspy SWIG
> bindings, or in libcas?  I can't see anything obvious that is being
> called incorrectly:

In my experience, when pthread_mutex_unlock fails w/ EINVAL it is either
a sign of memory corruption, or that the lock has already been free'd
(w/ pthread_mutex_destory).

Given that the process doesn't crash I'm guessing its the later.

Is your application creating, or more importantly destroying, casPVI
instances when this error appears?  A race during destruction would
probably explain things.


Michael


Replies:
Re: "epicsMutex pthread_mutex_unlock failed" with pyepics/pcaspy Jameson Graef Rollins
Re: "epicsMutex pthread_mutex_unlock failed" with pyepics/pcaspy Wang Xiaoqiang (PSI)
References:
"epicsMutex pthread_mutex_unlock failed" with pyepics/pcaspy Jameson Graef Rollins
Re: "epicsMutex pthread_mutex_unlock failed" with pyepics/pcaspy Jameson Graef Rollins
Re: "epicsMutex pthread_mutex_unlock failed" with pyepics/pcaspy Michael Davidsaver
Re: "epicsMutex pthread_mutex_unlock failed" with pyepics/pcaspy Jameson Graef Rollins
Re: "epicsMutex pthread_mutex_unlock failed" with pyepics/pcaspy Michael Davidsaver
Re: "epicsMutex pthread_mutex_unlock failed" with pyepics/pcaspy Jameson Graef Rollins
Re: "epicsMutex pthread_mutex_unlock failed" with pyepics/pcaspy Michael Davidsaver
Re: "epicsMutex pthread_mutex_unlock failed" with pyepics/pcaspy Jameson Graef Rollins

Navigate by Date:
Prev: RE: "epicsMutex pthread_mutex_unlock failed" with pyepics/pcaspy Mark Rivers
Next: Re: "epicsMutex pthread_mutex_unlock failed" with pyepics/pcaspy Michael Davidsaver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: "epicsMutex pthread_mutex_unlock failed" with pyepics/pcaspy Michael Davidsaver
Next: Re: "epicsMutex pthread_mutex_unlock failed" with pyepics/pcaspy Jameson Graef Rollins
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·