Skip to content

PVManager creates another subscription after each 'disconnect' #216

Open
@kasemir

Description

@kasemir

To reproduce, run softIoc with this example database on one computer:

record(calc, "ramp")
{
  field(INPA, "ramp")
  field(CALC, "A<10?A+1:0")
  field(SCAN, "1 second")
}

record(compress, "wf")
{
  field(INP, "ramp CP")
  field(ALG, "Circular Buffer")
  field(NSAM, "10")
}

On another computer, run two different versions of CSS 'probe' on those channels:

  1. One older, utility.pv-based instance of CSS, like SNS 3.1.6, using one of the PVs.
  2. One instance of a current CSS, based on pvmanager, using the other PV.

The exact PVs don't matter. Different PVs are simply used to identify the CSS client on the IOC.

Disconnect the network cable, wait for probe to show disconnect, reconnect the network cable, wait for reconnect.
Repeat a few times.

On the IOC, check casr 2:

Channel Access Server V4.13
Connected circuits:
TCP 160.91.233.73:59343(mac95088): User="ky9", V4.13, 2 Channels, Priority=0
...
    wf(5rw)
TCP 160.91.233.73:59344(mac95088): User="ky9", V4.13, 2 Channels, Priority=0
...
    ramp(1rw)   wf(1rw)

==>
After 5 network disconnects, the older CSS instance based on utility.pv, which in this example monitored both the "ramp" and "wf" channels, keeps only one connection.
The current CSS instance, based on pvmanager, which in this example only monitored the "wf" channel, creates a new subscription after each (re-)connection. In this example, it had 5 subscriptions.

Duplicate channel subscriptions, especially for waveforms, can significantly increased the IOC CPU load after such network hickups to the point where the IOC becomes unresponsive.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions