JDK-8146238 : [macosx] Java2D Queue Flusher crash on OSX after switching between user accounts
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 7u91,8u66,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • Submitted: 2015-12-28
  • Updated: 2022-06-27
  • Resolved: 2019-08-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 14 JDK 8 Other
11.0.6-oracleFixed 13.0.4Fixed 14 b16Fixed 8u221Fixed openjdk8u232Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Description
IntelliJ IDEA 15 crashes after switching between different user accounts and maximise/minimise actions. 

Crashed Thread: 26 Java: Java2D Queue Flusher
Exception Type: EXC_BAD_ACCESS (SIGABRT) 
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000002 
Exception Note: EXC_CORPSE_NOTIFY
Thread 26 Crashed:: Java: Java2D Queue Flusher 
0 libsystem_kernel.dylib 0x00007fff84504002 __pthread_kill + 10 
1 libsystem_pthread.dylib 0x00007fff955195c5 pthread_kill + 90 
2 libsystem_c.dylib 0x00007fff9528e6e7 abort + 129 
3 libjvm.dylib 0x0000000105d53253 os::abort(bool) + 25 
4 libjvm.dylib 0x0000000105e70574 VMError::report_and_die() + 2250 
5 libjvm.dylib 0x0000000105d54eaa JVM_handle_bsd_signal + 1131 
6 libjvm.dylib 0x0000000105d5115b signalHandler(int, __siginfo*, void*) + 47 
7 libsystem_platform.dylib 0x00007fff9302aeaa _sigtramp + 26 
8 com.apple.GeForceGLDriver 0x00007fff8f56d3a6 0x7fff8f271000 + 3130278 
9 libawt_lwawt.dylib 0x000000011c5a0286 Java_sun_java2d_opengl_OGLRenderQueue_flushBuffer + 1594 
10 ??? 0x0000000107819bea 0 + 4420901866 
11 ??? 0x0000000107b2c23c 0 + 4424122940 
12 ??? 0x00000001064ca4e7 0 + 4400653543 
13 libjvm.dylib 0x0000000105be4c0a JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*) + 1710 
14 libjvm.dylib 0x0000000105be5398 JavaCalls::call_virtual(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*) + 356 
15 libjvm.dylib 0x0000000105be5544 JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle, Symbol*, Symbol*, Thread*) + 74 
16 libjvm.dylib 0x0000000105c1b52a thread_entry(JavaThread*, Thread*) + 124 
17 libjvm.dylib 0x0000000105e2bb15 JavaThread::thread_main_inner() + 155 
18 libjvm.dylib 0x0000000105e2d1c2 JavaThread::run() + 448 
19 libjvm.dylib 0x0000000105d53aa2 java_start(Thread*) + 246 
20 libsystem_pthread.dylib 0x00007fff95517c13 _pthread_body + 131 
21 libsystem_pthread.dylib 0x00007fff95517b90 _pthread_start + 168 
22 libsystem_pthread.dylib 0x00007fff95515375 thread_start + 13 
I am getting a “page not found”.
Here are the specific details:
Model: MacBookPro10,1, BootROM MBP101.00EE.B0A, 4 processors, Intel Core i7, 2.7 GHz, 16 GB, SMC 2.3f36 
Graphics: Intel HD Graphics 4000, Intel HD Graphics 4000, Built-In 
Graphics: NVIDIA GeForce GT 650M, NVIDIA GeForce GT 650M, PCIe, 1024 MB 
Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D5434314753364D465238432D50422020 
Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D5434314753364D465238432D50422020 
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xEF), Broadcom BCM43xx 1.0 (7.21.94.136.1a1) 
Bluetooth: Version 4.4.3f4 16616, 3 services, 27 devices, 1 incoming serial ports 
Network Service: Display Ethernet, Ethernet, en3 
Network Service: Wi-Fi, AirPort, en0 
PCI Card: Apple 57761-B0, Ethernet Controller, Thunderbolt@191,0,0 
PCI Card: pci11c1,5901, IEEE 1394 Open HCI, Thunderbolt@190,0,0 
PCI Card: pci12d8,400e, USB Open Host Controller, Thunderbolt@196,0,0 
PCI Card: pci12d8,400e, USB Open Host Controller, Thunderbolt@196,0,1 
PCI Card: pci12d8,400f, USB Enhanced Host Controller, Thunderbolt@196,0,2 
Serial ATA Device: APPLE SSD SM512E, 500.28 GB 
USB Device: USB 2.0 Bus 
USB Device: Hub 
USB Device: FaceTime HD Camera (Built-in) 
USB Device: USB 2.0 Bus 
USB Device: Hub 
USB Device: Hub 
USB Device: Apple Internal Keyboard / Trackpad 
USB Device: BRCM20702 Hub 
USB Device: Bluetooth USB Host Controller 
USB Device: USB 2.0 Bus 
USB Device: Hub 
USB Device: Keyboard Hub 
USB Device: Apple Keyboard 
USB Device: FaceTime HD Camera (Display) 
USB Device: Apple Thunderbolt Display 
USB Device: Apple Optical USB Mouse 
USB Device: Display Audio 
USB Device: USB 3.0 Bus 
Thunderbolt Bus: MacBook Pro, Apple Inc., 23.4 
Thunderbolt Device: Thunderbolt Display, Apple Inc., 1, 26.2
Here are the core details:
Crashed Thread: 27 Java: Java2D Queue Flusher
Exception Type: EXC_CRASH (SIGABRT) 
Exception Codes: 0x0000000000000000, 0x0000000000000000 
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information: 
abort() called 
*** error for object 0x168bb5a20: pointer being freed was not allocated
Thread 27 Crashed:: Java: Java2D Queue Flusher 
0 libsystem_kernel.dylib 0x00007fff84504002 __pthread_kill + 10 
1 libsystem_pthread.dylib 0x00007fff955195c5 pthread_kill + 90 
2 libsystem_c.dylib 0x00007fff9528e6e7 abort + 129 
3 libsystem_malloc.dylib 0x00007fff8b3cd070 free + 425 
4 libawt_lwawt.dylib 0x000000011cc8531e Java_sun_java2d_opengl_OGLRenderQueue_flushBuffer + 1746 
5 ??? 0x00000001072495aa 0 + 4414805418 
6 ??? 0x0000000107f258f0 0 + 4428290288

Comments
Fix request (13u) Requesting backport to 13u for parity with 11u, applies cleanly.
27-05-2020

Fix request 8u and 11u. Patch applies cleanly to 11u. For 8u, here is the review thread: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2019-October/010472.html
18-10-2019

URL: https://hg.openjdk.java.net/jdk/jdk/rev/07556f8cd819 User: psadhukhan Date: 2019-09-25 09:20:40 +0000
25-09-2019

URL: https://hg.openjdk.java.net/jdk/client/rev/07556f8cd819 User: serb Date: 2019-08-27 15:59:21 +0000
27-08-2019

To reproduce the issue you need to have couple accounts on your mac. Just run heavy swing app (in our case it's IDEA) then minimise it and login to another account then switch back and maximise the app. Performing this steps several times causes jdk to crash. Also, here is the fix of this problem that I'm going to send for review (to be integrated into openjdk9) http://cr.openjdk.java.net/~avu/JDK-8146238/webrev.00/
29-12-2015

Alexey, can you please describe the steps to reproduce and the problem in the code in more details? Thanks.
29-12-2015

The problem is that disposed native surface data for deallocation required native graphics configuration data that might have already been deallocated because the order of handling disposed weak references is not specified. To fix this we need to provide ref counting for graphics configuration native data.
28-12-2015