Virgo Logbook
UTC--:--:--
GPS-
Reports
AdV-SAT›Suspension control upgrade #49270

Communication problem with suspensions is back

As reported by the operator: "During the afternoon we experienced a series of disconnection errors of the code created to align the North cavity that seemed related to the Suspension software"
it seems that our old  Communication problem with suspensions ( See: 46810, 46698 ) is back.

Making the problem very evident does not need any script running or any attempt of communication. By just using the standard Tango tools (from Jive) you can set to monitor the nodes creating problem and it can be seen that the corresponding attributes (and the status flag itself) become gray and sometime a timeout error is reported. The same kind of timeout is what get seen from any stand alone python script (or automation node) as disconnection error.

The fact that the problem is uccurring while all Automation nodes are completely off, is a further demonstration that the additional load generated by the queries coming from it is not a factor in this problem.

As usual, for trying to improve the situation, I attempted the whole tango servers bundle restart, but unfortunately, this did not improve the situation. In Fig. 1 and 2 the status of the NI, NE and PR SatServers before and after the restart. No improvement.

I also had a look to the health state of the hosting machine (olserver120) without spotting anything pathological (Fig.3 - 8)

Most probably, the deeper investigation process suspended during O3 need to be resumed.

10 comments

boschi, carbognani, tacca, tapia · 27 Aug 2020 · 19:06 #49277
Today we have attempted to make some further changes to diagnose the problem.
All servers were progressively moved from olserver120 (virtual machine)  to olserver53 (physical machine) in groups (the tango so called levels) without major effects.
When we tried moving to olserver53 also the DataBaseds process (so making olserver53 the new TANGO_HOST) that seemed to make the difference.
Trying to then swap back to olserver120 we thought to see a repeatable worsening effect but then we realized we were again fooled by the initial transition effect that seems to be there when the SatServer get restarted.
It seems we reached a slightly better situation and probably the most important action was the restart of the DataBaseds more than anything else. We leave anyway the rest of the process on olserver53 and we may attempt going back in the future.
We made some attempts to try to use GUI interfaces (mirror steering) and python locking scripts which were still inconclusive to see if we are in a workable situation.
boschi, carbognani · 28 Aug 2020 · 17:34 #49286
Today we have made the following activities:
- We tryied if splitting the SatServer/ALL instance into towers instances would make any difference thus creating three server instances: SatServer/NI, SatServer/NE, SatServer/PR.
It turned out that no big gains could be achieved with this splitting with the behaviour of each single instance very similar to the SatServer/ALL so we stepped back.
- Then we started looking at the available errors messages from the LcuServer and we acted on the code in order to eliminate the timeouts generated by periodically reading the runningSoftware attribute. The reading is stopped as soon at least a succesfull reading is made. This eliminated those error reporting on the LcuServer and seemed improving the situation.
Also, little modification was done on the SatServer in order to reduce the frequency of LcuServer status reading. No relevant improvement could be spotted.

In this status some commissioning could proceed as reported. Those investigations and limited improvements are not conclusive. To be resumed next week.
carbognani · 11 Sep 2020 · 13:55 #49401

During the activities triggered by yesterday network problem we realized that some of the Tango applications were showed as stopping/restarting by themselves from the astor interface.

Looking at the /var/logs/messages on olserver53 we realized that those corresponded to crashes of processes caused by segmentation violation errors:

[Sep11 09:33] python[27274]: segfault at 38 ip 00007fa2f070750d sp 00007fa2e739ecd0 error 4 in libomniORB4.so.2.1[7fa2f0616000+1ac000]
[Sep11 10:25] DspServer[31774]: segfault at 0 ip 00007f736c40f901 sp 00007f7361ff97c8 error 4 in libc-2.17.so[7f736c2a1000+1c2000]
[Sep11 10:37] DspServer[32598]: segfault at 0 ip 00007f62a3c70901 sp 00007f62997f87c8 error 4 in libc-2.17.so[7f62a3b02000+1c2000]
[Sep11 10:58] DspServer[34099]: segfault at 0 ip 00007f995b9ed901 sp 00007f99517f87c8 error 4 in libc-2.17.so[7f995b87f000+1c2000]
[Sep11 11:22] python[35878]: segfault at 10 ip 00007fa34eae716c sp 00007fa330f38e50 error 4 in libtango.so.9.2.2[7fa34e78e000+5b3000]


Since moving the whole SAT Tango bundle to olserver53 did not make a big difference and since we did not recall observing such kind of problems on olserver120 we have rolled back this config change and restored previous situation moving back all Tango SAT Servers to olserver120

