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  <20092010  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  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: sigsev while creating new gdd in multiple threads
From: "Jeff Hill" <[email protected]>
To: "'Dirk Zimoch'" <[email protected]>, <[email protected]>
Cc: [email protected]
Date: Thu, 25 Jun 2009 10:06:03 -0600
All,

I created Mantis entry 343 to track this issue.

Sorry about the slow response, I was out for a few days due to catching the
flu.

Jeff

> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of Dirk Zimoch
> Sent: Tuesday, June 23, 2009 2:00 AM
> To: [email protected]
> Cc: [email protected]
> Subject: Re: sigsev while creating new gdd in multiple threads
> 
> Hi Bruno,
> 
>  From what I can see in the macro definition of gdd_NEWDEL_NEW(gdd) in
> gddNewDel.h, the gddScalar::new() operator is not fully thread safe.
> Initialization of the freelist is not protected. Thus, calling gdd*::new()
> for
> the first time in two different threads may crash. Maybe using gdd*::new()
> the
> first time while still in single threaded context may cure the problem.
> 
> Dirk
> 
> 
> Bruno Coudoin wrote:
> > Hi,
> >
> > Tonight I found something odd. I am perhaps doing something wrong but
> > after several test the results were consistant.
> >
> > I have a multithreaded application, at startup each thread creates
> > several gdd. It ends up frequently in the following SIGSEGV:
> >   Program received signal SIGSEGV, Segmentation fault.
> >   [Switching to Thread 0x98a35b90 (LWP 1020)]
> >   0x00f2b2b8 in gdd::operator new (size=44) at ../gdd.cc:26
> >   26      gdd_NEWDEL_NEW(gdd)
> >
> > My code to create the gdd is as simple as:
> >   gdd *pDD;
> >   pDD = new gddScalar ( gddAppType_value, aitEnumInt32 );
> >
> > It seems like my program crashes at startup but if it passed the first
> > gdd creation of each threads, it becomes stable after that. More threads
> > I have, more chance I have to see the crash.
> >
> > My configuration:
> > Epics 3.14.10
> > CentOS 5.3
> > Multi core processor.
> >
> > Has anybody ever seen this issue? I'll try to dig further tomorrow, if
> > someone has ideas on workarounds or tests to do to refine the issue,
> > your welcome.
> >
> > Bruno.
> >
> >
> >
> 
> --
> Dr. Dirk Zimoch
> Paul Scherrer Institut, WBGB/006
> 5232 Villigen PSI, Switzerland
> Phone +41 56 310 5182


Replies:
RE: sigsev while creating new gdd in multiple threads Bruno Coudoin
References:
sigsev while creating new gdd in multiple threads Bruno Coudoin
Re: sigsev while creating new gdd in multiple threads Dirk Zimoch

Navigate by Date:
Prev: Re: Troubles building jca.jar J. Lewis Muir
Next: Fanuc PMC Reflective Memory on MV2100 Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: sigsev while creating new gdd in multiple threads Dirk Zimoch
Next: RE: sigsev while creating new gdd in multiple threads Bruno Coudoin
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·