JDK-8026780 : Crash on PPC and PPC v2 for Java_awt test suit
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 8
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: ppc
  • Submitted: 2013-10-17
  • Updated: 2018-03-21
  • Resolved: 2013-10-22
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 8 Other
8 b115Fixed openjdk7uFixed
Related Reports
Relates :  
Description
During testing JDK8 b110 below tests failed with Crash SIGSEGV error.

Affected PPC and PPCv2 platforms.

In the log I see similar part:

Compiled method (c1)   15436   25             java.util.HashMap::get (23 bytes)
 total in heap  [0xf5563608,0xf5563928] = 800
 relocation     [0xf55636d4,0xf5563710] = 60
 main code      [0xf5563720,0xf5563840] = 288
 stub code      [0xf5563840,0xf556387c] = 60
 metadata       [0xf556387c,0xf5563890] = 20
 scopes data    [0xf5563890,0xf55638c8] = 56
 scopes pcs     [0xf55638c8,0xf5563918] = 80
 dependencies   [0xf5563918,0xf556391c] = 4
 nul chk table  [0xf556391c,0xf5563928] = 12

Affected tests:
RULE api/java_awt/Color/ICC_ColorSpace/index_ConstructorTesttestCase1 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ColorSpace/index_ConstructorTesttestCase2 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ColorSpace/index_FromTesttestCase1 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ColorSpace/index_FromTesttestCase2 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ColorSpace/index_FromTesttestCase3 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ColorSpace/index_FromTesttestCase4 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ColorSpace/index_FromTesttestCase5 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ColorSpace/index_FromTesttestCase6 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ColorSpace/index_GetTesttestCase4 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ColorSpace/index_ToTesttestCase1 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ColorSpace/index_ToTesttestCase2 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ColorSpace/index_ToTesttestCase3 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ColorSpace/index_ToTesttestCase4 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ColorSpace/index_ToTesttestCase5 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ColorSpace/index_ToTesttestCase6 Crash SIGSEGV
RULE api/java_awt/Color/ICC_Profile/index_GetTesttestCase11 Crash SIGSEGV
RULE api/java_awt/Color/ICC_Profile/index_GetTesttestCase2 Crash SIGSEGV
RULE api/java_awt/Color/ICC_Profile/index_GetTesttestCase3 Crash SIGSEGV
RULE api/java_awt/Color/ICC_Profile/index_GetTesttestCase5 Crash SIGSEGV
RULE api/java_awt/Color/ICC_Profile/index_GetTesttestCase6 Crash SIGSEGV
RULE api/java_awt/Color/ICC_Profile/index_GetTesttestCase7 Crash SIGSEGV
RULE api/java_awt/Color/ICC_Profile/index_GetTesttestCase9 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileGray/index_GetTesttestCase11 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileGray/index_GetTesttestCase13 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileGray/index_GetTesttestCase15 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileGray/index_GetTesttestCase17 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileGray/index_GetTesttestCase2 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileGray/index_GetTesttestCase3 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileGray/index_GetTesttestCase4 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileGray/index_GetTesttestCase6 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileGray/index_GetTesttestCase7 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileGray/index_GetTesttestCase8 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileGray/index_GetTesttestCase9 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileGray/index_SetDataTesttestCase1 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileRGB/index_GetTesttestCase1 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileRGB/index_GetTesttestCase10 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileRGB/index_GetTesttestCase11 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileRGB/index_GetTesttestCase12 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileRGB/index_GetTesttestCase13 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileRGB/index_GetTesttestCase14 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileRGB/index_GetTesttestCase15 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileRGB/index_GetTesttestCase17 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileRGB/index_GetTesttestCase2 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileRGB/index_GetTesttestCase21 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileRGB/index_GetTesttestCase3 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileRGB/index_GetTesttestCase4 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileRGB/index_GetTesttestCase6 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileRGB/index_GetTesttestCase7 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileRGB/index_GetTesttestCase8 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileRGB/index_GetTesttestCase9 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileRGB/index_SetDataTesttestCase1 Crash SIGSEGV
RULE api/java_awt/Color/ICC_ProfileRGB/index_SetDataTesttestCase2 Crash SIGSEGV
RULE api/java_awt/Color/index_ConstructorTesttestCase1 Crash SIGSEGV
RULE api/java_awt/Color/index_GetColorComponentsTesttestCase1 Crash SIGSEGV
RULE api/java_awt/Color/index_GetColorComponentsTesttestCase3 Crash SIGSEGV
RULE api/java_awt/Color/index_GetComponentsTesttestCase1 Crash SIGSEGV
RULE api/java_awt/Color/index_GetComponentsTesttestCase5 Crash SIGSEGV
RULE api/java_awt/Color/index_GetTesttestCase10 Crash SIGSEGV
RULE api/java_awt/Color/index_ctor4 Crash SIGSEGV
RULE api/java_awt/Color/index_getColorComponents Crash SIGSEGV
RULE api/java_awt/Color/index_getColorSpace Crash SIGSEGV
RULE api/java_awt/Color/index_getComponents Crash SIGSEGV
RULE api/java_awt/Image/ColorConvertOp/index_ConstructorTesttestCase5 Crash SIGSEGV
RULE api/java_awt/Image/ColorConvertOp/index_CreateCompatibleDestImageTesttestCase2 Crash SIGSEGV
RULE api/java_awt/Image/ColorConvertOp/index_CreateCompatibleDestImageTesttestCase3 Crash SIGSEGV
RULE api/java_awt/Image/ColorConvertOp/index_CreateCompatibleDestRasterTesttestCase1 Crash SIGSEGV
RULE api/java_awt/Image/ColorConvertOp/index_CreateCompatibleDestRasterTesttestCase2 Crash SIGSEGV
RULE api/java_awt/Image/ColorConvertOp/index_CreateCompatibleDestRasterTesttestCase3 Crash SIGSEGV
RULE api/java_awt/Image/ColorConvertOp/index_FilterTesttestCase2 Crash SIGSEGV
RULE api/java_awt/Image/ColorConvertOp/index_FilterTesttestCase4 Crash SIGSEGV
RULE api/java_awt/Image/ColorConvertOp/index_FilterTesttestCase5 Crash SIGSEGV
RULE api/java_awt/Image/ColorConvertOp/index_FilterTesttestCase6 Crash SIGSEGV
RULE api/java_awt/Image/ColorConvertOp/index_FilterTesttestCase7 Crash SIGSEGV
RULE api/java_awt/Image/ColorConvertOp/index_FilterTesttestCase8 Crash SIGSEGV
RULE api/java_awt/Image/ColorConvertOp/index_GetBounds2DTesttestCase1 Crash SIGSEGV
RULE api/java_awt/Image/ColorConvertOp/index_GetBounds2DTesttestCase3 Crash SIGSEGV
Comments
Internal review (because cr.openjdk.java.net is down): https://sthinfra10.se.oracle.com/cru/CR-JDK82D-37
21-10-2013