The swap has been performed during lunch time

In terms of the communication problems it lseems we are in a relatively good state since it is not possible to immediately reproduce it, at least for an ipython interface were data reading statement like this:
In [224]: for i in range(0,1000):
...: print(PR.MAR_TX_SET)

can be executed without triggering timeout errors.

To be confirmed by checking the situation while running locking scripts

carbognani · 27 Oct 2020 · 19:07 #49759

This afternoon I have continued the activities of debugging on this problem. Actions included:

  • Removal of the always_executed_hook and read_attr_hardware general methods inside SatServer.py: no effect
  • Modification of the polling period (poll_period) of all satserver devices from 2 sec to 5 sec: no apparent effect
  • Set to 0 of the poll_period of all satserver, implying no more polling: A much shorted initial transient of the SatServer could be observed and some improvement for some towers but still on some towers such as PR timeouts were still there, observable from ipython or from the AlignementUI.


So, results are still inconclusive but all investigations so far kind of converge on the suspect that those timeouts are embedded into the (probably too many) levels of DeviceProxy indirection:

Application (DAQ bridge, Automation) -> DeviceProxy -> SatServer -> DeviceProxy -> LCuServer -> DeviceProxy -> DspServer 

I have now restored the standard parameters (2 sec polling) and restarted the standard version of the SatServer which runned during O3 (v1r3):
fcarbogn@olserver120[~/packages/Sa/SatServer/v1r3p2]: ps -ef | grep SatServer
virgod 3265 1 2 18:22 ? 00:00:26 python /virgoApp/Sa/SatServer/v1r3/src/SatServer ALL

 

bersanetti, boschi, carbognani, vardaro · 2 Nov 2020 · 09:53 #49805
On Thursday Oct. 29 afternoon, a debugging session on this problem was carried out with Diego and Valerio.
As usual, interpreting the logging outcome is not easy but we confirmed the suspect that the problem are occurring at the level of SatServer and LcuServer DeviceProxy and that the DspServer level seems working fine.
We did not revert some of the testing conditions, specifically the inhibit of the 2sec polling of all gnames in the SatServer. Interacting with Marco Vardaro it seems that in this conditions (were the major solicitation of the system is not there) the Alignement GUIs are much better responsive and running locking python scripts seems now possible with the rate of communication errors much lower.

There seems to be negative side effect in the data collection via the DAQ bridge but, since this have much lower effects on the current activities, we keep this setup for the moment while keep working on this offline.
carbognani · 11 Nov 2020 · 21:43 #49901

As discussed at the last meeting dedicated to this issue, being few weeks of further debugging inconclusive, I have proceeded in implementing a new server with the aim of substituting the existing TangoDAQBridge and provide interface role for the virgotools library and the Automation scripts.
This new server (corresponding to the PySat package) is bypassing the Tango SatServer and LcuServers and interface directly to the Tango DspServers via the standard Tango DeviceProxy mechanism.

After some offline testing on the VirgoRD domain (including data collection from a single tower), this morning I have substituted the existing SatServer DAQ bridge (an instance of the TangoDAQSmsBridge):
https://vpm.virgo.infn.it:40000/main.html?subsystem=Suspension&process=SatServer
with the new PySat implementation.

Even if further monitoring is needed, things looks good so far with data being continuously acquired and no sign of data missing because of timeouts. This can be clearly seen from the DMS were the corresponding flags did not become gray anymore since the restart using PySat (See Fig. 1-2).

As far as the Tango SatServer, the standard parameters (2 sec polling) have been restored (which set to 0 ultimately did not provide any improvement, as it seemed at the beginning) and the standard version which run during O3 (v1r3) has been restarted.

The next steps in this activity will be the development in PySat of the Cm handlers able to regenerate the interface to virgotools and the corresponding modifications inside the PythonVirgoTools library. Once those finalized, it will be possible to test against automation scripts and user interfaces such as the mirrors steering GUI (alignementUI).
 

carbognani · 19 Nov 2020 · 15:48 #49980
This morning at around 09:30 LT I have restarted the PySat server to put in operation the new version (v2r0) that include the interface toward virgotools and the Automation/GUIs
Valerio and Paolo have  provided the TEST_COM test gname in Sc_SR and reading/writing tests against it have been positive so far with no sign of timeout errors.
Next step is the modifications of PythonVirgoTools to make it compliant with the new interface. As mentioned by Bas at last coordination meeting, those modifications should be relatively easy to implement.
 
 
boschi, carbognani, swinkels · 21 Dec 2020 · 22:01 #50296
This morning we have progressed in the tests of PySat v2r1 and PythonVirgoTools v5r0 implementing the interface toward GUIs and Automation.

