RE: SASS Compiler and IBM SDK

thumbnail
Pete Helgren, modified 6 Years ago. Regular Member Posts: 225 Join Date: 4/7/11 Recent Posts
Because of licensing changes, I have switched my JDK to OpenJ9.  SASS compiling in my portlet projects is now failing and I discovered a reference to this problem here: https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-0/compiling-sass-files-in-a-maven-project  It says:

Note: Liferay’s CSS Builder is supported for Oracle’s JDK and uses a native compiler for increased speed. If you’re using an IBM JDK, you may experience issues when building your SASS files (e.g., when building a theme). It’s recommended to switch to using the Oracle JDK, but if you prefer using the IBM JDK, you must use the fallback Ruby compiler. To do this, add the following tag to your CSS Builder configuration in your POM:<sassCompilerClassName>ruby<sasscompilerClassName>
Be aware that the Ruby-based compiler doesn’t perform as well as the native compiler, so expect longer compile times.

So, this is not a Maven project and I am not building a theme (I can find no pom.xml files in the project).  So, the question is: &#034;How do I fix this if I am using the OpenJ9 JDK?
Stack trace as follows:
Working Directory: E:\Workspaces\LR70\ServiceDashboard
Gradle User Home: C:\Users\Pete.BSF_INT\.gradle
Gradle Distribution: Gradle wrapper from target build
Gradle Version: 3.0
Java Home: C:\Program Files\Java\ibm_sdk80
JVM Arguments: -Xcheck:jni
Program Arguments: None
Build Scans Enabled: false
Offline Mode Enabled: false
Gradle Tasks: build:compileJava UP-TO-DATE
:buildCSS
Using native Sass compiler
Unhandled exception
Type=Segmentation error vmState=0x00040000
Windows_ExceptionCode=c0000005 J9Generic_Signal=00000004 ExceptionAddress=00007FFCB89B9E09 ContextFlags=0010005f
Handler1=00007FFCB89B0240 Handler2=00007FFCD26FC5B0 InaccessibleReadAddress=0000000000000010
RDI=0000000002C19A00 RSI=0000000002C19A00 RAX=0000000000000000 RBX=00000000128F77A8
RCX=0000000002C19A00 RDX=000000001167B028 R8=0000000000000000 R9=00007FFCB8ABAB90
R10=0000000000000001 R11=0000000000000020 R12=000000001167B028 R13=000000001167B060
R14=00000000000000B2 R15=0000000000000001
RIP=00007FFCB89B9E09 RSP=00000000029BE990 RBP=000000001167B038 GS=002B
FS=0053 ES=002B DS=002B
XMM0 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM1 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM2 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM3 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM4 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM5 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM6 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM7 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM8 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM9 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM10 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM11 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM12 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM13 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM14 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM15 0000000000000000 (f: 0.000000, d: 0.000000e+000)
Module=C:\Program Files\Java\ibm_sdk80\jre\bin\compressedrefs\j9vm29.dll
Module_base_address=00007FFCB8980000 Offset_in_DLL=0000000000039e09
Target=2_90_20171102_369060 (Windows 10 10.0 build 17763)
CPU=amd64 (8 logical CPUs) (0x3f8732000 RAM)
----------- Stack Backtrace -----------
getBooleanField+0x19 (jnifield.cpp:231, 0x00007FFCB89B9E09 [j9vm29+0x39e09])
Java_org_bridj_JNI_bindJavaMethodsToCFunctions+0x255 (0x00007FFCB85F68E5 [bridj+0x68e5])
ffi_prep_cif+0x183 (0x00007FFCD6894633 [FFI29+0x4633])
ffi_call+0x8e (0x00007FFCD6893BAE [FFI29+0x3bae])
_ZN22VM_BytecodeInterpreter3runEP10J9VMThread+0xebfa (0x00007FFCB8A5EB4A [j9vm29+0xdeb4a])
(0x00000000029BEEC0)
(0x00000000116C8E5emoticon
(0x0000000002C19A00)
(0x0000000002CE6C30)
(0x00000000029BED70)
(0x00000000000000B2)
_ZN4Sass6Colors9aliceblueE+0x3ea0 (0x00000000638CF000 [liferaysass+0x24f000])
(0x0000000063680000 [liferaysass+0x0])
(0x0000000000000001)
(0x00000000029BEC20)
_ZN4Sass6Colors9aliceblueE+0x8058 (0x00000000638D31B8 [liferaysass+0x2531b8])
(0x0000000002EDF700)
(0x00000000FFEDA7B8)
(0x00000000FFED80B0)
(0x00000000000000B2)
_filbuf+0x231 (0x000000005696D501 [MSVCR100+0x2d501])
Java_org_bridj_JNI_freeJavaToCCallbacks+0xef (0x00007FFCB85F668F [bridj+0x668f])
(0x00000000029BEC70)
(0x0000000002C19A00)
(0x0000000011461C35)
(0x0000000000000001)
(0x7FFFFFFF00000000)
(0x000000000F564D90)
(0x000000001096ED78)
(0x000000000F564D90)
(0x0000000002CE6C30)
MM_TLHAllocationInterface::allocateObject+0x216 (tlhallocationinterface.cpp:191, 0x00007FFC83B84956 [j9gc29+0x114956])
---------------------------------------
JVMDUMP039I Processing dump event "gpf", detail "" at 2019/06/03 09:11:47 - please wait.
JVMDUMP032I JVM requested System dump using 'E:\Workspaces\LR70\ServiceDashboard\core.20190603.091147.2356.0001.dmp' in response to an event
JVMDUMP010I System dump written to E:\Workspaces\LR70\ServiceDashboard\core.20190603.091147.2356.0001.dmp
JVMDUMP032I JVM requested Java dump using 'E:\Workspaces\LR70\ServiceDashboard\javacore.20190603.091147.2356.0002.txt' in response to an event
JVMDUMP010I Java dump written to E:\Workspaces\LR70\ServiceDashboard\javacore.20190603.091147.2356.0002.txt
JVMDUMP032I JVM requested Snap dump using 'E:\Workspaces\LR70\ServiceDashboard\Snap.20190603.091147.2356.0003.trc' in response to an event
JVMDUMP010I Snap dump written to E:\Workspaces\LR70\ServiceDashboard\Snap.20190603.091147.2356.0003.trc
JVMDUMP007I JVM Requesting JIT dump using 'E:\Workspaces\LR70\ServiceDashboard\jitdump.20190603.091147.2356.0004.dmp'
JVMDUMP010I JIT dump written to E:\Workspaces\LR70\ServiceDashboard\jitdump.20190603.091147.2356.0004.dmp
JVMDUMP013I Processed dump event "gpf", detail "".
:buildCSS FAILEDFAILURE: Build failed with an exception.* What went wrong:
Execution failed for task ':buildCSS'.
> Process 'command 'C:\Program Files\Java\ibm_sdk80\bin\java.exe'' finished with non-zero exit value -1* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.BUILD FAILEDTotal time: 8.24 secs

Again, I realize that this is a known issue.  I don't know if the Liferay team is working on a permanent fix although the IBM JDK is recommended as an alternative to the Oracle JDK here:  https://community.liferay.com/blogs/-/blogs/liferay-jdk-compatibility-roadmap    How do I switch the SASS compiler to use the ruby alternative in this case?  Please point me to the file/path where the change needs to be made (if any).  As a follow up, will there be a more permanent fix to non-Oracle JDK's in the future?
thumbnail
David H Nebinger, modified 6 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
Does openj9 really install to C:\Program Files\Java\ibm_sdk80, or are you actually using ibm's java 8 environ?
thumbnail
Pete Helgren, modified 6 Years ago. Regular Member Posts: 225 Join Date: 4/7/11 Recent Posts
Used both with the same result.  You are correct the above is the actual IBM J9.  My Open J9 lives at C:\Program Files\AdoptOpenJDK\jdk-8.0.212.04-openj9   I didn't want to post about my Open J9 issues because the LR compatibility matrix doesn't say it is compatible with Open J9 even though it is pretty much the same JDK.  I originally switched to Open J9 to get out from underneath the Oracle licensing requirements but ran into issues (above) so switched to the IBM J9 JDK thinking it was supported by Liferay.   I should change that opening sentence to say "I have switched my JDK to IBM J9 SDK"