Eric Norum schrieb:
On Nov 20, 2006, at 5:50 AM, Dirk Kraemer wrote:
Hello all,
I have a problem with EDM. If I start EDM ,then
I see for a moment the message "loading fonts" and a moment later
I get the message "segmentations fault".
I am running EDM on :
- Fedora 5 - gcc 4.1.0-3.i386
- Epics 3.14.8.2
- openMotif 2.3.0-0.1.9.i386
- edm 1-11-0s
I hope that someone can help me. It's the first time that I get this
fault.
Regards
Dirk Kraemer
Sounds suspiciously like the problem I encountered on OS X. Here's a
copy of the letter I sent to Jeff about this. Perhaps you're seeing
the same sort of condition, but with some other pair of static
constructors.
======================================================================================
I downloaded and built the latest version of edm with the current
R3.14.2 CVS branch of EPICS. Things build fine, but the executable
suffers an access fault when run. I tracked the problem down to a
race condition in the C++ static constructors. Code in
EPICS_PV_Factory is invoking a guard class mutex that has yet to be
set up.
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000008
0x0008ae23 in epicsMutex::lock ()
(gdb) where
#0 0x0008ae23 in epicsMutex::lock ()
#1 0x00088e3a in ipAddrToAsciiEngine::allocate ()
#2 0x004aff0b in cac::cac ()
#3 0x004cfb5b in ca_client_context::ca_client_context ()
#4 0x004b25f4 in ca_context_create ()
#5 0x0041f4df in EPICS_PV_Factory::EPICS_PV_Factory ()
#6 0x0044cb2b in __static_initialization_and_destruction_0 ()
#7 0x8fe0fcb2 in
__dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE
()
#8 0x8fe0a1c6 in
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextE ()
#9 0x8fe0a164 in
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextE ()
#10 0x8fe0a164 in
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextE ()
#11 0x8fe0c646 in
__dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextE ()
#12 0x8fe03070 in __dyld__ZN4dyld24initializeMainExecutableEv ()
#13 0x0000245a in _start ()
#14 0x000023c5 in start ()
The offending code in misc/ipAddrToAsciiAsynchronous.cpp is:
// for now its probably sufficent to allocate one
// DNS transaction thread for all codes sharing
// the same process that need DNS services but we
// leave our options open for the future
ipAddrToAsciiEngine & ipAddrToAsciiEngine::allocate ()
{
epicsGuard < epicsMutex > guard (
ipAddrToAsciiEnginePrivate::globalMutex );
if ( ! ipAddrToAsciiEnginePrivate::pEngine ) {
ipAddrToAsciiEnginePrivate::pEngine = new
ipAddrToAsciiEnginePrivate ();
}
ipAddrToAsciiEnginePrivate::numberOfReferences++;
return * ipAddrToAsciiEnginePrivate::pEngine;
}
As a quick fix I just link libCom before the EDM libraries as well as
after:
diff -ur /home/phoebus/NORUME/Desktop/edm/edmMain/Makefile
/home/phoebus/NORUME/
src/EPICS/extensions/src/edm/edmMain/Makefile
--- /home/phoebus/NORUME/Desktop/edm/edmMain/Makefile 2006-03-06
13:25:32.0000
00000 -0600
+++
/home/phoebus/NORUME/src/EPICS/extensions/src/edm/edmMain/Makefile
2006-11-
14 13:12:30.000000000 -0600
@@ -10,7 +10,7 @@
edm_LIBS_Linux += 114135a4-6f6c-11d3-95bc-00104b8742df
edm_SYS_LIBS_Linux += Xm Xmu Xt Xp Xtst X11 pthread dl
- edm_LIBS_Darwin += EdmBase cfcaa62e-8199-11d3-a77f-00104b8742df
+ edm_LIBS_Darwin += Com EdmBase cfcaa62e-8199-11d3-a77f-00104b8742df
edm_LIBS_Darwin += 114135a4-6f6c-11d3-95bc-00104b8742df
edm_SYS_LIBS_Darwin += Xm Xmu Xt Xp Xtst X11 pthread dl
I've sent mail to Jeff to see if he has a better fix, but for now I
can at least work with EDM.
--Eric Norum <[email protected]>
Advanced Photon Source
Argonne National Laboratory
(630) 252-4793
Hi
I have tried it with your changes, but the result is the same.
GNU gdb Red Hat Linux (6.3.0.0-1.122rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host
libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /home/Dirk/extensions/bin/linux-x86/edm
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0x41cfd000
[Thread debugging using libthread_db enabled]
[New Thread -1208293152 (LWP 7736)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208293152 (LWP 7736)]
0x00000000 in ?? ()
(gdb)
regards Dirk
- Replies:
- Re: Segment fault for edm 1-11-0s Ernest L. Williams Jr.
- Incorrect display of Y label of X-Y Graph in edm Jianguo DING
- References:
- Segment fault for edm 1-11-0s Dirk Kraemer
- Re: Segment fault for edm 1-11-0s Eric Norum
- Navigate by Date:
- Prev:
Re: Segment fault for edm 1-11-0s Eric Norum
- Next:
RE: Error while cross-compiling EPICS for arm Mark Rivers
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
<2006>
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Segment fault for edm 1-11-0s Eric Norum
- Next:
Re: Segment fault for edm 1-11-0s Ernest L. Williams Jr.
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
<2006>
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|