EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: segmentation fault in ca_task_initialize running in Linux
From: Margaret Votava <[email protected]>
To: Margaret Votava <[email protected]>
Cc: Jeff Hill <[email protected]>, [email protected], [email protected], [email protected]
Date: Fri, 10 Mar 2006 14:20:59 -0600

Hi Jeff,


FYI, things that I didn't include yesterday.

a) I did set a break point in void ca_client_context::installDefaultService ( cacService & service )
which was never called. I don't know if it should have been, but
it was a section that was changed with your patch.


b) i've attached a patch file on what we did to kludge the
problem. Note that TRACE is an inhouse debugging tool
so we could have more diagnostic information.

Thanks a lot,
Margaret

Margaret Votava wrote:


Hi Jeff,


I apologize profusely for a less than timely reply. My interrupt queue
was deep and we were running with a workaround.

I tried the patch today and it didn't help. See trace below. I promise
to be faster in the future.

Thanks a lot,
Margaret



Starting program: /home/votava/smtf/doocs/clients/rpc_util/Linux/bin/rpc_util
Breakpoint 2 at 0xdca2b5: file ../ca_client_context.cpp, line 736.
Breakpoint 3 at 0xdc7421: file ../ca_client_context.cpp, line 55.
[Thread debugging using libthread_db enabled]
[New Thread -1208031008 (LWP 27375)]
[Switching to Thread -1208031008 (LWP 27375)]


Breakpoint 3, cacOnceFunc () at ../ca_client_context.cpp:55
55 caClientCallbackThreadId = epicsThreadPrivateCreate ();
(gdb) n
56 assert ( caClientCallbackThreadId );
(gdb) n
55 caClientCallbackThreadId = epicsThreadPrivateCreate ();
(gdb) n
56 assert ( caClientCallbackThreadId );
(gdb) n
57 ca_client_context::pDefaultServiceInstallMutex = new epicsMutex;
(gdb) n
58 epicsAtExit ( cacExitHandler,0 );
(gdb) n
57 ca_client_context::pDefaultServiceInstallMutex = new epicsMutex;
(gdb) c
Continuing.


Program received signal SIGSEGV, Segmentation fault.
epicsMutex::lock (this=0x0) at ../../../src/libCom/osi/epicsMutex.cpp:118
118 epicsMutexOsdLock(pmutexNode->id);
(gdb) where
#0 epicsMutex::lock (this=0x0) at ../../../src/libCom/osi/epicsMutex.cpp:118
#1 0x00df37d1 in ipAddrToAsciiEngine::allocate () at ../../../src/libCom/cxxTemplates/epicsGuard.h:68
#2 0x00dd02ef in cac (this=0x99e28a8, mutualExclusionIn=@0x0, callbackControlIn=@0x99e26e4, notifyIn=@0x0) at ../cac.cpp:144
#3 0x00dc943d in ca_client_context (this=0x99e2670, enablePreemptiveCallback=false) at ../../../include/epicsMemory.h:110
#4 0x00dc638a in ca_context_create (premptiveCallbackSelect=ca_disable_preemptive_callback) at ../access.cpp:204
#5 0x00dc63d5 in ca_task_initialize () at ../access.cpp:180
#6 0x00db8e19 in epics_init () at /home/votava/smtf/doocs/libs/clientlib/source/clientlib/eq_svr.cc:1928
#7 0x00dc08d9 in EqCall (this=0x99e2490) at /home/votava/smtf/doocs/libs/clientlib/source/clientlib/eq_client.cc:369
#8 0x00ff8057 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535)
at /home/votava/smtf/doocs/libs/dddlib/source/dddlib/panels/device_attr_stubs.cc:26


#9 0x00ff8137 in global constructors keyed to ea () at /home/votava/smtf/doocs/libs/dddlib/source/dddlib/panels/device_attr_stubs.cc:400

#10 0x01029329 in __do_global_ctors_aux () from /home/votava/smtf/doocs/ups/../ups/../libs/dddlib/ups/../ups/../Linux/lib/libddd.so.2.2.6

#11 0x00f37d7d in _init () from /home/votava/smtf/doocs/ups/../ups/../libs/dddlib/ups/../ups/../Linux/lib/libddd.so.2.2.6

#12 0x00271318 in _dl_init_internal () from /lib/ld-linux.so.2
#13 0x002657ff in _dl_start_user () from /lib/ld-linux.so.2
(gdb)




Index: epicsMutex.cpp
===================================================================
RCS file: /cvs/smtfcvs/epics/epics_base/src/libCom/osi/epicsMutex.cpp,v
retrieving revision 1.2
diff -u -w -b -i -r1.2 epicsMutex.cpp
--- epicsMutex.cpp	17 Feb 2006 17:52:15 -0000	1.2
+++ epicsMutex.cpp	10 Mar 2006 20:17:31 -0000
@@ -24,20 +24,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-extern "C" {
-/*  standard TRACE include directives */
-#if defined(linux) || defined(__linux__)
-# include <linux/config.h>
-#endif
-#if defined(CONFIG_TRACE)
-# define TRACE_NAME "doocs"
-# include <linux/trace.h>	/* TRACE */
-#else
-# include <sys/time.h>		/* struct timeval */
-# define TRACE(args...)		({struct timeval __tv__={0}; __tv__;})
-# define TRACE_CNTL(args...)	({register int x=0;x;})
-#endif
-}
 
 #define epicsExportSharedSymbols
 #include "epicsStdioRedirect.h"
@@ -69,7 +55,6 @@
     const char *pFileName,int lineno)
 {
     epicsMutexOSD * id;
-    TRACE( 5, "epicsMutexOsiCreate %d=lineno", lineno );
 
     if(firstTime) {
         firstTime=0;
@@ -129,7 +114,6 @@
 epicsMutexLockStatus epicsShareAPI epicsMutexLock(
     epicsMutexId pmutexNode)
 {
-    TRACE( 5, "epicsMutex pmutexNode=%p", pmutexNode );
     epicsMutexLockStatus status = 
         epicsMutexOsdLock(pmutexNode->id);
 #   ifdef LOG_LAST_OWNER
@@ -212,7 +196,6 @@
 epicsMutex :: epicsMutex () :
     id ( epicsMutexCreate () )
 {
-    TRACE( 5, "epicsMutex constructr %p=this %p=id<-this", this, this->id );
     if ( this->id == 0 ) {
         throw mutexCreateFailed ();
     }
@@ -225,11 +208,6 @@
 
 void epicsMutex::lock ()
 {
-    TRACE( 5, "epicMutex::lock %p=this %p=this->id", this, this?this->id:NULL );
-    if (this->id == 0)
-    {   this->id = epicsMutexCreate();
-	TRACE( 5, "epicMutex::lock now %p=this %p=this->id", this, this?this->id:NULL );
-    }
     epicsMutexLockStatus status = epicsMutexLock ( this->id );
     if ( status != epicsMutexLockOK ) {
         throw invalidMutex ();

References:
RE: segmentation fault in ca_task_initialize running in Linux Jeff Hill
Re: segmentation fault in ca_task_initialize running in Linux Margaret Votava

Navigate by Date:
Prev: Re: Problem building alh on Mac OSX Burkhard Kolb
Next: Re: StreamDevice 2 Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: segmentation fault in ca_task_initialize running in Linux Margaret Votava
Next: MVME3100 and EPICS (The successor to the MVME2100) a first look Ernest L. Williams Jr.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·