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  2014  2015  2016  2017  2018  2019  2020  <20212022  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  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: LUA: Segmentation fault on Raspberry for IOC being invoked from shell prompt; no problem via gdb execution.
From: Kuldeep Joshi via Tech-talk <tech-talk at aps.anl.gov>
To: tech-talk at aps.anl.gov
Date: Fri, 12 Feb 2021 12:58:14 +0000
Hello
I have compiled Epics 7.0.4.1 with SynApps 6-2 on Raspberry PI with Raspberry OS. I am specifying ARCH=linux-arm
I see from the release notes that there can be some build issues for self hosted ARM processors
On building the IOC I notice that the command history is not working. ie I get special characters displayed on arrow key press  (instead of the earlier typed command). readline-common is installed on the PI

The db files in the current working directory are not identified even when the OS PATH variable has ./ in it.
In this case I have to specifically give file/script name as ./filename to dbLoadRecords() calls. This workaround is working successfully.

I tried implementing the LUA script record, which is causing segmentation fault.
Setting the present directory path using epicsEnvSet("LUA_SCRIPT_PATH", "./:./scripts") is not helping.
I suspect the problem is that the file path is not being passed over to the iocsh and hence the problem. When I execute the code via gdb, there is no such problem and the shell executes the lua script and the lua records successfully.
Any pointers will be helpful.

This problem is not occurring on regular Intel PC

Thank you in advance,
Kuldeep Joshi

the core dump backtrace in gdb is below

Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Core was generated by `../../bin/linux-arm/timsAmpA ./st.cmd.tims'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xb6b7f67c in dbNameToAddr ()
   from /home/pi/Documents/Projects/EPICS/base-7.0/lib/linux-arm/libdbCore.so
[Current thread is 1 (Thread 0xb6fe0250 (LWP 1128))]
(gdb) bt
#0  0xb6b7f67c in dbNameToAddr ()
   from /home/pi/Documents/Projects/EPICS/base-7.0/lib/linux-arm/libdbCore.so
#1  0xb6e7ae7c in setLinks(luascriptRecord*) ()
   from /home/pi/Documents/Projects/EPICS/support/synApps/support/lua-R3-0-1/lib/linux-arm/liblua.so
#2  0xb6e7af6c in init_record(dbCommon*, int) ()
   from /home/pi/Documents/Projects/EPICS/support/synApps/support/lua-R3-0-1/lib/linux-arm/liblua.so
#3  0xb6bb9574 in iocBuild_2 ()
   from /home/pi/Documents/Projects/EPICS/base-7.0/lib/linux-arm/libdbCore.so
#4  0xb6bb9724 in iocBuild ()
   from /home/pi/Documents/Projects/EPICS/base-7.0/lib/linux-arm/libdbCore.so
#5  0xb6bb98fc in iocInit ()
   from /home/pi/Documents/Projects/EPICS/base-7.0/lib/linux-arm/libdbCore.so
#6  0xb6bb9d44 in iocInitCallFunc ()
   from /home/pi/Documents/Projects/EPICS/base-7.0/lib/linux-arm/libdbCore.so
#7  0xb6accb9c in iocshBody ()
   from /home/pi/Documents/Projects/EPICS/base-7.0/lib/linux-arm/libCom.so
#8  0x00018ba4 in main ()
(gdb)



Replies:
Re: LUA: Segmentation fault on Raspberry for IOC being invoked from shell prompt; no problem via gdb execution. Lang, Keenan C. via Tech-talk

Navigate by Date:
Prev: AW: combining long strings Sintschuk, Michael via Tech-talk
Next: PVXS release 0.1.2 Michael Davidsaver via Tech-talk
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  <20212022  2023  2024 
Navigate by Thread:
Prev: Phoebus development Vishnu Patel via Tech-talk
Next: Re: LUA: Segmentation fault on Raspberry for IOC being invoked from shell prompt; no problem via gdb execution. Lang, Keenan C. via Tech-talk
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  <20212022  2023  2024 
ANJ, 13 Feb 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·