MAI4405, ORA-00060: deadlock detected


Problem

  When a user checks uploaded Inspections on MAI4405 form some inspections are in Fail state. Re-submitting the Inspections does not help. More details about the failed Inspection::

ORA-00060: deadlock detected while waiting for resource

ORA-06512: at "HIGHWAYS.XLBE_DEF_STATUS", line 100

ORA-06512: at "HIGHWAYS.XLBE_DEF_STATUS", line 130

ORA-06512: at "HIGHWAYS.XLBE_DEF_STATUS", line 62

ORA-06512: at "HIGHWAYS.XLBE_DEF_STATUS_POST_STM_TRG", line 24

ORA-04088: error during execution of trigger 'HIGHWAYS.XLBE_DEF_STATUS_POST_STM_TRG'

 

Usually a lot of inspections per batch were loaded successfully but one or two failed.

  

  Solution

  The issue appears when at the same time at least two identical defects are being uploaded into the system. These two defects can be on deferent inspections or even on deferent batches being loaded at the same time. One of these defects have been already loaded into the system.

  User can ignore the inspection within the duplicated defect or amend the defect by specifying other attributes (eg activity, location, defect type etc) and re-submit the amended inspection.

Note On another occasion the issue occurs when the associated PEM_ID to which the Defect is associated, is cleared from the defect error correction form by the user and the inspection resubmitted repeatedly fails to load with the same error message.  Steps to resolve the issue:

Step 1.  Clear the Pem Id from the defect attribute on the error correction form and resubmit the inspection to see if that works.

Step 2.  if that fails then a ticket may need to be logged with the Support Team as an entry in the defect holding table that contains the PEM_ID, (possibly def_serial_nos ) needs to be cleared with sql, then resubmit the inspection to load.

             update  MAI_INSP_LOAD_ERROR_DEF set def_serial_no = null where def_defect_id = defect_id_from_the_failed_ispection;

Step 3.  Once the defect is loaded and can be queried from the defects table the attribute holding the PEM_ID on the defects form can be re-populated manually ( so please make a note or store Pem Id in defect description before clearing from defect PEM ID attribute - so available to do )     

The same error is shown when the same inspection file is being uploaded the second time into the system.

 

Related SR: 7000566459, 7000531591,7000711225