得到错误"无法编写核心转储"在编写多线程程序时

时间:2014-05-29 18:45:56

标签: java multithreading

我正在使用HTMLUnit编写一个webcrawler,为了加快速度,我已经多线程了。抓取工具接收一系列网页,并从每个网页中提取相同的文本。每个线程都有自己的文本文件,它会将这些提取的位写入其中。我已经设置好了,所以我可以让N个线程写入N个文件。当我将N设置为1时,我没有得到上面的错误,但是当我将其设置为其他任何内容时,我得到了下面粘贴的扩展错误。我怀疑是错误来自同时写入的请求,但我真的不确定。如果有人可以为处理这些错误消息提供一些指导,那将是很好的。都理解他们的意思,并解决问题。如果需要,我可以发布我的代码。提前谢谢。

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000678932f5, pid=6264, tid=3912
#
# JRE version: 7.0_07-b11
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.3-b01 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# V  [jvm.dll+0x732f5]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x000000000e033000):  JavaThread "2" [_thread_in_vm, id=3912,   \stack(0x000000000ef20000,0x000000000f020000)]

siginfo: ExceptionCode=0xc0000005, reading address 0x000000068000000c

Registers:
RAX=0x000000077ffffffd, RBX=0x0000000000002e95, RCX=0x000000000f01ce50, RDX=0xffffffff0000000f
RSP=0x000000000f01ce28, RBP=0x000000000f01ce60, RSI=0x0000000000000020, RDI=0x0000000000000000
R8 =0x000000007ffffffd, R9 =0x000000007ffffffd, R10=0x0000000000002e95, R11=0x000000077ffffffd
R12=0x0000000011ed7610, R13=0x0000000000000002, R14=0x000000078060ae80, R15=0x000000000e00d028
RIP=0x00000000678932f5, EFLAGS=0x0000000000010296

Top of Stack: (sp=0x000000000f01ce28)
0x000000000f01ce28:   0000000067905704 0000000000000002
0x000000000f01ce38:   00000000678c3339 000000000f01ce60
0x000000000f01ce48:   000000000e003dd0 000000077ffffffd
0x000000000f01ce58:   00000000000000aa 000000000e00cc50
0x000000000f01ce68:   000000000f01cf10 000000000e00cc40
0x000000000f01ce78:   0000000011ed7610 000000078060ae80
0x000000000f01ce88:   0000000780611698 000000000e003dd0
0x000000000f01ce98:   0000000067904f2c 000000000e003dd0
0x000000000f01cea8:   0000000001000000 000000000f01cf10
0x000000000f01ceb8:   0000000002000000 0000000000000002
0x000000000f01cec8:   000000000000a548 0000000000000003
0x000000000f01ced8:   000000000e00cc40 000000000e003dd0
0x000000000f01cee8:   0000000067905173 000000078060ae80
0x000000000f01cef8:   0000000000000328 000000000000a7e8
0x000000000f01cf08:   000000000000a4c0 000000000e00d068
0x000000000f01cf18:   00002eac00002e95 000000aa00005144 

Instructions: (pc=0x00000000678932f5)
0x00000000678932d5:   40 48 83 c4 20 5f e9 f0 ff 03 00 4c 63 01 41 8d
0x00000000678932e5:   44 90 10 48 63 d0 48 8b 01 48 83 e2 fc 49 2b d0
0x00000000678932f5:   8b 0c 02 0f b6 c1 89 4c 24 10 0f b6 4c 24 11 c1
0x0000000067893305:   e0 08 0b c1 0f b6 4c 24 12 c1 e0 08 0b c1 0f b6 


Register to memory mapping:

RAX=0x000000077ffffffd is an oop
{constMethod} 
 - klass: {other class}
 - method:       0x00000007800022b0 {method} 'getParamOrVarName' '(I)Ljava/lang/String;' in 'net/sourceforge/htmlunit/corejs/javascript/gen/http___www_phila_gov_water_swmap_client_lib_jquery_1_10_2_min_js_30104'
 - exceptions:   0x000000077ca01d50
bci_from(000000077FFFFFFD) = 11925; print_codes():
RBX=0x0000000000002e95 is an unknown value
RCX=0x000000000f01ce50 is pointing into the stack for thread: 0x000000000e033000
RDX=0xffffffff0000000f is an unknown value
RSP=0x000000000f01ce28 is pointing into the stack for thread: 0x000000000e033000
RBP=0x000000000f01ce60 is pointing into the stack for thread: 0x000000000e033000
RSI=0x0000000000000020 is an unknown value
RDI=0x0000000000000000 is an unknown value
R8 =0x000000007ffffffd is an unknown value
R9 =0x000000007ffffffd is an unknown value
R10=0x0000000000002e95 is an unknown value
R11=0x000000077ffffffd is an oop
{constMethod} 
 - klass: {other class}
 - method:       0x00000007800022b0 {method} 'getParamOrVarName' '(I)Ljava/lang/String;' in 'net/sourceforge/htmlunit/corejs/javascript/gen/http___www_phila_gov_water_swmap_client_lib_jquery_1_10_2_min_js_30104'
 - exceptions:   0x000000077ca01d50
bci_from(000000077FFFFFFD) = 11925; print_codes():
R12=0x0000000011ed7610 is an unknown value
R13=0x0000000000000002 is an unknown value
R14=

0 个答案:

没有答案