tck-red is for any bugs that affect JCK on any of the supported platforms, including Embedded which is part of the JDK releases since 8.
21-10-2013

This cannot be tck-red because there is no JDK 8 for PPC. I am removing tck-red. Please discuss with me if you have justification for this.
21-10-2013

Suggested fix.
21-10-2013

More attention needs to be paid to build logs. We see the following aliaising related warnings: > grep aliasing b111/linux-ppc-e500v2-ea/build.log /export/users/dh198349/tl/jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c:622:3: warning: dereferencing type-punned pointer will break strict-aliasing rules /export/users/dh198349/tl/jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c:695:9: warning: dereferencing type-punned pointer will break strict-aliasing rules /export/users/dh198349/tl/jdk/src/share/native/sun/java2d/cmm/lcms/cmsplugin.c:206:9: warning: dereferencing type-punned pointer will break strict-aliasing rules /export/users/dh198349/tl/jdk/src/share/native/sun/java2d/cmm/lcms/cmsplugin.c:335:5: warning: dereferencing type-punned pointer will break strict-aliasing rules /export/users/dh198349/tl/jdk/src/share/demo/jvmti/hprof/hprof_check.c:960:17: warning: dereferencing type-punned pointer will break strict-aliasing rules /export/users/dh198349/tl/jdk/src/share/demo/jvmti/hprof/hprof_io.c:818:9: warning: dereferencing type-punned pointer will break strict-aliasing rules /export/users/dh198349/tl/jdk/src/share/demo/jvmti/hprof/hprof_listener.c:269:17: warning: dereferencing type-punned pointer will break strict-aliasing rules /export/users/dh198349/tl/jdk/src/share/demo/jvmti/hprof/hprof_listener.c:299:17: warning: dereferencing type-punned pointer will break strict-aliasing rules /export/users/dh198349/tl/jdk/src/share/demo/jvmti/hprof/hprof_check.c:960:17: warning: dereferencing type-punned pointer will break strict-aliasing rules /export/users/dh198349/tl/jdk/src/share/demo/jvmti/hprof/hprof_io.c:818:9: warning: dereferencing type-punned pointer will break strict-aliasing rules /export/users/dh198349/tl/jdk/src/share/demo/jvmti/hprof/hprof_listener.c:269:17: warning: dereferencing type-punned pointer will break strict-aliasing rules /export/users/dh198349/tl/jdk/src/share/demo/jvmti/hprof/hprof_listener.c:299:17: warning: dereferencing type-punned pointer will break strict-aliasing rules
21-10-2013

Phil, could you please evaluate this bug?
19-10-2013

The issue is caused by a stricter gcc aliasing optimization with PowerPC gcc 4.5.2 (C99 spec) in LCMS native library (in particular in Java_sun_java2d_cmm_lcms_LCMS_loadProfileNative()). e.g. below is a simple example: #include <stdio.h> #include <stdlib.h> typedef struct lcmsProfile_s { void *pf; } lcmsProfile_t, *lcmsProfile_p; typedef union storeID_s { lcmsProfile_t * record; int x; long long j; } storeID_t, *storeID_p; int main(int argc, char** argv) { long long l = atol(argv[1]); storeID_t store; // store.j = l; store.record = (lcmsProfile_p)malloc(4); if(store.record) { store.record->pf = (void*)atoi(argv[2]); } return (int)store.j; } the store operation (store.record->pf =) is not executed. Similar scenario occurs in the LCMS code and causes a NULL pointer being eventually passed to a memmove() - the reason for the crash. Will reassign the bug to core-libs: LCMS code should not be relying on aliasing when different types of pointers are being used. Perhaps the union needs to declare a long* member and utilize that for aliasing.
18-10-2013

Reproducibility - 100% Also reproduced with jre 8 b112.
17-10-2013