Rare EXCEPTION Page fault - mvMain

We have this very rare PageFault

Infos:

  • Frequency: 5 times within 2 years with 3 systems
  • “Troubleshooting Page Faults” is known
  • No “green arrow” in the backtrace to jump directly to the code that caused the page fault
  • IecCheck was active during commissioning (6 months)
  • PageFault occurs when no machine processes are started and no operator interactions are made
  • APC910, H4.93
  • Mapp Versions 5.23.x

We have already created a ticket 1 year ago but have not been able to find a solution with our local B&R Support Team.

Since the error occurred again yesterday after a long time, I’ll try it here. Does anyone have experience with PageFaults caused by errors in the programming of MappView / MappServices?

  • Invalid .bindinglist?
  • Invalid texts?
  • Invalid snippets?

Other suggestions?

Best regards,
Simon

Hi,

oh that’s really hard to investigate.
I don’t have any special experiences with page faults in mvMain, but in past I also had the challence to figure out one or two special cases.

In most cases it was helpful to have as many data as possible and trying to aggregate them to get an impression of the machines status: so do you have more then one logger of machines when the issue happened? Is there any more data, for example like alarm modules, audit trails or so?

About the possibly available loggers: do all of them show the same “pattern” of the function calls in backtrace? And do they all have the same series of entries in the logger BEFORE the page fault happened?

If yes, would it be possible trying to reproduce exactly that series of actions?
I know thats extremely hard to be honest, but in my experience the only way to go on if the issue happens so rare.

To be a bit more concrete, what I mean in your case:
I can see in the screenshot, that around 1 second before the pagefault happened, a (new?) mappview client connected. Why, if the machine isn’t operated, maybe some type of temporary connection loss?
And within the same timeframe, there were some safety entries about modules/connection lost. Are there some more entries within the last seconds inside logger that we can’t see in the screenshot?
What does the code in such situations, for example creating alarm entries via the text system / mpAlarmX? If yes, are variable snippets used, maybe / especially containing referenced variables, or variables where the content is created by strcpy/strcat, memcpy or so?

Of course, what I’ve written is more or less “looking into the crystal ball”, I only wanted to share my experience on trying how to “circle the issue”.

From the call stack in your screenshot, I would start to look into the direction of text snippets.
If possible, I also would recommend to update to mappView 5.24.3.

Best regards!
Alex

1 Like

Hi Alexander,

Thank you very much for your detailed reply.

Is there any more data, for example like alarm modules, audit trails or so?

AuditTrail was deactivated because there were problems with the export.

I can see in the screenshot, that around 1 second before the pagefault happened, a (new?) mappview client connected.

Indeed there is always an entry with a client that (re)connects before the page fault.

Why, if the machine isn’t operated, maybe some type of temporary connection loss?

In one of the cases, the the page fault happend right after the operator got back to the plant with a mobile panel.
I would have to find out why the connection was interrupted in the other cases, I honestly don’t know.

What does the code in such situations, for example creating alarm entries via the text […]

Alarms are all generated directly after startup with the FUB MpAlarmXConfigAlarm.

If possible, I also would recommend to update to mappView 5.24.3.

We will do at the next opportunity.

From the call stack in your screenshot, I would start to look into the direction of text snippets.

We have only this two Snippets for a dynamic text from a TextList

  <Snippets>
	 <Snippet id="snMsgCauseTextId" xsi:type="session" type="IndexText" formatItem="MsgCause.{1}" />
	 <Snippet id="snMsgRemedyTextId" xsi:type="session" type="IndexText" formatItem="MsgRemedy.{1}" />
  </Snippets>
</SnippetsSet>

An ItemDoubleClick event in the AlarmList widget writes those session variables:

    <EventBinding id="ebMessageListHelp">
      <Source xsi:type="widgets.brease.AlarmList.Event" contentRefId="coMessageList" widgetRefId="AlarmList1" event="ItemDoubleClick" />
      <EventHandler>
        <Sequence>
          <Step order="0">
            <Action>
              <Target xsi:type="session.VariableAction" refId="svMsgListCode">
                <Method xsi:type="session.VariableAction.SetValueNumber" value="=code" />
              </Target>
            </Action>
          </Step>
          <Step order="1">
            <Action>
              <Target xsi:type="session.VariableAction" refId="svMsgListMessage">
                <Method xsi:type="session.VariableAction.SetValueString" value="=message" />
              </Target>
            </Action>
          </Step>
          <Step order="2">
            <Action>
              <Target xsi:type="session.VariableAction" refId="svMsgListTyp">
                <Method xsi:type="session.VariableAction.SetValueString" value="=category" />
              </Target>
            </Action>
          </Step>
          <Step order="3">
            <Action>
              <Target xsi:type="clientSystem.Action">
                <Method xsi:type="clientSystem.Action.OpenDialog" dialogId="diMsgListHelp" mode="modal" verticalPos="middle" headerText="$IAT/Dialog.Msg" autoClose="true" />
              </Target>
            </Action>
          </Step>
        </Sequence>
      </EventHandler>
    </EventBinding>

Dialog is opened and shows the corresponding text

<Content id="coMsgListHelp" height="500" width="900" ">
  <Widgets>
    <Widget xsi:type="widgets.brease.TextOutput" id="TextOutput_Message" top="10" left="10" width="880" height="80" zIndex="2" multiLine="true" value="Meldungsausgabe" wordWrap="true"/>
    <Widget xsi:type="widgets.brease.GroupBox" id="GroupBox_Cause" top="105" left="10" width="435" height="385" zIndex="1" text="$IAT/Sys.Cause" style="styleGrey_333333">
      <Widgets>
        <Widget xsi:type="widgets.brease.TextOutput" id="TextOutput_Cause" top="0" left="0" width="420" height="320" zIndex="0" multiLine="true" value="$IAT/MsgCause.1" wordWrap="true" textAlign="left top" />
      </Widgets>
    </Widget>
    <Widget xsi:type="widgets.brease.GroupBox" id="GroupBox_Remedy" top="105" left="455" width="435" height="385" zIndex="0" text="$IAT/Sys.Remedy" style="styleGrey_333333">
      <Widgets>
        <Widget xsi:type="widgets.brease.TextOutput" id="TextOutput_Remedy" top="0" left="0" width="420" height="320" zIndex="0" multiLine="true" value="$IAT/MsgRemedy.1" wordWrap="true" textAlign="left top" />
      </Widgets>
    </Widget>
  </Widgets>
</Content>

And the bindings:

<BindingsSet id="coMsgListHelp_binding">
	<Bindings>
		<Binding mode="oneWay">
			<Source xsi:type="session" refId="svMsgListCode" attribute="value" />
			<Target xsi:type="snippet" refId="snMsgCauseTextId" attribute="value" /> 
		</Binding>
		<Binding mode="oneWay">
			<Source xsi:type="session" refId="svMsgListCode" attribute="value" />
			<Target xsi:type="snippet" refId="snMsgRemedyTextId" attribute="value" /> 
		</Binding>
		<Binding mode="oneWay"> 
			<Source xsi:type="snippet" refId="snMsgCauseTextId" attribute="value" /> 
			<Target xsi:type="brease" widgetRefId="TextOutput_Cause" contentRefId="coMsgListHelp" attribute="value" /> 
		</Binding>
		<Binding mode="oneWay"> 
			<Source xsi:type="snippet" refId="snMsgRemedyTextId" attribute="value" /> 
			<Target xsi:type="brease" widgetRefId="TextOutput_Remedy" contentRefId="coMsgListHelp" attribute="value" /> 
		</Binding>
		<Binding mode="oneWay">
			<Source xsi:type="session" refId="svMsgListMessage" attribute="value" />
			<Target xsi:type="brease" contentRefId="coMsgListHelp" widgetRefId="TextOutput_Message" attribute="value" />
		</Binding>
	</Bindings>
</BindingsSet>

And that’s all we do with snippets (except for the Alarm Text Snippets)

Something new I found in the logger which is new to me and looks very suspicious:

Unfortunately, no variable is specified in “a”

To second one of Alex’s suggestions – migrating to the latest version (5.24.3): there was a bugfix in 5.24.2 for a problem that could have resulted in page faults from simultaneous client reloads:

Hi,

thanks for the informations!

Because of the new client connection, we at least should take into consideration, that the issue is somehow linked to a (re)connection and therefore (re)load of the visualization, the precaching (do you use precaching?), or the content on the inital page shown after loading the visualization.

As Daniel wrote, there was a fix regarding simultaneous loads with more then one client - to be honest I don’t know if mappView 5.23 was already affected of that issue, but do you use multiclient visualization?

About the “session variable failed”, that’s strange, yes. Are there session variables that can’t be accessed by the user “anonymous”, which is logged in at this point of time?

If possible, I would suggest trying to reproduce/force the (re)connect/(re)load procedure on a test system several times using a real PLC, not ArSim (but I think a PLC is enough, no need for the whole hardware) to see if you can gather more information.
I always try to use real PLCs for such investigations to get a similar timing behavior as on the machine, and what you describe “smells a bit like a timing based issue”.

I hope the information helps a bit,
Best regards!