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  <20142015  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  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: asyn driver problem running Linux 3.8.13 with arm processor
From: "Jim Chen" <[email protected]>
To: "'Eric Norum'" <[email protected]>
Cc: epics <[email protected]>
Date: Fri, 7 Feb 2014 16:38:52 -0000
Mark and Eric,

I might have pointed to the wrong place. I have deleted everything for the
message queue task as simple as below and it runs fine the first time but
segfault immediately when it waits again:

while(1) {
        /* Wait for event from interrupt routine */
printf("====before\n");
       epicsMessageQueueReceive(intMsgQId, data, sizeof(data));
printf("====queue responsed\n");
}

The debug printout:

====before
....
==== queue responsed
====before
Segmentation fault

This looks like something wrong with the message queue? Anyway I will do
more tests...

Jim  


> -----Original Message-----
> From: Eric Norum [mailto:[email protected]]
> Sent: 07 February 2014 16:27
> To: Jim Chen
> Cc: Mark Rivers
> Subject: Re: asyn driver problem running Linux 3.8.13 with arm processor
> 
> On Feb 7, 2014, at 7:32 AM, Jim Chen <[email protected]>
> wrote:
> 
> > Hi Mark,
> >
> > Last time we discovered that those functions cannot be used in
> > interrupt service routine and I think that makes sense.
> 
> Right ? it?s never possible to block in a call from an interrupt service
routine.
> 
> >
> > The queuetask is a message queue created by epicsMessageQueueCreate
> > waiting interrupt in a thread created by epicsThreadCreate. The
> > strange thing is that in other arch and Linux, it works fine. Is it
> > anything to do with arm processor or the 3.8.13 Linux distro or the gcc
> compiler?
> 
> The calls ?work fine? on other systems I suspect because you?ve been lucky
> ? the request has never had to block.
> It?s likely that something in the architecture/compiler/OS combination of
the
> new system has some significant difference in the execution environment of
> interrupt service routines.   The first that comes to mind is that the
code is
> running on a limited-size interrupt stack and the send call is just taking
up too
> much stack.  Or perhaps something in the new system is resulting in a
> blocking attempt (as some sort of scheduling optimization or something).
> 
> --
> Eric Norum
> [email protected]
> 
> 
> 





Replies:
Re: asyn driver problem running Linux 3.8.13 with arm processor Eric Norum
Re: asyn driver problem running Linux 3.8.13 with arm processor Andrew Johnson
References:
asyn driver problem running Linux 3.8.13 with arm processor Jim Chen
RE: asyn driver problem running Linux 3.8.13 with arm processor Mark Rivers
RE: asyn driver problem running Linux 3.8.13 with arm processor Jim Chen

Navigate by Date:
Prev: Re: motorRecord on linux-arm Till Straumann
Next: Re: asyn driver problem running Linux 3.8.13 with arm processor Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: asyn driver problem running Linux 3.8.13 with arm processor Mark Rivers
Next: Re: asyn driver problem running Linux 3.8.13 with arm processor Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·