EPICS Home

Experimental Physics and Industrial Control System


 
2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  2025  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  2025 
<== Date ==> <== Thread ==>

Subject: Re: Deadlock on VxWorks 6.7
From: "Zimoch Dirk \(PSI\) via Core-talk" <core-talk at aps.anl.gov>
To: "benjamin.franksen at helmholtz-berlin.de" <benjamin.franksen at helmholtz-berlin.de>
Cc: "core-talk at aps.anl.gov" <core-talk at aps.anl.gov>
Date: Tue, 8 Jun 2021 09:30:23 +0000
Hi Ben,


I have applied your patch. Unfortunately it does not help with my problem. The out of bounds access you fixed is only a
read access, unlikely to cause memory corruption.

After adding debug output, I see that the devIocStats function scan_time() runs several times without problems but then
suddenly crashes in scanIoRequest.

I tested other drivers using I/O Intr scanning and got the same problem. So it seems devIocStats was innocent.

But I see another strange thing. Just after the iocInit message, I noticed "Warning: callbackInit called again before
callbackCleanup". Looks like maybe something is messed up with the callbacks threads used by I/O Intr. Investigating
that now...

Dirk


On Tue, 2021-06-08 at 10:43 +0200, Ben Franksen via Core-talk wrote:
> Am 07.06.21 um 14:53 schrieb Zimoch Dirk (PSI) via Core-talk:
> > Further investigation showed that the bug is somehow related to devIocStats (not loading it does not trigger the
> > problem).
> > The problem seems to be caused by memory corruption. When printing spin->locked (which should be 0 or 1), I get
> > 1919513701 = 0x7269746.
> > Maybe one out our modifications to devIocStats was buggy.
> 
> The fix I have just now made a PR for
> (https://github.com/epics-modules/iocStats/pull/40) may be related to this.
> 
> Cheers
> Ben

Replies:
Re: Deadlock on VxWorks 6.7 Zimoch Dirk (PSI) via Core-talk
References:
Deadlock on VxWorks 6.7 Zimoch Dirk (PSI) via Core-talk
Re: Deadlock on VxWorks 6.7 Michael Davidsaver via Core-talk
AW: Deadlock on VxWorks 6.7 Zimoch Dirk (PSI) via Core-talk
AW: Deadlock on VxWorks 6.7 Zimoch Dirk (PSI) via Core-talk
AW: Deadlock on VxWorks 6.7 Zimoch Dirk (PSI) via Core-talk
Re: Deadlock on VxWorks 6.7 Ben Franksen via Core-talk

Navigate by Date:
Prev: Re: Deadlock on VxWorks 6.7 Ben Franksen via Core-talk
Next: Re: Deadlock on VxWorks 6.7 Zimoch Dirk (PSI) via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  2025 
Navigate by Thread:
Prev: Re: Deadlock on VxWorks 6.7 Ben Franksen via Core-talk
Next: Re: Deadlock on VxWorks 6.7 Zimoch Dirk (PSI) via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  2025