在Jenkins管道中使用VM的Jacob dll中的EXCEPTION_ACCESS_VIOLATION [英] EXCEPTION_ACCESS_VIOLATION in Jacob dll using VM in Jenkins pipeline

查看:239
本文介绍了在Jenkins管道中使用VM的Jacob dll中的EXCEPTION_ACCESS_VIOLATION的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在虚拟机内部使用时,我们遇到的问题可能与Jacob 1.14.3 dll有关.从Windows服务器VM(主服务器/从服务器)中的jenkins管道运行自动化脚本时,日志中会显示以下错误:

We are going through a problem probably related to Jacob 1.14.3 dll when being used inside a Virtual Machine. When running our automation script from the jenkins pipeline inside our windows server VMs (master/slaves) the following error is shown in the logs:

A fatal error has been detected by the Java Runtime Environment:

 EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000180012df1, pid=6404, tid=0x00000000000017bc

JRE version: Java(TM) SE Runtime Environment (8.0_271-b09) (build 1.8.0_271-b09)
Java VM: Java HotSpot(TM) 64-Bit Server VM (25.271-b09 mixed mode windows-amd64 compressed oops)
Problematic frame:
C  [jacob-1.14.3-x64.dll+0x12df1]

Core dump written. Default location: c:\jenkins\workspace\PipelineCenarios\Test_Com_Claudio\hs_err_pid6404.mdmp

If you would like to submit a bug report, please visit:
  http://bugreport.java.com/bugreport/crash.jsp
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.

[...]log too big to be posted in stack overflow[...]

VM Arguments:
jvm_args: -Dclassworlds.conf=C:\apache-maven-3.6.0\bin\..\bin\m2.conf -Dmaven.home=C:\apache-maven-3.6.0\bin\.. -Dmaven.multiModuleProjectDirectory=c:\jenkins\workspace\PipelineCenarios\Test_Com_Claudio\pos 
java_command: org.codehaus.plexus.classworlds.launcher.Launcher clean test -Demulator.model=S920 -Dlogic.number=790001291 -Ddriver.app=S920POS.exe -Drunner.type= -Demulator.initialization=false -Dcucumber.filter.tag=@TesteComunicacaoMaster -Dextent.reporter.klov.start=false -Dklov.project.name=Tst_comunicacao -Dklov.report.name=S920 -Dextent.reporter.html.config=src/test/resources/extent-config.xml -Dextent.reporter.klov.config=src/test/resources/klov.properties -Dextent.reporter.html.out=target/test-output/HtmlReport/ExtentHtml.html -e -X
java_class_path (initial): C:\apache-maven-3.6.0\bin\..\boot\plexus-classworlds-2.5.2.jar
Launcher Type: SUN_STANDARD

Environment Variables:
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_271
JRE_HOME=C:\Program Files\Java\jdk1.8.0_271\jre
PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\apache-maven-3.6.0\bin;C:\Program Files\Git\cmd;C:\Program Files\Java\jdk1.8.0_271\bin;C:\Program Files\Java\jdk1.8.0_271\jre\bin;C:\Users\fafezzi\AppData\Local\Microsoft\WindowsApps;"C:\Program Files\Java\jre1.8.0_271\bin"
USERNAME=fafezzi
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 62 Stepping 4, GenuineIntel



---------------  S Y S T E M  ---------------

OS: Windows 10.0 , 64 bit Build 14393 (10.0.14393.3630)

CPU:total 4 (initial active 4) (1 cores per cpu, 1 threads per core) family 6 model 62 stepping 4, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, aes, clmul, erms, tsc, tscinvbit

