This discussion is archived
3 Replies Latest reply: May 23, 2012 8:40 PM by EJP RSS

Realtime program quits by itself.

858586 Newbie
Currently Being Moderated
i have written a realtime program that does some processing from the traffic taken from a sniffer (JNetPCap).

the program will then put the relevant stuff into an Access Database. this DB is not accessed via network and is only used by this program.

the program works like how it is supposed to, but has the tendency to quit whenever it feels like it (every few hours or so).

anyway, the *.log that's generated says the following:
Current thread (0x01a78000):  JavaThread "Finalizer" daemon [_thread_in_native, id=6616, stack(0x03cb0000,0x03d00000)]

siginfo: ExceptionCode=0xc0000005, writing address 0x00000008

Registers:
EAX=0x00000008, EBX=0x00000001, ECX=0x00000004, EDX=0x08b3c4d0
ESP=0x03cff7c8, EBP=0x03cff7dc, ESI=0x00000008, EDI=0x00000004
EIP=0x770a7732, EFLAGS=0x00010202

Top of Stack: (sp=0x03cff7c8)
0x03cff7c8:   15a43d8c 00000000 13e3fa94 13e3fa68
0x03cff7d8:   00000001 03cff7ec 679470a5 00000004
0x03cff7e8:   15a43d60 03cff80c 67949615 15a43d8c
0x03cff7f8:   00000000 00000001 15a43d60 00000000
0x03cff808:   00000000 03cff830 6799a278 15a43d60
0x03cff818:   00000001 00000010 131b0e20 01a78128
0x03cff828:   00000000 ffffffff 03cff848 6d3651d8
0x03cff838:   15a43d60 00000001 01a78000 15a43d60 

Instructions: (pc=0x770a7732)
0x770a7712:   33 c0 5e 5d c2 04 00 90 90 90 90 90 90 90 8b ff
0x770a7722:   55 8b ec 83 ec 0c 56 57 8b 7d 08 8d 77 04 8b c6
0x770a7732:   f0 0f ba 30 00 0f 83 fb e2 00 00 64 a1 18 00 00
0x770a7742:   00 8b 48 24 89 4f 0c c7 47 08 01 00 00 00 5f 33 


Register to memory mapping:

EAX=0x00000008 is an unknown value
EBX=0x00000001 is an unknown value
ECX=0x00000004 is an unknown value
EDX=0x08b3c4d0 is an unknown value
ESP=0x03cff7c8 is pointing into the stack for thread: 0x01a78000
EBP=0x03cff7dc is pointing into the stack for thread: 0x01a78000
ESI=0x00000008 is an unknown value
EDI=0x00000004 is an unknown value


Stack: [0x03cb0000,0x03d00000],  sp=0x03cff7c8,  free space=317k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [ntdll.dll+0x47732]  RtlEnterCriticalSection+0x12
C  [ODBC32.dll+0x270a5]  Ordinal298+0x270a5
C  [ODBC32.dll+0x29615]  SQLDriverConnect+0x63e
C  [ODBC32.dll+0x7a278]  SQLFreeStmt+0x62
C  [JdbcOdbc.dll+0x51d8]  Java_sun_jdbc_odbc_JdbcOdbc_freeStmt+0x23
J  sun.jdbc.odbc.JdbcOdbc.freeStmt(JI[B)V
J  sun.jdbc.odbc.JdbcOdbc.SQLFreeStmt(JI)V
V  [jvm.dll+0xfad4b]
V  [jvm.dll+0x18c421]
V  [jvm.dll+0xfadcd]
V  [jvm.dll+0x95a41]
V  [jvm.dll+0x98809]
C  [java.dll+0x2100]  Java_java_lang_ref_Finalizer_invokeFinalizeMethod+0x39
J  java.lang.ref.Finalizer.runFinalizer()V
V  [jvm.dll+0xfad4b]
V  [jvm.dll+0x18c421]
V  [jvm.dll+0xfaef1]
V  [jvm.dll+0xfaf4b]
V  [jvm.dll+0xb55c9]
V  [jvm.dll+0x1190a4]
V  [jvm.dll+0x14106c]
C  [msvcr71.dll+0x9565]  endthreadex+0xa0
C  [kernel32.dll+0x4ed6c]  BaseThreadInitThunk+0x12
C  [ntdll.dll+0x6377b]  RtlInitializeExceptionChain+0xef
C  [ntdll.dll+0x6374e]  RtlInitializeExceptionChain+0xc2

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J  sun.jdbc.odbc.JdbcOdbc.freeStmt(JI[B)V
J  sun.jdbc.odbc.JdbcOdbc.SQLFreeStmt(JI)V
J  sun.jdbc.odbc.JdbcOdbcStatement.close()V
J  sun.jdbc.odbc.JdbcOdbcStatement.finalize()V
v  ~StubRoutines::call_stub
J  java.lang.ref.Finalizer.invokeFinalizeMethod(Ljava/lang/Object;)V
J  java.lang.ref.Finalizer.runFinalizer()V
J  java.lang.ref.Finalizer$FinalizerThread.run()V
v  ~StubRoutines::call_stub
i'd like to know how to prevent the thing from quitting by itself.

also, please note that all Connections to the DB are new connections, and are not shared.

why does the SQL thing cause the program to quit every now and then?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points