简体   繁体   English

EXCEPTION_ACCESS_VIOLATION Tomcat 9 外 JVM

[英]EXCEPTION_ACCESS_VIOLATION Tomcat 9 outside JVM

I'm writing a messaging app as my final project for 12 grade and I have an error that I have no idea how to even approach.我正在编写一个消息应用程序作为我 12 年级的期末项目,但我有一个错误,我什至不知道如何处理。 I disabled and re-enabled features of the web app one by one to see when the error occurs, and I observed that when I try to bring the active conversations that one user has, my server crashes.我一一禁用和重新启用 web 应用程序的功能以查看错误发生的时间,并且我观察到当我尝试将一个用户的活动对话带入时,我的服务器崩溃了。 This doesn't happen constantly, it seems like random occurrences.这不会经常发生,似乎是随机发生的。 Here is the error message by the server:这是服务器的错误消息:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000007034537d, pid=13536, tid=9944
#
# JRE version: Java(TM) SE Runtime Environment 18.9 (11.0.10+8) (build 11.0.10+8-LTS-162)
# Java VM: Java HotSpot(TM) 64-Bit Server VM 18.9 (11.0.10+8-LTS-162, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
SELECT * FROM conversations WHERE id1 = '1' OR id2 = '1' ORDER BY lastUpdate DESC LIMIT 9 OFFSET 0;# 
CSELECT * FROM accounts WHERE id = 16;
  [sqlite-3.30.1-03ac4057-b812-49a1-9a10-f02ba1c22986-sqlitejdbc.dll+0x537d]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\paRa\AppData\Local\Temp\\hs_err_pid13536.log
#
# If you would like to submit a bug report, please visit:
#   https://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.
#

From what I saw on other posts, this error message should point where the error is located, in my case if I go to the specific lines where those SQL queries are executed, I have no error.从我在其他帖子上看到的内容来看,此错误消息应该指出错误所在的位置,在我的情况下,如果我 go 到执行这些 SQL 查询的特定行,我没有错误。

What it should be noted is that when I put a break point in the API of the activeConversations function, the server never crashes, so I was thinking that it had something to do with how much information is being handled.需要注意的是,当我在activeConversations function 的 API 中设置断点时,服务器永远不会崩溃,所以我认为它与正在处理的信息量有关。 However, there isn't much information transferred at the moment since I don't have that much information in the database.但是,由于我在数据库中没有那么多信息,所以目前没有太多信息传输。

The most likely explanation (outside of a bug in sqlite) is that the JVM is running the webserver with a lot of threads but the sqlite configuration is using single threaded mode and thus causing memory corruption.最可能的解释(除了 sqlite 中的错误)是 JVM 正在运行具有大量线程的网络服务器,但 sqlite 配置使用单线程模式,因此导致 ZCD69B4957F06CD818D7ZBF3D619 损坏。

Check that you are starting/configuring the sqlite with at least multi threaded mode.检查您是否正在使用至少多线程模式启动/配置 sqlite。

https://sqlite.org/threadsafe.html https://sqlite.org/threadsafe.html

Ok, so I want to mention that @AlBlue message was really helpful in resolving my problem.好的,所以我想提一下@AlBlue 消息对解决我的问题非常有帮助。 As he said my database (SQLite) was handling multiple requests at the same time, and so it crashed.正如他所说,我的数据库(SQLite)同时处理多个请求,所以它崩溃了。 Since I did not know how to configure sqlite to multi threading, I used a deffered object in jquery to make a function run after another. Since I did not know how to configure sqlite to multi threading, I used a deffered object in jquery to make a function run after another. You can see what i used by clicking on this link: Jquery Deffered Function (site is not seccured btw, so be carefull, I will also post the code down below in the case some of you do not want to access the site:您可以通过单击此链接查看我使用的内容: Jquery 延迟 Function (顺便说一句,站点不安全,所以要小心,我也会在下面发布代码,以防你们中的一些人不想访问该站点:

var functionOne = function() {

    var r = $.Deferred();

    // Do your whiz bang jQuery stuff here
    console.log('Function One');

    return r;

};

var functionTwo = function() {

    // Do your whiz bang jQuery stuff here
    console.log('Function Two');

};

// Now call the functions one after the other using the done method
functionOne().done( functionTwo() );

Again thank you to everyone for the answers.再次感谢大家的回答。 I am recent to this platform and I do not how this procedure works, Since my answer is a solution to my problem, and not to the error itself?我是这个平台的新人,我不知道这个程序是如何工作的,因为我的答案是解决我的问题,而不是解决错误本身? then I should give the correct answer to @AlBlue correct.那么我应该给@AlBlue正确的正确答案。 I'll update the answer once somebody comments.一旦有人发表评论,我会更新答案。 I want to give propper credit!我想给予适当的信任!

Edit: I read the tooltip of the button =))编辑:我阅读了按钮的工具提示 =))

An access violation means that native code (in this case inside SQLite) is trying to access memory it is not allowed to access, this usually indicates a bug in that native library (or in another native component it is depending on).访问冲突意味着本机代码(在本例中为 SQLite 内部)正在尝试访问不允许访问的memory ,这通常表明该本机库(或它所依赖的另一个本机组件)中存在错误。 It is unlikely - though not impossible - the problem is in your own code.不太可能 - 尽管并非不可能 - 问题出在您自己的代码中。

As a first step, try to see if using a newer version of SQLite solves the problem.作为第一步,尝试查看使用更新版本的 SQLite 是否可以解决问题。 If that doesn't solve it, try to reduce the code necessary to reproduce the problem and report it either to the authors or SQLite or the SQLite JDBC driver you're using.如果这不能解决问题,请尝试减少重现问题所需的代码并将其报告给作者或 SQLite 或 SQLite JDBC 驱动程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM