Skip to content

Request Files for EPICS modules are only in Db folder, and not db#567

Closed
kgofron wants to merge 3 commits intoareaDetector:masterfrom
kgofron:destroyed-pool
Closed

Request Files for EPICS modules are only in Db folder, and not db#567
kgofron wants to merge 3 commits intoareaDetector:masterfrom
kgofron:destroyed-pool

Conversation

@kgofron
Copy link
Member

@kgofron kgofron commented Feb 17, 2026

No description provided.

@kgofron
Copy link
Member Author

kgofron commented Feb 17, 2026

The first commit requires changes to iocBoot/EXAMPLE_commonPlugins.cmd
#set_requestfile_path("$(SSCAN)/sscanApp/Db")
#set_requestfile_path("$(CALC)/calcApp/Db")

@kgofron
Copy link
Member Author

kgofron commented Feb 17, 2026

Segmentation fault

Commit 2: "fix: prevent SIGSEGV on IOC exit when pvAccess holds NDArrays after driver/pool destroyed" refers to Segmentation fault after ioc exits, when acquisition was performed (memory/pool allocated).

epics> auto_settings.sav: 2354 of 2354 PV's connected
ACQUIRE CHANGE: ADAcquire=1 (was 0), current ADStatus=0
PrvHst: Checking if TCP streaming should start - WritePrvHst=0
PrvHst: WritePrvHst is disabled (0) - TCP streaming not started
After acquireStart: ADStatus=1
ACQUIRE CHANGE: ADAcquire=0 (was 1), current ADStatus=1
PrvImg TCP connection closed by peer
PrvHst TCP disconnected
After acquireStop: ADStatus=0

epics> exit
PrvHst TCP disconnected
./st.cmd: line 5: 2343260 Segmentation fault      ../../bin/linux-x86_64/tpx3App st_base.cmd

Fix applied to ADCore 3.14.0 master.

epics> exit
PrvHst TCP disconnected

Problem

When an IOC exits (e.g. user types exit) after acquisition has run, the process can hit a SIGSEGV (signal 11). The crash is in NDArrayPool::release() (or equivalent use of the pool) after the detector driver and its NDArrayPool have already been destroyed.
Cause: Shutdown order: the detector driver destructor runs and deletes pNDArrayPoolPvt_. Later, the pvAccess ServerContext is torn down (atexit). Its MonitorElements still hold NDArray-derived data. The deleter used by ntndArrayConverter (freeNDArray) calls NDArray::release() on those arrays. By then the pool is gone, so release() runs against freed memory → SIGSEGV.
This has been seen with areaDetector IOCs (e.g. ADTimePix3) using ADCore 3.12.1 and 3.14.0. See issue areaDetector/ADTimePix3#5.

Approach

Two parts:
“Destroyed pool” registry

  • Before the driver deletes its pool, it registers the pool pointer in a static set.
  • In NDArray::release(), we check that set using only the pool address (no dereference).
  • If the pool was registered as destroying, we set pNDArrayPool = NULL and return without calling the pool.
    So any late release() (from PVA or elsewhere) no-ops safely, even for NDArrays that are not the driver’s pArrays[] (e.g. copies handed to PVA).

asynNDArrayDriver destructor

  • Store maxAddr in a member maxAddr_.
  • In ~asynNDArrayDriver(): call NDArrayPool::registerDestroyingPool(pNDArrayPoolPvt_), null pNDArrayPool on each pArrays[i], then delete pNDArrayPoolPvt_.

Changes

File Change
NDArray.h Declare NDArrayPool::registerDestroyingPool(NDArrayPool*) and NDArrayPool::isPoolDestroyed(NDArrayPool*).
NDArrayPool.cpp Implement both with a static std::set<NDArrayPool*> and a mutex. Pools are only ever added; the set is process-lifetime.
NDArray.cpp At the start of NDArray::release(), if isPoolDestroyed(pNDArrayPool) then set pNDArrayPool = NULL and return ND_ERROR without calling the pool.
asynNDArrayDriver.h Add private member int maxAddr_.
asynNDArrayDriver.cpp Constructor: initialize maxAddr_(maxAddr) (initializer order matches member declaration). Destructor: call registerDestroyingPool(pNDArrayPoolPvt_), then loop over pArrays[0..maxAddr_-1] and set pArrays[i]->pNDArrayPool = NULL, then delete pNDArrayPoolPvt_.

ADCore314_fix.md

References

@MarkRivers
Copy link
Member

I don’t understand the first commit. The Makefiles for sscan and calc both install the .req files into db/.

https://github.com/epics-modules/sscan/blob/master/sscanApp/Db/Makefile

https://github.com/epics-modules/calc/blob/master/calcApp/Db/Makefile

These work fine in my installations of calc and sscan. @kgofron are these not working for you?

@kgofron
Copy link
Member Author

kgofron commented Feb 17, 2026

CALC: I do not have .req files in db folder. I do see a Makefile line that is supposed to do it
https://github.com/epics-modules/calc/blob/master/calcApp/Db/Makefile#L25

kg1@lap133454:/epics/support2/calc$ ls -l db
total 264
-r--r--r-- 1 kg1 users   848 Feb 17 01:27 aneg_apos_test.db
-r--r--r-- 1 kg1 users  1387 Feb 17 01:27 arrayTest.db
-r--r--r-- 1 kg1 users   297 Feb 17 01:27 editSseq.db
-r--r--r-- 1 kg1 users  9052 Feb 17 01:27 FuncGen.db
-r--r--r-- 1 kg1 users  5726 Feb 17 01:27 interp.db
-r--r--r-- 1 kg1 users 10577 Feb 17 01:27 interpNew.db
-r--r--r-- 1 kg1 users    29 Feb 17 01:27 sseqRecord.db
-r--r--r-- 1 kg1 users 13808 Feb 17 01:27 transforms10.db
-r--r--r-- 1 kg1 users  6928 Feb 17 01:27 userArrayCalcs10.db
-r--r--r-- 1 kg1 users  6573 Feb 17 01:27 userArrayCalcs10more.db
-r--r--r-- 1 kg1 users 16899 Feb 17 01:27 userAve10.db
-r--r--r-- 1 kg1 users 17137 Feb 17 01:27 userAve10more.db
-r--r--r-- 1 kg1 users   218 Feb 17 01:27 userCalcGlobalEnable.db
-r--r--r-- 1 kg1 users   548 Feb 17 01:27 userCalcN.db
-r--r--r-- 1 kg1 users   393 Feb 17 01:27 userCalcN_noDisable.db
-r--r--r-- 1 kg1 users  6158 Feb 17 01:27 userCalcOuts10.db
-r--r--r-- 1 kg1 users  5927 Feb 17 01:27 userCalcOuts10more.db
-r--r--r-- 1 kg1 users  5820 Feb 17 01:27 userCalcs10.db
-r--r--r-- 1 kg1 users  5625 Feb 17 01:27 userCalcs10more.db
-r--r--r-- 1 kg1 users  6372 Feb 17 01:27 userStringCalcs10.db
-r--r--r-- 1 kg1 users  6126 Feb 17 01:27 userStringCalcs10more.db
-r--r--r-- 1 kg1 users  6289 Feb 17 01:27 userStringSeqs10.db
-r--r--r-- 1 kg1 users  6006 Feb 17 01:27 userStringSeqs10more.db
-r--r--r-- 1 kg1 users   878 Feb 17 01:27 userTransform.db
-r--r--r-- 1 kg1 users  9012 Feb 17 01:27 userTransforms10.db
-r--r--r-- 1 kg1 users  8821 Feb 17 01:27 userTransforms10more.db
-r--r--r-- 1 kg1 users 29959 Feb 17 01:27 userTransforms20.db
-r--r--r-- 1 kg1 users   390 Feb 17 01:27 waitRecN.db
-r--r--r-- 1 kg1 users    29 Feb 17 01:27 yySseq.db

I am using newest commit in master branch:

kg1@lap133454:/epics/support2/calc/calcApp/Db$ git log
commit f6a39b66679f384eea1905507f1b5f23c13468fc (HEAD -> master, origin/master, origin/HEAD)
Author: keenanlang <klang@aps.anl.gov>
Date:   Wed May 21 17:22:06 2025 -0500

    only ignore at top-level
  • GNU Make 4.3
  • g++ (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0
  • Ubuntu 22.04
  • epics-base: master, newest, pulled today.
    • EPICS R7.0.10.1-DEV
    • Rev. R7.0.10-31-g419a704ad9c1c653d15a
    • Rev. Date Git: 2026-02-10 18:08:53 -0600
commit 419a704ad9c1c653d15a05c800b1e47aa5589e1f (HEAD -> 7.0, origin/HEAD, origin/7.0)
Author: Andrew Johnson <anj@anl.gov>
Date:   Tue Feb 10 18:08:53 2026 -0600

@MarkRivers
Copy link
Member

I am using:

  • RHEL 9.7
  • GNU make 4.3
  • g++ 11.5.0
  • Base 7.0.10,
  • Latest tag in calc, the same as you.

It works fine for me.

$ cd /home/epics/devel/calc
$ make -sj clean uninstall
ls -l db/*.req
ls: cannot access 'db/*.req': No such file or directory
$ make -sj
...
(base) [epics@corvette calc]$ ls -l db/*.req
-r--r--r-- 1 epics domain users  179 Feb 17 07:07 db/acalcoutArrays_settings.req
-r--r--r-- 1 epics domain users  689 Feb 17 07:07 db/acalcout_settings.req
-r--r--r-- 1 epics domain users  430 Feb 17 07:07 db/calcout_settings.req
-r--r--r-- 1 epics domain users   33 Feb 17 07:07 db/editSseq_settings.req
-r--r--r-- 1 epics domain users  216 Feb 17 07:07 db/FuncGen_settings.req
-r--r--r-- 1 epics domain users  277 Feb 17 07:07 db/interpNew_settings.req
-r--r--r-- 1 epics domain users  134 Feb 17 07:07 db/interp_settings.req
-r--r--r-- 1 epics domain users  657 Feb 17 07:07 db/scalcout_settings.req
-r--r--r-- 1 epics domain users 1017 Feb 17 07:07 db/sseqRecord_settings.req
-r--r--r-- 1 epics domain users 1037 Feb 17 07:07 db/sseq_settings.req
-r--r--r-- 1 epics domain users  508 Feb 17 07:07 db/swait_settings.req
-r--r--r-- 1 epics domain users  586 Feb 17 07:07 db/transforms10_settings.req
-r--r--r-- 1 epics domain users  898 Feb 17 07:07 db/transform_settings.req
-r--r--r-- 1 epics domain users  904 Feb 17 07:07 db/userArrayCalcs10more_settings.req
-r--r--r-- 1 epics domain users  847 Feb 17 07:07 db/userArrayCalcs10_settings.req
-r--r--r-- 1 epics domain users  730 Feb 17 07:07 db/userAve10more_settings.req
-r--r--r-- 1 epics domain users  656 Feb 17 07:07 db/userAve10_settings.req
-r--r--r-- 1 epics domain users  170 Feb 17 07:07 db/userAve_settings.req
-r--r--r-- 1 epics domain users   25 Feb 17 07:07 db/userCalcGlobalEnable_settings.req
-r--r--r-- 1 epics domain users  120 Feb 17 07:07 db/userCalcN_noDisable_settings.req
-r--r--r-- 1 epics domain users  143 Feb 17 07:07 db/userCalcN_settings.req
-r--r--r-- 1 epics domain users  764 Feb 17 07:07 db/userCalcOuts10more_settings.req
-r--r--r-- 1 epics domain users  705 Feb 17 07:07 db/userCalcOuts10_settings.req
-r--r--r-- 1 epics domain users  834 Feb 17 07:07 db/userCalcs10more_settings.req
-r--r--r-- 1 epics domain users  702 Feb 17 07:07 db/userCalcs10_settings.req
-r--r--r-- 1 epics domain users  998 Feb 17 07:07 db/userStringCalcs10more_settings.req
-r--r--r-- 1 epics domain users  870 Feb 17 07:07 db/userStringCalcs10_settings.req
-r--r--r-- 1 epics domain users 1018 Feb 17 07:07 db/userStringSeqs10more_settings.req
-r--r--r-- 1 epics domain users  897 Feb 17 07:07 db/userStringSeqs10_settings.req
-r--r--r-- 1 epics domain users  886 Feb 17 07:07 db/userTransforms10more_settings.req
-r--r--r-- 1 epics domain users  752 Feb 17 07:07 db/userTransforms10_settings.req
-r--r--r-- 1 epics domain users  982 Feb 17 07:07 db/userTransforms20_settings.req
-r--r--r-- 1 epics domain users 1017 Feb 17 07:07 db/yySseq_settings.req

The calc/calcApp/Db/Makefile uses the symbol REQ for installing .req files, while ADCore/ADApp/Db/Makefile uses DB. Is there is a difference in the rules we are using? I don't know where that difference would be.

@kgofron
Copy link
Member Author

kgofron commented Feb 17, 2026

This is a problem with symbol REQ in calc/calcApp/Db/Makefile#L25. The .req files are not in /db folder of the EPICS module (calc,..)

  • kg1@lap133454:/epics/support2/calc$ make -sj clean uninstall

  • kg1@lap133454:/epics/support2/calc$ ls -l db/*.req

    • ls: cannot access 'db/*.req': No such file or directory
  • kg1@lap133454:/epics/support2/calc$ make -sj

  • kg1@lap133454:/epics/support2/calc$ ls -l db/*.req

    • ls: cannot access 'db/*.req': No such file or directory
  • ==============

  • EPICS R7.0.10.1-DEV

  • Rev. R7.0.10-31-g419a704ad9c1c653d15a

  • Rev. Date Git: 2026-02-10 18:08:53 -0600

@kgofron
Copy link
Member Author

kgofron commented Feb 17, 2026

In your epics-base, can you search for REQ symbol in configure/RULES.Db?

kg1@lap133454:/epics/epics-base/configure$ grep -r REQ *

  • =======

I am not finding REQ symbol in base.
Strange that it does not throw error.
When I replace REQ -> DB_INSTALLS designated for 'other' files to copy, it does throw compile error.

DB_INSTALLS – extra files to install into the db directory (no processing, just copy)

@MarkRivers
Copy link
Member

In your epics-base, can you search for REQ symbol in configure/RULES.Db?

The string REQ does not occur anywhere in base-7.0.10/configure or lower.

This is git status on my base. Note that the only changes are support for a different Linux arch, linux-x86_64-ub22.

[epics@corvette base-7.0.10]$ git status
HEAD detached at R7.0.10
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        configure/os/CONFIG.Common.linux-x86_64-ub22
        configure/os/CONFIG.linux-x86_64-ub22.Common
        configure/os/CONFIG.linux-x86_64-ub22.linux-x86_64-ub22
        configure/os/CONFIG_SITE.Common.linux-x86_64-ub22

In my support tree with all the synApps modules, including areaDetector, these are all Makefile lines that contain the string '.req'.


[epics@corvette devel]$ find . -name Makefile -exec grep -H '\.req' {} \;
./motor-7-2-2/modules/motorMicos/iocs/micosIOC/micosApp/Db/Makefile:DB_INSTALLS += $(MOTOR)/db/asyn_motor_positions.req
./motor-7-2-2/modules/motorMicos/iocs/micosIOC/micosApp/Db/Makefile:DB_INSTALLS += $(MOTOR)/db/asyn_motor_settings.req
./motor-7-2-2/modules/motorMicos/iocs/micosIOC/micosApp/Db/Makefile:DB_INSTALLS += $(MOTOR)/db/motor_positions.req
./motor-7-2-2/modules/motorMicos/iocs/micosIOC/micosApp/Db/Makefile:DB_INSTALLS += $(MOTOR)/db/motor_settings.req
./motor-7-2-2/modules/motorAerotech/aerotechApp/Db/Makefile:DB += EnsemblePSOFly_settings.req
./motor-7-2-2/modules/motorAerotech/aerotechApp/Db/Makefile:vpath %.req $(USR_VPATH) $(GENERIC_SRC_DIRS)
./motor-7-2-2/modules/motorAerotech/iocs/aerotechIOC/aerotechApp/Db/Makefile:DB_INSTALLS += $(MOTOR_AEROTECH)/db/EnsemblePSOFly_settings.req
./motor-7-2-2/modules/motorAerotech/iocs/aerotechIOC/aerotechApp/Db/Makefile:DB_INSTALLS += $(MOTOR)/db/EnsemblePSOFly_settings.req
./motor-7-2-2/modules/motorNewport/iocs/newportIOC/newportApp/Db/Makefile:DB_INSTALLS += $(MOTOR)/db/asyn_motor_positions.req
./motor-7-2-2/modules/motorNewport/iocs/newportIOC/newportApp/Db/Makefile:DB_INSTALLS += $(MOTOR)/db/asyn_motor_settings.req
./motor-7-2-2/modules/motorNewport/iocs/newportIOC/newportApp/Db/Makefile:DB_INSTALLS += $(MOTOR)/db/profileMoveController_settings.req
./motor-7-2-2/modules/motorNewport/iocs/newportIOC/newportApp/Db/Makefile:DB_INSTALLS += $(MOTOR)/db/profileMoveAxis_settings.req
./motor-7-2-2/modules/motorNewport/iocs/newportIOC/newportApp/Db/Makefile:DB_INSTALLS += $(MOTOR_NEWPORT)/db/profileMoveControllerXPS_settings.req
./motor-7-2-2/modules/motorNewport/iocs/newportIOC/newportApp/Db/Makefile:DB_INSTALLS += $(MOTOR)/db/profileMoveControllerXPS_settings.req
./motor-7-2-2/modules/motorNewport/newportApp/Db/Makefile:DB += profileMoveControllerXPS_settings.req
./motor-7-2-2/modules/motorNewport/newportApp/Db/Makefile:DB += XPSPositionCompare_settings.req
./motor-7-2-2/modules/motorNewport/newportApp/Db/Makefile:vpath %.req $(USR_VPATH) $(GENERIC_SRC_DIRS)
./motor-7-2-2/modules/motorAcsMotion/iocs/acsMotionIOC/acsMotionApp/Db/Makefile:DB_INSTALLS += $(MOTOR)/db/asyn_motor_positions.req
./motor-7-2-2/modules/motorAcsMotion/iocs/acsMotionIOC/acsMotionApp/Db/Makefile:DB_INSTALLS += $(MOTOR)/db/asyn_motor_settings.req
./motor-7-2-2/modules/motorAcsMotion/iocs/acsMotionIOC/acsMotionApp/Db/Makefile:DB_INSTALLS += $(MOTOR)/db/profileMoveController_settings.req
./motor-7-2-2/modules/motorAcsMotion/iocs/acsMotionIOC/acsMotionApp/Db/Makefile:DB_INSTALLS += $(MOTOR)/db/profileMoveAxis_settings.req
./motor-7-2-2/motorApp/Db/Makefile:DB += $(patsubst ../%, %, $(wildcard ../*.req))
./motor-7-2-2/motorApp/Db/Makefile:vpath %.req $(USR_VPATH) $(GENERIC_SRC_DIRS)
./calc-3-7-4/calcApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./alive-1-4/aliveApp/Db/Makefile:REQ += aliveMSGCalc_local.req
./scaler-4-0/scalerApp/Db/Makefile:  vpath %.req $(USR_VPATH) $(GENERIC_SRC_DIRS)
./scaler-4-0/scalerApp/Db/Makefile:DB += $(patsubst ../%, %, $(wildcard ../*.req))
./quadEM-siddons/quadEMApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./quadEM-siddons/quadEM-9-3_real/quadEMApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./tomoscan_old/tomoScanApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./SIS3153/SIS3153App/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./mca-7-9/mcaApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./tomoscan/tomoScanApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./lua-3-0-2/luaApp/Db/Makefile:REQ += luascripts10_settings.req
./lua-3-0-2/luaApp/Db/Makefile:REQ += script_settings.req
./delaygen-1-2-3/delaygenApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./ip330-2-10/ip330App/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./busy-1-7-3/busyApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./ipUnidig-2-12/ipUnidigApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./dante-1-1/danteApp/Db/Makefile:DB += $(patsubst ../%, %, $(wildcard ../*.req))
./ip-2-21-1/ipApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./ip-2-21-1/ipApp/Db/Makefile:#vpath %.req $(USR_VPATH) $(GENERIC_SRC_DIRS)
./sscan-2-11-5/sscanApp/Db/Makefile:REQ += alignParms_settings.req
./sscan-2-11-5/sscanApp/Db/Makefile:REQ += saveData_settings.req
./sscan-2-11-5/sscanApp/Db/Makefile:REQ += scanAux_settings.req
./sscan-2-11-5/sscanApp/Db/Makefile:REQ += scanParms2D_settings.req
./sscan-2-11-5/sscanApp/Db/Makefile:REQ += scanParmsRemote_settings.req
./sscan-2-11-5/sscanApp/Db/Makefile:REQ += scanParms_settings.req
./sscan-2-11-5/sscanApp/Db/Makefile:REQ += scanProgress_settings.req
./sscan-2-11-5/sscanApp/Db/Makefile:REQ += scan_settings.req
./sscan-2-11-5/sscanApp/Db/Makefile:REQ += sscanRecord_settings.req
./sscan-2-11-5/sscanApp/Db/Makefile:REQ += standardScans_settings.req
./optics-2-13-5/opticsApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./quadEM-9-4/quadEMApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./dxp-6-0/dxpApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./tpmac-3-11dls5/iocs/pmacGeobrickExample/pmacTestApp/src/Makefile:DATA += pmacGeobrickExample.req
./tpmac-3-11dls5/iocs/pmacGeobrickExamplePortDriver/pmacTestApp/src/Makefile:DATA += pmacGeobrickExample.req
./CARS/CARSApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./std-4-0/stdApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./vme-2-9-4/vmeApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./dac128V-2-10-1/dac128VApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./softGlue-2-8-3/softGlueApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./ip330/ip330App/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./softGlueZynq-2-0-4/softGlueApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./SyringePump-0-1/SPApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./xxx-6-2-1/xxxApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./caputRecorder-1-7-4/caputRecorderApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./measComp-4-3/measCompApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./autosave-5-11/asApp/Db/Makefile:REQ += configMenuNames.req
./autosave-5-11/asApp/Db/Makefile:REQ += configMenu.req
./autosave-5-11/asApp/Db/Makefile:REQ += configMenu_settings.req
./modbus-3-4/modbusApp/Db/Makefile:REQ += $(patsubst ../%, %, $(wildcard ../*.req))
./areaDetector-3-14/ffmpegServer/ffmpegServerApp/Db/Makefile:DB += ffmpegServer_settings.req
./areaDetector-3-14/ADCore/ADApp/Db/Makefile:DB += $(patsubst ../%, %, $(wildcard ../*.req))
./areaDetector-3-14/ADLambda/LambdaApp/Db/Makefile:DB += ADLambda_settings.req
./areaDetector-3-14/ADCompVision/adcvApp/Db/Makefile:DB+=NDCV_settings.req
./areaDetector-3-14/ADPluginBar/barApp/Db/Makefile:DB+=NDBar_settings.req
./ketek-1-0/ketekApp/Db/Makefile:DB += $(patsubst ../%, %, $(wildcard ../*.req))
./ThorLabsDFM-1-0/ThorLabsDFMApp/Db/Makefile:DB += $(patsubst ../%, %, $(wildcard ../*.req))

Note that some of them use 'REQ +=', some use 'DB +=', and some use 'DB_INSTALL +='. They all work fine with no errors or warnings, and the .req files are all in the appropriate db/ directory.

@MarkRivers
Copy link
Member

I believe I figured it out. I build the synApps modules, including calc, sscan, etc. in a support tree with a top-level configure directory cloned from https://github.com/EPICS-synApps/support. That contains this file:
https://github.com/EPICS-synApps/support/blob/master/configure/CONFIG_REQ
which contains these lines:

FILE_TYPE += REQ
INSTALL_REQ = $(INSTALL_LOCATION)/db

REQ += $(patsubst ../%, %, $(wildcard ../*.req))

It also contains a Makefile that contains this line:

CFG += CONFIG_REQ

That copies CONFIG_REQ to support/cfg where the build system picks it up when I build calc, sscan, etc.

As you can see above, many of the synApps modules (calc, sscan, autosave, modbus, measComp, etc.) rely on this rule.

We could discuss how this should best be handled in the future, but for now I don't want to change EXAMPLE_commonPlugins.cmd to look in the App/Db directory.

@jwlodek
Copy link
Member

jwlodek commented Feb 17, 2026

Would moving that rule to the autosave module like was done with RULES_SNCSEQ in the sequencer module make sense? This way the rule is not dependent on using the support top level tree: epics-modules/sequencer@2e0a7b6

Would just need to define a path to AUTOSAVE in the RELEASE files.

@kgofron
Copy link
Member Author

kgofron commented Feb 17, 2026

I am fine running the modified version for now. I checked our beamline deployments, and none of them have .req files in /db folder.

  • I also use synApps
g1@lap133454:/epics/support2/configure$ git remote -v
origin	https://github.com/EPICS-synApps/configure (fetch)
origin	https://github.com/EPICS-synApps/configure (push)
  • which contains CONFIG_REQ
kg1@lap133454:/epics/support2/configure$ more CONFIG_REQ 
FILE_TYPE += REQ
INSTALL_REQ = $(INSTALL_LOCATION)/db

REQ += $(patsubst ../%, %, $(wildcard ../*.req))
  • and configure/Makefile
    • CFG += CONFIG_REQ

Perhaps you used synaApps command 'make release' or similar, while I did not??

@kgofron
Copy link
Member Author

kgofron commented Feb 17, 2026

Reverted the request file source, since it can be resolved elswhere, perhaps synApps, or at module level.

@kgofron kgofron closed this Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments