启动2个线程时JVM会中断
任务A和任务B 各有15个URL 进行巡检(检查网页是否由违法行为)。单独执行“任务A”可以执行完毕。如果任务A和任务B都启动JVM就会中断。求大侠解答~
//线程类
public class Runtask extends Thread{
@Override
public void run() {
for(;i<urllist.size();i++)
//调用巡检方法。
}
}
}
同时启动2个任务时报错:
#
# An unexpected error has been detected by Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x10007a81, pid=5572, tid=3052
#
# Java VM: Java HotSpot(TM) Client VM (10.0-b19 mixed mode windows-x86)
# Problematic frame:
# C [ICTCLAS2011.dll+0x7a81]
#
# An error report file with more information is saved as:
# E:\apache-tomcat-5.5.26\bin\hs_err_pid5572.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
hs_err_pid4232.log 内容如下:
#
# An unexpected error has been detected by Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x1000807c, pid=4232, tid=1060
#
# Java VM: Java HotSpot(TM) Client VM (10.0-b19 mixed mode windows-x86)
# Problematic frame:
# C [ICTCLAS2011.dll+0x807c]
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
--------------- T H R E A D ---------------
Current thread (0x0b114c00): JavaThread "Thread-33" daemon [_thread_in_native, id=1060, stack(0x0c850000,0x0c8a0000)]
siginfo: ExceptionCode=0xc0000005, writing address 0x0cbbd018
Registers:
EAX=0x0cbbcfe0, EBX=0x0000273e, ECX=0xffffffff, EDX=0x0cbbcfe0
ESP=0x0c89cfe0, EBP=0x0cb06f10, ESI=0x0000273f, EDI=0x0000c9e4
EIP=0x1000807c, EFLAGS=0x00010202
Top of Stack: (sp=0x0c89cfe0)
0x0c89cfe0: 0c89e044 0cb06f10 0c89f8f4 00000000
0x0c89cff0: 0cbbcfe0 0000000b 0000000e 00000000
0x0c89d000: 0cbbcfa0 0000273c 0009cf80 0000273e
0x0c89d010: 645f656e 00677572 00000000 00000000
0x0c89d020: 00000000 00000000 00000000 00000000
0x0c89d030: 00000000 00000000 00000000 00000000
0x0c89d040: 00000000 00000000 00000000 00000000
0x0c89d050: 00000000 00000000 00000000 00000000
Instructions: (pc=0x1000807c)
0x1000806c: 20 83 40 04 01 8b 54 24 10 89 4a 08 8b 44 24 10
0x1000807c: 89 48 38 eb 55 8b 4c 24 14 83 c1 01 3b 4c 24 18
Stack: [0x0c850000,0x0c8a0000], sp=0x0c89cfe0, free space=307k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [ICTCLAS2011.dll+0x807c]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::StubRoutines (1)
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x0b116800 JavaThread "Keep-Alive-Timer" daemon [_thread_blocked, id=4348, stack(0x0c8f0000,0x0c940000)]
0x0b1df800 JavaThread "Thread-34" daemon [_thread_in_native, id=4612, stack(0x0c8a0000,0x0c8f0000)]
=>0x0b114c00 JavaThread "Thread-33" daemon [_thread_in_native, id=1060, stack(0x0c850000,0x0c8a0000)]
0x0b71b000 JavaThread "TP-Monitor" daemon [_thread_blocked, id=5076, stack(0x0c800000,0x0c850000)]
0x0b2d7000 JavaThread "TP-Processor4" daemon [_thread_in_native, id=5056, stack(0x0c7b0000,0x0c800000)]
0x0b2d6400 JavaThread "TP-Processor3" daemon [_thread_blocked, id=5116, stack(0x0c760000,0x0c7b0000)]
0x0b4b3400 JavaThread "TP-Processor2" daemon [_thread_blocked, id=4272, stack(0x0c710000,0x0c760000)]
0x0b704400 JavaThread "TP-Processor1" daemon [_thread_blocked, id=5048, stack(0x0c6c0000,0x0c710000)]
0x0b490c00 JavaThread "http-8080-Monitor" [_thread_blocked, id=616, stack(0x0c670000,0x0c6c0000)]
0x0b44c400 JavaThread "http-8080-Processor25" daemon [_thread_in_native, id=4976, stack(0x0c620000,0x0c670000)]
0x0b44b800 JavaThread "http-8080-Processor24" daemon [_thread_in_native, id=5164, stack(0x0c5d0000,0x0c620000)]
0x0b21a400 JavaThread "http-8080-Processor23" daemon [_thread_blocked, id=4380, stack(0x0c580000,0x0c5d0000)]
0x0b219c00 JavaThread "http-8080-Processor22" daemon [_thread_blocked, id=5196, stack(0x0c530000,0x0c580000)]
0x0b476800 JavaThread "http-8080-Processor21" daemon [_thread_blocked, id=3380, stack(0x0c4e0000,0x0c530000)]
0x0b445000 JavaThread "http-8080-Processor20" daemon [_thread_blocked, id=1108, stack(0x0c490000,0x0c4e0000)]
0x0b495c00 JavaThread "http-8080-Processor19" daemon [_thread_blocked, id=4608, stack(0x0c440000,0x0c490000)]
0x0b2dd800 JavaThread "http-8080-Processor18" daemon [_thread_blocked, id=3584, stack(0x0c3f0000,0x0c440000)]
0x0b718800 JavaThread "http-8080-Processor17" daemon [_thread_blocked, id=728, stack(0x0c3a0000,0x0c3f0000)]
0x0b4a0400 JavaThread "http-8080-Processor16" daemon [_thread_blocked, id=1308, stack(0x0c350000,0x0c3a0000)]
0x0b49e800 JavaThread "http-8080-Processor15" daemon [_thread_blocked, id=4588, stack(0x0c300000,0x0c350000)]
0x0b529400 JavaThread "http-8080-Processor14" daemon [_thread_blocked, id=4528, stack(0x0c2b0000,0x0c300000)]
0x0b5b0400 JavaThread "http-8080-Processor13" daemon [_thread_blocked, id=4524, stack(0x0c260000,0x0c2b0000)]
0x0b443000 JavaThread "http-8080-Processor12" daemon [_thread_blocked, id=5156, stack(0x0c210000,0x0c260000)]
0x0b51f400 JavaThread "http-8080-Processor11" daemon [_thread_blocked, id=5028, stack(0x0c1c0000,0x0c210000)]
0x0b569800 JavaThread "http-8080-Processor10" daemon [_thread_blocked, id=1184, stack(0x0c170000,0x0c1c0000)]
0x0b587400 JavaThread "http-8080-Processor9" daemon [_thread_blocked, id=4548, stack(0x0c120000,0x0c170000)]
0x0b55b400 JavaThread "http-8080-Processor8" daemon [_thread_blocked, id=4644, stack(0x0c0d0000,0x0c120000)]
0x0b4a1800 JavaThread "http-8080-Processor7" daemon [_thread_blocked, id=3348, stack(0x0c080000,0x0c0d0000)]
0x0b642400 JavaThread "http-8080-Processor6" daemon [_thread_blocked, id=2500, stack(0x0c030000,0x0c080000)]
0x0b5bf800 JavaThread "http-8080-Processor5" daemon [_thread_blocked, id=3224, stack(0x0bfe0000,0x0c030000)]
0x0b447800 JavaThread "http-8080-Processor4" daemon [_thread_blocked, id=3796, stack(0x0bf90000,0x0bfe0000)]
0x0b681400 JavaThread "http-8080-Processor3" daemon [_thread_blocked, id=704, stack(0x0bf40000,0x0bf90000)]
0x0b538400 JavaThread "http-8080-Processor2" daemon [_thread_blocked, id=4920, stack(0x0bef0000,0x0bf40000)]
0x0b3f4400 JavaThread "http-8080-Processor1" daemon [_thread_blocked, id=3344, stack(0x0bea0000,0x0bef0000)]
0x0b475400 JavaThread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon [_thread_blocked, id=2660, stack(0x0be50000,0x0bea0000)]
0x0b6e5400 JavaThread "Store org.hibernate.cache.StandardQueryCache Spool Thread" daemon [_thread_blocked, id=4980, stack(0x0be00000,0x0be50000)]
0x0b51b400 JavaThread "Store org.hibernate.cache.UpdateTimestampsCache Spool Thread" daemon [_thread_blocked, id=6092, stack(0x0bdb0000,0x0be00000)]
0x0ab26000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3552, stack(0x0aef0000,0x0af40000)]
0x0ab10000 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5640, stack(0x0aea0000,0x0aef0000)]
0x0ab0e800 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=1140, stack(0x0ae50000,0x0aea0000)]
0x0ab0d000 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=4176, stack(0x0ae00000,0x0ae50000)]
0x0ab0b000 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=4452, stack(0x0adb0000,0x0ae00000)]
0x0aafa800 JavaThread "Attach Listener" daemon [_thread_blocked, id=2064, stack(0x0acb0000,0x0ad00000)]
0x0ab11c00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4908, stack(0x0ac60000,0x0acb0000)]
0x0aae9c00 JavaThread "Finalizer" daemon [_thread_blocked, id=1820, stack(0x0ac10000,0x0ac60000)]
0x0aae5400 JavaThread "Reference Handler" daemon [_thread_blocked, id=5328, stack(0x0abc0000,0x0ac10000)]
0x003f6400 JavaThread "main" [_thread_in_native, id=4864, stack(0x008d0000,0x00920000)]
Other Threads:
0x0aae2400 VMThread [stack: 0x0ab70000,0x0abc0000] [id=1368]
0x0ab28400 WatcherThread [stack: 0x0af40000,0x0af90000] [id=4996]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 1600K, used 844K [0x029d0000, 0x02b80000, 0x02eb0000)
eden space 1472K, 52% used [0x029d0000, 0x02a91df8, 0x02b40000)
from space 128K, 53% used [0x02b40000, 0x02b51460, 0x02b60000)
to space 128K, 0% used [0x02b60000, 0x02b60000, 0x02b80000)
tenured generation total 20584K, used 13290K [0x02eb0000, 0x042ca000, 0x069d0000)
the space 20584K, 64% used [0x02eb0000, 0x03baa9b8, 0x03baaa00, 0x042ca000)
compacting perm gen total 26368K, used 26301K [0x069d0000, 0x08390000, 0x0a9d0000)
the space 26368K, 99% used [0x069d0000, 0x0837f410, 0x0837f600, 0x08390000)
No shared spaces configured.
--------------------编程问答--------------------
Dynamic libraries:
0x00400000 - 0x00423000 D:\Program Files\Java\jdk1.6.0_05\bin\javaw.exe
0x7c920000 - 0x7c9b6000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c91e000 C:\WINDOWS\system32\kernel32.dll
0x77da0000 - 0x77e49000 C:\WINDOWS\system32\ADVAPI32.dll
0x77e50000 - 0x77ee3000 C:\WINDOWS\system32\RPCRT4.dll
0x77fc0000 - 0x77fd1000 C:\WINDOWS\system32\Secur32.dll
0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll
0x77ef0000 - 0x77f39000 C:\WINDOWS\system32\GDI32.dll
0x76300000 - 0x7631d000 C:\WINDOWS\system32\IMM32.DLL
0x62c20000 - 0x62c29000 C:\WINDOWS\system32\LPK.DLL
0x73fa0000 - 0x7400b000 C:\WINDOWS\system32\USP10.dll
0x7c340000 - 0x7c396000 D:\Program Files\Java\jdk1.6.0_05\jre\bin\msvcr71.dll
0x6d870000 - 0x6dac0000 D:\Program Files\Java\jdk1.6.0_05\jre\bin\client\jvm.dll
0x76b10000 - 0x76b3a000 C:\WINDOWS\system32\WINMM.dll
0x6d320000 - 0x6d328000 D:\Program Files\Java\jdk1.6.0_05\jre\bin\hpi.dll
0x76bc0000 - 0x76bcb000 C:\WINDOWS\system32\PSAPI.DLL
0x6d410000 - 0x6d439000 D:\Program Files\Java\jdk1.6.0_05\jre\bin\jdwp.dll
0x6d770000 - 0x6d776000 D:\Program Files\Java\jdk1.6.0_05\jre\bin\npt.dll
0x6d820000 - 0x6d82c000 D:\Program Files\Java\jdk1.6.0_05\jre\bin\verify.dll
0x6d3c0000 - 0x6d3df000 D:\Program Files\Java\jdk1.6.0_05\jre\bin\java.dll
0x6d860000 - 0x6d86f000 D:\Program Files\Java\jdk1.6.0_05\jre\bin\zip.dll
0x6d290000 - 0x6d297000 D:\Program Files\Java\jdk1.6.0_05\jre\bin\dt_socket.dll
0x71a20000 - 0x71a37000 C:\WINDOWS\system32\WS2_32.dll
0x77be0000 - 0x77c38000 C:\WINDOWS\system32\msvcrt.dll
0x71a10000 - 0x71a18000 C:\WINDOWS\system32\WS2HELP.dll
0x719c0000 - 0x719fe000 C:\WINDOWS\System32\mswsock.dll
0x76ef0000 - 0x76f17000 C:\WINDOWS\system32\DNSAPI.dll
0x76d30000 - 0x76d48000 C:\WINDOWS\system32\iphlpapi.dll
0x76f80000 - 0x76f88000 C:\WINDOWS\System32\winrnr.dll
0x76f30000 - 0x76f5c000 C:\WINDOWS\system32\WLDAP32.dll
0x76f90000 - 0x76f96000 C:\WINDOWS\system32\rasadhlp.dll
0x60fd0000 - 0x61025000 C:\WINDOWS\system32\hnetcfg.dll
0x71a00000 - 0x71a08000 C:\WINDOWS\System32\wshtcpip.dll
0x6d620000 - 0x6d633000 D:\Program Files\Java\jdk1.6.0_05\jre\bin\net.dll
0x58a00000 - 0x58a07000 C:\WINDOWS\System32\wship6.dll
0x68000000 - 0x68036000 C:\WINDOWS\system32\rsaenh.dll
0x759d0000 - 0x75a7f000 C:\WINDOWS\system32\USERENV.dll
0x5fdd0000 - 0x5fe25000 C:\WINDOWS\system32\netapi32.dll
0x10000000 - 0x10048000 D:\Program Files\Java\jdk1.6.0_05\bin\ICTCLAS2011.dll
0x0c950000 - 0x0c96b000 E:\apache-tomcat-5.5.26\bin\License.dll
0x77f40000 - 0x77fb6000 C:\WINDOWS\system32\SHLWAPI.dll
0x61880000 - 0x618ba000 C:\WINDOWS\system32\OLEACC.dll
0x76990000 - 0x76ace000 C:\WINDOWS\system32\ole32.dll
0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV
0x770f0000 - 0x7717b000 C:\WINDOWS\system32\OLEAUT32.dll
VM Arguments:
jvm_args: -Dcatalina.home=E:\apache-tomcat-5.5.26 -Dcatalina.base=E:\apache-tomcat-5.5.26 -Djava.endorsed.dirs=E:\apache-tomcat-5.5.26/common/endorsed -Djava.io.tmpdir=E:\apache-tomcat-5.5.26\temp -Djava.library.path=D:\Program Files\Java\jdk1.6.0_05\bin;E:\apache-tomcat-5.5.26\bin -Dsun.io.useCanonCaches=false -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:10786
java_command: org.apache.catalina.startup.Bootstrap start
Launcher Type: SUN_STANDARD
Environment Variables:
JAVA_HOME=D:\Program Files\Java\jdk1.6.0_05
CLASSPATH=.;D:\Program Files\Java\jdk1.6.0_05\jre\lib\rt.jar;D:\Program Files\Java\jdk1.6.0_05\jre\lib\dt.jar;D:\Program Files\Java\jdk1.6.0_05\jre\lib\tools.jar
PATH=D:\Program Files\Java\jdk1.6.0_05\jre\bin;C:\Program Files\NVIDIA Corporation\PhysX\Common;D:\Program Files\Java\jdk1.6.0_05/bin;E:\apache-maven-2.2.1\bin;D:\oracle\product\10.2.0\db_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs;C:\Program Files\TortoiseSVN\bin;C:\strawberry\c\bin;C:\strawberry\perl\bin
USERNAME=Administrator
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 11, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 3
CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 15 stepping 11, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3
Memory: 4k page, physical 2097151k(1356516k free), swap 4194303k(2585908k free)
vm_info: Java HotSpot(TM) Client VM (10.0-b19) for windows-x86 JRE (1.6.0_05-b13), built on Feb 22 2008 01:16:53 by "java_re" with MS VC++ 7.1
time: Mon Jun 11 15:58:43 2012
elapsed time: 33 seconds
--------------------编程问答-------------------- 你可以分段进行啊,比如A巡检0-8,B巡检9-15
补充:Java , Java EE