mdsplus
mdsplus copied to clipboard
SIGSEGV bug in TDI Python function invocation but normal TDI works ok
Hi. I am experiencing a bug when accessing a particular signal node in our tree. It was discovered when using jScope to attempt to plot a particular signal, but trying to do so caused the mdsip server process to crash and the jScope to get disconnected. We similarly have reproduced this bug using the jScope local data provider.
The signal is a node called B_N05_000, a magnetic field beta probe trace. The model value for this node is \FUZE::B_N05_000:TDI_EXPR. In turn, the model value for this node is ProbeRCCorrection(\FUZE::TOP.SIGNALS.PROBES.AXIAL.THETA_000:B_N05_000). ProbeRCCorrection is a python function that does not access the data of the B_N05_000 node directly. Instead, it uses data from the children of B_N05_000.
Immediately after the shot, accessing the data of B_N05_000 triggers a TDI expression evaluation that invokes the ProbeRCCorrection python function in order to calculate the resulting data on demand. I will refer to this as a pre-cache access. (As described below, this kind of access is causing the SIGSEGV.) Some time after the shot, we run a python job script to invoke the ProbeRCCorrection(...) function and write the computed data directly back to the B_N05_000 signal node, overwriting the previous value of \FUZE::B_N05_000:TDI_EXPR with the pre-computed signal. I will refer to accessing the B_N05_000 data after this happens as a post-cache access. Note that the python job script is invoking the ProbeRCCorrection function directly through the standard python VM; there is no TDI expression evaluation as there would be in the pre-cache case.
The python job runs successfully to create the cached data. When accessing post-cache, everything works as expected. This is not surprising since post-cache accesses do not result in a TDI expression evaluation that invokes the ProbeRCCorrection python call.
However, when accessing pre-cache, a segmentation fault results. I attached GDB and can show the huge backtrace when it happens. It happens in both local data provider and mdsip data provider. I have also tried using a different python function and experience the same sort of backtrace, so I do not think the issue is something specific to the implementation of the python function.
The ProbeRCCorrection function is a faster replacement for a TDI expression we were using previously. This TDI expression worked flawlessly both remotely and locally, both pre-cache and post-cache. Aside from changing the vanilla TDI expression to the TDI-invoked Python function, everything is otherwise the same as far as I know.
Note that the long string of characters for each .so path of the BT is related to my use of the nix package manager to manage our organizations particular mdsplus software and services.
We are using stable_release-7-131-6.
Program received signal SIGSEGV, Segmentation fault.
0x00007fa14bddad40 in io_lock_local () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTreeShr.so
(gdb) bt
#0 0x00007fa14bddad40 in io_lock_local () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTreeShr.so
#1 0x00007fa14be0a041 in tree_lock_nci () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTreeShr.so
#2 0x00007fa14bdef795 in tree_get_nci () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTreeShr.so
#3 0x00007fa14bdfff58 in _TreeXNciGetNumSegments ()
from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTreeShr.so
#4 0x00007fa14b84268c in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#5 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#6 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#7 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#8 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#9 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#10 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#11 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#12 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#13 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#14 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#15 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#16 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#17 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#18 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#19 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#20 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#21 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#22 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#23 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#24 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#25 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#26 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#27 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#28 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#29 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#30 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#31 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#32 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#33 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#34 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#35 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#36 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#37 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#38 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#39 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#40 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#41 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#42 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#43 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#44 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#45 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#46 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#47 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#48 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#49 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#50 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#51 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#52 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#53 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#54 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#55 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#56 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#57 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#58 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
.....
#47418 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#47419 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#47420 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#47421 0x00007fa14b8434d4 in IsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so
#47422 0x00007fa14be59e1c in tdi_call () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so
#47423 0x00007fa14be5a1b3 in TdiCall () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so
#47424 0x00007fa14beee65c in get_data () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so
#47425 0x00007fa14beed0a2 in TdiGetSignalUnitsData () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so
#47426 0x00007fa14beed4da in TdiGetArgs () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so
#47427 0x00007fa14bf629af in Tdi1Same () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so
#47428 0x00007fa14bf39fc6 in TdiIntrinsic () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so
#47429 0x00007fa14bee8a9c in Tdi1Evaluate () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so
#47430 0x00007fa14be5bed8 in Tdi1Execute () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so
#47431 0x00007fa14bf39fc6 in TdiIntrinsic () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so
#47432 0x00007fa14bdb698f in execute_command () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsIpShr.so
#47433 0x00007fa14bdb9acb in execute_message () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsIpShr.so
#47434 0x00007fa14bdba533 in ProcessMessage () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsIpShr.so
#47435 0x00007fa14bdb2ac5 in ConnectionDoMessage () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsIpShr.so
#47436 0x00007fa14b8ba16a in run_server_mode.isra () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsIpTCP.so
#47437 0x00007fa14b8bb6a5 in io_listen () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsIpTCP.so
#47438 0x000000000040115c in main ()
Can you send us enough of the bits and pieces so that we could reproduce this? A sample - pre-cache tree and directions to reproduce ?
Ohh - and where are your from ?
-josh
On 2/14/22 1:15 PM, Daniel Austin wrote:
Hi. I am experiencing a bug when accessing a particular signal node in our tree. It was discovered when using jScope to attempt to plot a particular signal, but trying to do so caused the mdsip server process to crash and the jScope to get disconnected. We similarly have reproduced this bug using the jScope local data provider.
The signal is a node called B_N05_000, a magnetic field beta probe trace. The model value for this node is \FUZE::B_N05_000:TDI_EXPR. In turn, the model value for this node is ProbeRCCorrection(\FUZE::TOP.SIGNALS.PROBES.AXIAL.THETA_000:B_N05_000). ProbeRCCorrection is a python function that does not access the data of the B_N05_000 node directly. Instead, it uses data from the children of B_N05_000.
Immediately after the shot, accessing the data of B_N05_000 triggers a TDI expression evaluation that invokes the ProbeRCCorrection python function in order to calculate the resulting data on demand. I will refer to this as a pre-cache access. (As described below, this kind of access is causing the SIGSEGV.) Some time after the shot, we run a python job script to invoke the ProbeRCCorrection(...) function and write the computed data directly back to the B_N05_000 signal node, overwriting the previous value of \FUZE::B_N05_000:TDI_EXPR with the pre-computed signal. I will refer to accessing the B_N05_000 data after this happens as a post-cache access. Note that the python job script is invoking the ProbeRCCorrection function directly through the standard python VM; there is no TDI expression evaluation as there would be in the pre-cache case.
The python job runs successfully to create the cached data. When accessing post-cache, everything works as expected. This is not surprising since post-cache accesses do not result in a TDI expression evaluation that invokes the ProbeRCCorrection python call.
However, when accessing pre-cache, a segmentation fault results. I attached GDB and can show the /huge/ backtrace when it happens. It happens in both local data provider and mdsip data provider. I have also tried using a different python function and experience the same sort of backtrace, so I do not think the issue is something specific to the implementation of the python function.
The ProbeRCCorrection function is a faster replacement for a TDI expression we were using previously. This TDI expression worked flawlessly both remotely and locally, both pre-cache and post-cache. Aside from changing the vanilla TDI expression to the TDI-invoked Python function, everything is otherwise the same as far as I know.
Note that the long string of characters for each .so path of the BT is related to my use of the nix package manager to manage our organizations particular mdsplus software and services.
We are using stable_release-7-131-6.
|Program received signal SIGSEGV, Segmentation fault. 0x00007fa14bddad40 in io_lock_local () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTreeShr.so (gdb) bt #0 0x00007fa14bddad40 in io_lock_local () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTreeShr.so #1 0x00007fa14be0a041 in tree_lock_nci () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTreeShr.so #2 0x00007fa14bdef795 in tree_get_nci () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTreeShr.so #3 0x00007fa14bdfff58 in _TreeXNciGetNumSegments () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTreeShr.so #4 0x00007fa14b84268c in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #5 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #6 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #7 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #8 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #9 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #10 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #11 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #12 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #13 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #14 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #15 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #16 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #17 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #18 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #19 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #20 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #21 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #22 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #23 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #24 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #25 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #26 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #27 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #28 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #29 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #30 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #31 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #32 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #33 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #34 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #35 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #36 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #37 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #38 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #39 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #40 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #41 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #42 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #43 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #44 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #45 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #46 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #47 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #48 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #49 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #50 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #51 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #52 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #53 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #54 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #55 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #56 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #57 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #58 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so ..... #47418 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #47419 0x00007fa14b842788 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #47420 0x00007fa14b842652 in recIsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #47421 0x00007fa14b8434d4 in IsSegmented () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsMisc.so #47422 0x00007fa14be59e1c in tdi_call () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so #47423 0x00007fa14be5a1b3 in TdiCall () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so #47424 0x00007fa14beee65c in get_data () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so #47425 0x00007fa14beed0a2 in TdiGetSignalUnitsData () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so #47426 0x00007fa14beed4da in TdiGetArgs () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so #47427 0x00007fa14bf629af in Tdi1Same () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so #47428 0x00007fa14bf39fc6 in TdiIntrinsic () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so #47429 0x00007fa14bee8a9c in Tdi1Evaluate () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so #47430 0x00007fa14be5bed8 in Tdi1Execute () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so #47431 0x00007fa14bf39fc6 in TdiIntrinsic () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libTdiShr.so #47432 0x00007fa14bdb698f in execute_command () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsIpShr.so #47433 0x00007fa14bdb9acb in execute_message () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsIpShr.so #47434 0x00007fa14bdba533 in ProcessMessage () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsIpShr.so #47435 0x00007fa14bdb2ac5 in ConnectionDoMessage () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsIpShr.so #47436 0x00007fa14b8ba16a in run_server_mode.isra () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsIpTCP.so #47437 0x00007fa14b8bb6a5 in io_listen () from target:/nix/store/4h51bhh8cj3l17j25gym9f8bspyy9g6r-mdsplus/lib/libMdsIpTCP.so #47438 0x000000000040115c in main () |
— Reply to this email directly, view it on GitHub https://github.com/MDSplus/mdsplus/issues/2449, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABY5AZMCLGNGPITMWM3NQQLU3FBCXANCNFSM5OMGN7KA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Joshua Stillerman Research Engineer MIT Plasma Science and Fusion Center 617.253.8176 @.***
I work with @nelson-zapenergy at Zap Energy, Inc.
Send via email then? I'll see what I can do.
looks like a stack overflow due to the recursive recIsSegmented().. maybe a bug in that fuction?
Timo is right, it seems related to recursion that is too long. It may be caused by some loop in the node reference in the expression tree. recIsSegmented() recursively traverses the expression in order to discover whether any segmented node is involved in the expression being evaluated by jScope. If a circular dependency is present in the expression, recIsSegmented() keeps calling itself until the stack overflows (and my produce such an error). Indeed, recIsSegmented() should be improved in order to check for such circular dependencies.
Well, the apparent circular relationship is that \B_N05_000 -> \B_N05_000:TDI_EXPR -> ProbeRCCorrection(\B_N05_000). The python function itself does not contain any circular relationship because the data of \B_N05_000 are not used by the function; the input \B_N05_000 serves as a node reference so that the python function can access the children of that node. A viable workaround might be to redesign the function so that any children it uses are passed in directly as arguments e.g. ProbeRCCorrection(child1, child2, units, etc.).
Indeed, recIsSegmented() should be improved in order to check for such circular dependencies.
Do you mean that circular references should be supported or they should be identified and errored out?
Ok, I think we have understood. Indeed this is a circular dependency for recIsSegmented(), based on the algorithm used. I will put a fix in that routine avoiding re-visiting already visited nodes.