Coracleanup command is returning error  EXCEPTION_ACCESS_VIOLATION (0xc0000005)

book

Article ID: 210918

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager

Issue/Introduction

Issue:
======
Running Cora cleanup utility is throwing below error in command prompt:
"# A fatal error has been detected by the Java Runtime Environment:

#

#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffc7df72503, pid=2820, tid=6608"

-> On the SDM server go to command prompt and run Cora Cleanup using below command:
   CORACLEANUP /SERVER hostname /TYPE 2 /USERNAME sa /PASSWORD password /SCOPE USD /METHOD reinit /DATABASE mdb

-> It throws error as below:

 


C:\Users\Administrator>java -version
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) Client VM (build 25.112-b15, mixed mode)

C:\Users\Administrator>CORACLEANUP /SERVER hostname /TYPE 2 /USERNAME sa /PASSWORD password /SCOPE USD /METHOD reint /DATABASE mdb
Assets Read = 0, Registration Successful = 0, Registration Failed = 0#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ff9e0b738f6, pid=17160, tid=16432
#
# JRE version: OpenJDK Runtime Environment (11.0.3+7) (build 11.0.3+7)
# Java VM: OpenJDK 64-Bit Server VM (11.0.3+7, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# C  [ucrtbase.dll+0x238f6]
#
# Core dump will be written. Default location: C:\Users\Administrator\hs_err_pid17160.mdmp
#
# An error report file with more information is saved as:
# C:\Users\Administrator\hs_err_pid17160.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/AdoptOpenJDK/openjdk-build/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

Cause

Coracleanup does not work well in 64bit environment

Environment

Release : 17.3

Component : CA SERVICE MANAGEMENT

Resolution

1) Run "set PATH=C:\PROGRA~2\CA\SERVIC~1\REPLACED\HYD-368_CUM_C.OLD\bin;%PATH%"

2) Update "C:\PROGRA~2\CA\SERVIC~1\bin\coracleanup.cmd" to use the 32bit java as below:

   @echo off

setlocal
set NX_TEMP_CMD=%TEMP%\setenv.cmd
nx_env -d NX_ROOT > %NX_TEMP_CMD%
nx_env -d NX_JRE_INSTALL_DIR >> %NX_TEMP_CMD%
call %NX_TEMP_CMD%
del %NX_TEMP_CMD%

REM /* Build argument list */
set args=
:getargs
set args=%args% %1
shift
if not .%1 == . goto :getargs

REM /* Invoke the tool */

"C:\Program Files (x86)\CA\SC\JRE\1.8.0_112\bin\java" -DLOG_CONFIG_DIR="%NX_ROOT%/site/cora_cfg" -ea -classpath "%NX_ROOT%/java/lib/corajava.jar;%NX_ROOT%/java/lib/cora_util.jar;%NX_ROOT%/java/lib/log4j-1.2.17.jar;%NX_ROOT%/java/lib/ojdbc8.jar;%NX_ROOT%/java/lib/mssql-jdbc-7.2.2.jre8.jar" com.ca.Cora.util.ConsoleManager %args%

3) Execute it as "C:\PROGRA~2\CA\SERVIC~1\bin\CORACLEANUP /SERVER hostname /TYPE 2 /USERNAME sa /PASSWORD password /SCOPE USD /METHOD reint /DATABASE mdb"

 

#1 Would ensure that java loads the old, pre 17.3.0.X CORA DLLs that are 32 bit

#2 Would ensure that the 32bit java is used

#3 Would start coracleanup from NX_ROOT\bin\ folder.

Additional Information

This is reviewed under the defect DE60116 and the resolution is targeted in 17.3 RU6.

Attachments