Community

InterruptWait() Returns RSIEventTypeNONE (?)

We had a machine go into some sort of tailspin, where it received ~500 interrupts per second (invoking Axis::InterruptWait(100)) until the process exhausted allocatable memory and crashed. I don’t know that this was the cause of the problem rather than a symptom, but the details available to me piqued my curiosity.

The event type returned was RSIEventTypeNONE.

What does this event type mean?

Should I ever expect to receive this? It’s (of course—being 0) not in any of the interrupt masks that I’m applying.

In the past, when I had incorrectly masked interrupts, a number of them were queuing up and never getting processed (resulting in eventually fatal memory growth). Would that same behavior happen for None events?

What can you tell me about this event type?

I “received” these interrupts about every 30 microseconds. IDK if that is how fast they were coming in, or if that was just how fast I could handle them.

We expect RSIEventTypeNONE to be returned from InterruptWait(…) when another thread has called InterruptWake(). Are you calling InterruptWake()? Are you frequently enabling/disabling interrupts with InterruptEnableSet()?

1 Like

We don’t call InterruptWake() anywhere directly.

We do call InterruptEnableSet() in a few places, but only in the CTOR of an object that wraps an Axis or when we instantiate the motion controller. This only happens when we (re)start the network (or invalidate objects, like changing the user limit count), and neither of these are happening every 30 usec.

In this particular instance, the interrupt only came in on axis 0 (and not the motion controller) for this 1-axis machine.

Ok, so we don’t have a good explanation for the phenomenon. The RMP can only generate interrupts every cycle, so they must have been queued for a while. You could check InterruptSampleTimeGet() to see the value of the RMP sample counter when the interrupt was generated.

Can you reproduce the problem?

I’ve only seen it once. The details I have available did not make complete sense, hence the question. For now, you’ve done all I need you to do about it.