Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Weird JVM crash on long running process - Possible JVM bug

We have built an application using JavaFX for Mac and had distributed it to client. But after somedays the client started reporting a weird behavior: The application quits out of no where. We tried replicating the issue but couldn't.

Yesterday night, I left the application on overnight and today in the morning, I could replicate it. The JVM crashed and I have the report for it. What I do not get is, it is extremely improbably to have such an error for a pure Java application. Can someone please help with it. There is no JNI or anything, a pure JavaFX application. Necessary Information:

Process:         MyApp [929]
Path:            /Applications/MyApp.app/Contents/MacOS/MyApp
Identifier:      unknown.com.bl.Main
Version:         1.0.0 (100)
Code Type:       X86-64 (Native)
Parent Process:  launchd [370]
User ID:         501

Date/Time:       2013-06-27 10:25:49.696 +0530
OS Version:      Mac OS X 10.8.2 (12C2034)
Report Version:  10
Sleep/Wake UUID: 6C566ED4-4A34-469E-BB90-4B9579C8C938

Interval Since Last Report:          1185921 sec
Crashes Since Last Report:           385
Per-App Interval Since Last Report:  19053 sec
Per-App Crashes Since Last Report:   1
Anonymous UUID:                      EE300CF5-752F-5C81-B166-6CFB0DC9FA0A

Crashed Thread:  26  CVDisplayLink

Exception Type:  EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000270

VM Regions Near 0x270:
-->
    __TEXT                 0000000106b59000-0000000106b5c000 [   12K] r-x/rwx SM=COW  /Applications/Pina.app/Contents/MacOS/Pina

Application Specific Information:
abort() called

Thread 26 Crashed:: CVDisplayLink
0   libsystem_kernel.dylib         0x00007fff92cf4212 __pthread_kill + 10
1   libsystem_c.dylib              0x00007fff90be1af4 pthread_kill + 90
2   libsystem_c.dylib              0x00007fff90c25dce abort + 143
3   libjvm.dylib                   0x0000000107072cff os::abort(bool) + 25
4   libjvm.dylib                   0x0000000107184ed9 VMError::report_and_die() + 2391
5   libjvm.dylib                   0x000000010707458f JVM_handle_bsd_signal + 1073
6   libsystem_c.dylib              0x00007fff90bce8ea _sigtramp + 26
7   libjvm.dylib                   0x00000001070c1fd8 SafepointSynchronize::block(JavaThread*) + 32
8   libjvm.dylib                   0x00000001071420c3 JavaThread::check_safepoint_and_suspend_for_native_trans(JavaThread*) + 193
9   libjvm.dylib                   0x0000000106dd75b3 ThreadStateTransition::trans_from_native(JavaThreadState) + 119
10  libjvm.dylib                   0x0000000106f31330 jni_CallVoidMethod + 139
11  libglass.dylib                 0x0000000160a368ae CVOutputCallback + 158
12  com.apple.CoreVideo            0x00007fff8ee4a03d CVDisplayLink::performIO(CVTimeStamp*) + 203
13  com.apple.CoreVideo            0x00007fff8ee492a4 CVDisplayLink::runIOThread() + 632
14  com.apple.CoreVideo            0x00007fff8ee49013 startIOThread(void*) + 148
15  libsystem_c.dylib              0x00007fff90be0742 _pthread_start + 327
16  libsystem_c.dylib              0x00007fff90bcd181 thread_start + 13

Thread 26 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x0000000000000006  rcx: 0x0000000168a92a68  rdx: 0x0000000000000000
  rdi: 0x000000000000f063  rsi: 0x0000000000000006  rbp: 0x0000000168a92a90  rsp: 0x0000000168a92a68
   r8: 0x00007fff7ac75278   r9: 0x0000000168a92a40  r10: 0x0000000020000000  r11: 0x0000000000000206
  r12: 0x000000010746ffb0  r13: 0x00007fff8ee49dc6  r14: 0x0000000168a94000  r15: 0x000000010707655a
  rip: 0x00007fff92cf4212  rfl: 0x0000000000000206  cr2: 0x00007fff7ac6efe8