Memory: 4k page, physical 8191408k(3782304k free), swap 9502128k(5723824k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (25.271-b09) for windows-amd64 JRE (1.8.0_271-b09), built on Sep 16 2020 19:14:59 by "" with MS VC++ 15.9 (VS2017)

time: Wed Dec  2 15:26:51 2020
timezone: E. South America Standard Time
elapsed time: 14.765913 seconds (0d 0h 0m 14s)

主VM使用Maven来构建项目,并发送要运行的测试(从属计算机).我们必须使用Jacob dll将AutoITX与Junit命令集成.

The Master VM uses Maven to build the project and sends the tests to be run is the slave machines. We have to use the Jacob dll to integrate AutoITX with the Junit commands.

到目前为止,我们一直在检查不同的版本以及它们之间的集成:

So far we have been checking different versions and the integrations between:

  • jacob dll(1.14.3,并检查了安装和权限)
  • 行家(3.3.9/3.6.0/3.5.3)
  • surefire插件(尝试使用3.0.0-M4和2.22.0)
  • JDK和JRE(尝试1.8.0_271和1.11)
  • AutoITX(审阅的安装和权限)

我们在网络上找到有关此异常访问违例"的结果后,也尝试过更改OS语言.我们还要求虚拟化团队删除所有应用的强化策略,我们还运行Windows Update并添加了C redist库,以尝试纠正我们面临的DLL问题.我们还隔离了所有代码,以便仅使用一个命令(AutoIT使用jacob来自动执行任何操作,甚至鼠标移动即可使用该命令)仅包含一个文件,并且问题仍然存在.在我们的尝试之一中,我们运行了具有新安装的本地VM,并且完全没有jenkins,因此现在我们知道管道不是问题的原因

We also tried changing the OS language after finding some results in the web about this "exception acess violation". we also asked the virtualization teams to remove all of the hardening policies applied, we also had windows update runned and added C redist libraries in order to try to correct the DLL problem we are facing. we have also isolated ALL OF OUR CODE, in order to have only one file with only one command (the command where AutoIT uses jacob to automate anything, even a mouse movement) and the problem persists. In one of our attempts we have run a local VM with a new instalation and without jenkins at all, so that we now now that the pipeline is not the reason of the problem

ALSO :在团队本地计算机中,脚本运行没有问题,实例化了程序,Maven之间的通信> Java> Surefire>雅各布AutoITX> Windows应用程序工作正常.我们无法确定为什么相同的构建和过程无法在我们的管道(VM/Jenkins)中正常工作.

ALSO: In the team local machines, the scripts run without problems, the program is instantiated, the communication between Maven > Java > Surefire > Jacob > AutoITX > Windows Application works fine. We have not been able to identify why this same build and procedure fails to work inside our pipeline (VM/Jenkins).

我们有记录说该管道以前曾经工作过,但是我们不知道它为何停止工作.

We have records that this same pipeline worked before, but we dont have any clue why it has stopped working.

有什么见解或建议吗?

推荐答案

可能的解决方案

尝试将Java版本内部版本更改为1.8.0_141.

Possible Solution

Try changing your java version build to 1.8.0_141.

请注意, 141 在这里很重要.不同的版本内部版本号可能不兼容,并且会引发类似的错误.

Note that 141 is important here. Different version build numbers may not be compatible and throw similar errors.

您可以在 Java存档,然后搜索 Java SE开发工具包8u141

我们的团队通过使用Java代码调用jacob dll来发现了完全相同的问题. 在我们的情况下,"hs_pid_xxxx"内部的错误文件与上面的完全相同:

Our team found the exact same problem by calling jacob dll via java code. In our case the error inside the "hs_pid_xxxx" file was the exact same as above:

  • Variant_getVariantType + 0x51
  • 内存地址180012df1
  • EXCEPTION_ACCESS_VIOLATION

整个团队在网络上搜索了几个月,同时交换了Java版本,jacob版本,AutoitX版本,甚至考虑到Windows Server/Windows Home的不同版本的Windows版本.

The whole team searched the web for some months while exchanging java versions, jacob versions, AutoitX versions, even windows versions considering different builds for windows server/windows home.

在我们的尝试中,我们意识到该代码仅在本地公司的计算机上专门运行,因此无法在我们的任何VM甚至个人计算机中运行此特定的jacob调用.一段时间后,我们决定尝试使用在我们公司本地设置中安装的 SPECIFIC JAVA BUILD .通过特定的构建,我的意思是不仅使用相同的Java版本(Java 8/Java 11/Java 15),而且还使用相同的Java构建,例如Java SE Development Kit 8u 141 在此链接中,我们下载了说明为141的文件,但异常消失了 https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html 显然,jvm在较新的Java版本中将一个空指针提高到了jacob dll.

During our attempts we realized that the code was only specifically running on our local company machines, it was not possible to run this specific jacob call within any of our VMs or even our personal computers. After some time we decided to try to use the SPECIFIC JAVA BUILD wich was installed in our company local setups. By specific build I mean not only using the same java version ( Java 8/ Java 11/ Java 15 ) but also using the same java build like in Java SE Development Kit 8u141 in this link we downloaded the file that stated 141 and the exception was gone https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html Aparently the jvm was raising a nullpointer to the jacob dll in the newer java versions

无论如何...如果有人遇到该问题,我认为值得尝试

In any case... if anyone is experiencing that issue, I believe it is worth the try

这篇关于在Jenkins管道中使用VM的Jacob dll中的EXCEPTION_ACCESS_VIOLATION的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