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: Jeff Hill <[email protected]>
Cc: [email protected], [email protected], [email protected], [email protected]
Date: Thu, 09 Mar 2006 15:52:17 -0600

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)



Jeff Hill wrote:


I subsequently installed this patch to reduce the scope of the previously
mentioned patch.

Saved settings for D:usershillR3.14.dll_hell_fixepicsbase successfully...
cvs diff -u -wb -i -- ca_client_context.cpp (in directory
D:usershillR3.14.dll_hell_fixepicsbasesrcca)
Index: ca_client_context.cpp
===================================================================
RCS file:
/net/phoebus/epicsmgr/cvsroot/epics/base/src/ca/ca_client_context.cpp,v
retrieving revision 1.9.2.19
diff -c -u -w -b -i -r1.9.2.19 ca_client_context.cpp
cvs diff: conflicting specifications of output style
--- ca_client_context.cpp 17 Feb 2006 22:31:42 -0000 1.9.2.19
+++ ca_client_context.cpp 17 Feb 2006 22:38:36 -0000
@@ -78,7 +78,7 @@
}

epicsThreadOnce ( & cacOnce, cacOnceFunc, 0 );
-
+ {
epicsGuard < epicsMutex > guard (
*ca_client_context::pDefaultServiceInstallMutex );
if ( ca_client_context::pDefaultService ) {
this->pServiceContext.reset (
@@ -88,6 +88,7 @@
else {
this->pServiceContext.reset ( new cac ( this->mutex, this->cbMutex, *this )
);
}
+ }

this->sock = epicsSocketCreate ( AF_INET, SOCK_DGRAM, IPPROTO_UDP );
if ( this->sock == INVALID_SOCKET ) {

***** CVS exited normally with code 1 *****




-----Original Message-----
From: Margaret Votava [mailto:[email protected]]
Sent: Friday, February 17, 2006 10:36 AM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: segmentation fault in ca_task_initialize running in Linux


Dear all,


We are trying to understand a problem with a DESY/DOOCS utility.
It generates a segmentation fault within ca_task_initialize (stack trace
below). The

epicsMutex ca_client_context::defaultServiceInstallMutex;

constructor is not being called in all OS platform/Compiler
combinations.

In particular, a failing combination is
Linux 2.6.8-22.0.2/gcc v3.4.3 (red hat)
Linux 2.6.1/gcc v3.2.3 (red hat)

but works in Solaris with Solaris compiler.

We believe that this is a linker problem.

Has anyone seen before or have any clues of how to fix?

Thank you kindly,
Margaret

### epics code ###

(gdb) where
#0  epicsMutexLock (pmutexNode=0x0)
   at ../../../src/libCom/osi/epicsMutex.cpp:118
#1  0x006add15 in epicsMutex::lock (this=0x0)
   at ../../../src/libCom/osi/epicsMutex.cpp:211
#2  0x00ca19cb in ca_client_context (this=0x8d8ce08,
   enablePreemptiveCallback=false) at ../../../include/epicsGuard.h:68
#3  0x00c88305 in ca_context_create (
   premptiveCallbackSelect=ca_disable_preemptive_callback)
   at ../access.cpp:204
#4  0x00c8835e in ca_task_initialize () at ../access.cpp:180

### doocs code ####

#5 0x00a3e9f5 in epics_init ()
at
/home/votava/smtf/doocs/libs/clientlib/source/clientlib/eq_svr.cc:1928
#6 0x00a464b5 in EqCall (this=0x8d8cc88)
at
/home/votava/smtf/doocs/libs/clientlib/source/clientlib/eq_client.cc:369
#7 0x00e05837 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
#8 0x00e05917 in global constructors keyed to ea ()
at
/home/votava/smtf/doocs/libs/dddlib/source/dddlib/panels/device_attr_stubs
.cc:400
#9 0x00e36819 in __do_global_ctors_aux ()
from
/home/votava/smtf/doocs/ups/../ups/../libs/dddlib/ups/../ups/../Linux/lib/
libddd.so.2.2.5
#10 0x00d45add in _init ()
from
/home/votava/smtf/doocs/ups/../ups/../libs/dddlib/ups/../ups/../Linux/lib/
libddd.so.2.2.5
#11 0x00271318 in _dl_init_internal () from /lib/ld-linux.so.2
#12 0x002657ff in _dl_start_user () from /lib/ld-linux.so.2








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

Navigate by Date:
Prev: Re: remote control room network setup Maren Purves
Next: RE: CA beacon routing problem Jeff Hill
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 Jeff Hill
Next: Re: segmentation fault in ca_task_initialize running in Linux Margaret Votava
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 ·