VM Region Summary:
ReadOnly portion of Libraries: Total=216.8M resident=137.1M(63%) swapped_out_or_unallocated=79.7M(37%)
Writable regions: Total=1.5G written=89.2M(6%) resident=169.3M(11%) swapped_out=0K(0%) unallocated=1.4G(89%)

REGION TYPE                      VIRTUAL
===========                      =======
(null) (reserved)                   1.2G        reserved VM address space (unallocated)
CG backing stores                  4620K
CG image                            380K
CG raster data                      116K
CG shared images                    192K
CoreAnimation                         8K
CoreImage                             8K
CoreServices                       2020K
IOKit                              33.7M
MALLOC                            117.9M
MALLOC guard page                    48K
MALLOC_LARGE (reserved)            10.6M        reserved VM address space (unallocated)
Memory tag=240                        4K
Memory tag=242                       12K
Memory tag=243                       12K
Memory tag=251                       20K
OpenCL                               52K
OpenGL GLSL                        1024K
STACK GUARD                        56.1M
Stack                              31.7M
VM_ALLOCATE                       128.5M
__DATA                             18.5M
__IMAGE                             528K
__LINKEDIT                         58.4M
__TEXT                            158.5M
__UNICODE                           544K
mapped file                        45.6M
shared memory                      31.4M
===========                      =======
TOTAL                               1.9G
TOTAL, minus reserved VM space    689.7M

Model: MacBookPro10,2, BootROM MBP102.0106.B01, 2 processors, Intel Core i5, 2.5 GHz, 8 GB, SMC 2.6f57
Graphics: Intel HD Graphics 4000, Intel HD Graphics 4000, Built-In, 768 MB
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80AD, 0x484D5434314753364D465238432D50422020
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80AD, 0x484D5434314753364D465238432D50422020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x10F), Broadcom BCM43xx 1.0 (5.106.98.100.14)
Bluetooth: Version 4.1.2f9 11046, 2 service, 18 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SM128E, 121.33 GB
USB Device: hub_device, 0x8087  (Intel Corporation), 0x0024, 0x1a100000 / 2
USB Device: FaceTime HD Camera (Built-in), apple_vendor_id, 0x8510, 0x1a110000 / 3
USB Device: hub_device, 0x8087  (Intel Corporation), 0x0024, 0x1d100000 / 2
USB Device: hub_device, 0x0424  (SMSC), 0x2512, 0x1d180000 / 3
USB Device: BRCM20702 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0x1d181000 / 5
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x828c, 0x1d181300 / 7
USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x025a, 0x1d182000 / 4
USB Device: USB Receiver, 0x046d  (Logitech Inc.), 0xc52f, 0x14100000 / 3
Logical CPU: 0

Please do let me know if any other information is needed.

If you wish to have the complete log file, I can provide it.

like image 811
Jatin Avatar asked Jun 27 '13 06:06

Jatin


People also ask

What causes JVM to crash?

The most common reason is that the application finished running or was halted normally. Other reasons might be Java application errors, exceptions that cannot be handled, and irrecoverable Java errors like OutOfMemoryError .

How do I stop JVM from crashing?

Reduce the Java heap size. The Java heap is only a certain part of the total memory used by the JVM. If the Java heap is significantly larger, JVM can run out of virtual memory while compiling methods or when native libraries are loaded. Try lowering the maximum heap size to avoid this error.

Where are JVM crash logs?

JVM crash log files are named hs_err_pid*. log, with the process id of the JVM that crashed, and are placed in the Micro-Manager folder.


1 Answers

Your application is receiving a signal as apparent from the stack trace: JVM_handle_bsd_signal

I don't know which signal it is, but you could try to install signal handlers to find out: http://www.oracle.com/technetwork/java/javase/signals-139944.html#gbzbl

Some common things that come to mind are:

    • does the app set up some ulimits ?
  • does anything else crash, suggesting hardware errors?
  • have you tried using another jvm release - a patch or two away might be a different behavior
like image 73
handyprogrammer Avatar answered Nov 05 '22 11:11

handyprogrammer