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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: AsynPortDriver separate thread causes Segmentation fault with "dbGetLinkValue" error message |
From: | Mark Rivers via Tech-talk <tech-talk at aps.anl.gov> |
To: | 'Abdalla Ahmad' <Abdalla.Ahmad at sesame.org.jo>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Tue, 3 Nov 2020 16:49:23 +0000 |
Hi Abdalla, It sounds to me like you may have a buffer overflow problem. That buffer overflow could be corrupting the link field in the record.
The example code you sent does not do anything with the buffer except print it, so it is hard to know what is wrong with the actual driver code. It is also using a small buffer size of 48. Here are some things I can say: -
It is definitely possible to have separate threads that read large buffers and do callbacks to asyn device support for waveform records. The areaDetector module has many such examples. They are using array sizes of many MB. -
I don’t think EPICS supports variable length waveform records. You need to create the waveform record in dbLoadRecords with a size that is the largest you plan to use. That is what areaDetector does with NDPluginStdArrays. Mark From: Abdalla Ahmad <Abdalla.Ahmad at sesame.org.jo>
Hi I am writing an AsynPortDriver class for the libera spark and I would like to do the waveforms data acquisition in a separate thread (attached is my initial implementation). Whenever
a large data size requested (Using command "ADC 100" for example), the IOC crashes with the following message: dbGetLinkValue: Illegal link type -13664 Segmentation fault Noticing that this number is random at every time the IOC crashes. Right now I am trying to enable core dumps on my machine (for some reason they are not dumped), but in the meantime,
what is wrong with my thread implementation? Is it possible to have a variable length waveform record in EPICS? If yes, how does asyn implements this? Best Regards, Abdalla. |