We have made stress tests in writing and reading back of Sc_SR TEST_COM both from the Cm interface and the virgotools one (basically via SR.TEST_COM) at increasing rate for increasing number of times with good results.
We had a crash of PySat at very high speed with the plain Cm interface. To be investigated.
We made also some tests steering the WE and PR mirrors from the AlignementUI GUI and the interface was well responsive with no timeout occurrences. We got few times some reply processing errors, but then all commands and mirror steering completed correctly, with no effect on the actual ongoing actions.
With further investigation, it seems that those errors are associated to the way specifically cm_send_receive was originally implemented inside PythonVirgoTools.
Those problems were not evident before most probably because the different nature of the virgotool interface toward Tango SAT. This will be further investigated but is totally unrelated with the timeout problems and does not prevent keep testing with the current virgotools version.
bersanetti, carbognani, melo, swinkels · 23 Dec 2020 · 17:05 #50313
This morning we have made good progress in testing PySat v2r1 and PythonVirgoTools v5r0 against the Automation.

We started with the INJ_MAIN automation node, and by updating few configuration parameters we have been able to achieve IMC_RESTORED state without problems.
We refrained to attempt the start of the FMODERR tuning sequence that we considered would need a dedicated shift for proper tuning.

Then we attempted the restart of all SUS node (adding also the missing SUS_SR node) and there we experience that the sporadic crashes of PySat observed in the past became fully repeatable every time we attempted the transition to SAVE_ALIGNED.
We were then able to trace that the crashes were linked to the periodic query of data for the DAQ made in parallel and we have solved the problem by having a 2 separate processes (also conceptually more correct), one for the DAQ bridging (called SusDAQBridge) and one for the interfacing with Automation/GUI, still named, for the moment, SatServer (we will change most probably also this name for not making confusion with the Tango SatServer).

We experienced also one occurrence of a NaN while reading gnames which implied the triggering of an USER_CODE error inside the automation. This will need to be more gracefully managed similarly to the EzcaConnectError.
Since, most probably, introducing this error management at the level of user code is cumbersome, it need to be done at metatron code level itself (will be done and tested soon).

We made also some tests steering with the AlignementUI GUI confirming good behaviour but also the reply processing errors, and alternative implementations of cm_send_receive are currently investigated (not a blocking problem)

We leave the automation with INJ_MAIN and all SUS nodes up and running (See Fig. 1) since it´s quite interesting to verify the long term behaviour (SUS nodes are periodically exercising the system by checking that the suspensions are controlled). Currently the SatServer logging is quite verbose and we leave like this for this initial tests phase.
carbognani · 24 Dec 2020 · 14:18 #50316

As far as a sporadic occurrence of a NaN or in general errors on DSP interfacing, I verified (actually failed to remember....) that they could be easily managed by simply adding the new corresponding exceptions (DSPGetError/DSPSetError from virgotools) into the available (in META_library.py) handle_exceptions() decorator already embedded everywhere into the user code for the purpose.

An example of the resulting error management of a NaN occurrence is below, leading to the resuming of SUS_BS node afterward:
2020-12-24-08h00m20-UTC>INFO...-gname F0_DC_ENBL has value nan
2020-12-24-08h00m20-UTC>INFO...-cm_send(b'SUS_BS', b'get_value_reply', nan)

2020-12-24T08:00:20.442Z SUS_BS [ALIGNED.run] USERMSG 0: EZCA CONNECTION ERROR: DSP Get Error: Did not receive a finite gname value: nan
[ALIGNED.run] USERMSG 0: EZCA CONNECTION ERROR: DSP Get Error: Did not receive a finite gname value: nan
2020-12-24T08:00:20.549Z SUS_BS CONNECTION ERROR. attempting to reestablish...
CONNECTION ERROR. attempting to reestablish...


This error resilience can be quickly made evident by stopping/restarting the SatServer. As seen in Fig.1-2, all SUS nodes are able to correctly resume running after the event.

I restarted all SUS nodes after the modifications and so far, no more blocking USER_CODE errors were experienced.
I´ll leave all SUS nodes running and I will keep monitoring the situation in the coming days.

So, knoking wood, those deployment tests results are quite positive, confirming what observed when deploying only the DAQ bridging with the frequent timeouts not occurring anymore.