Bug 257206 - java/eclipse crashes with SIGSEGV after displaying splash screen on powerpc
Summary: java/eclipse crashes with SIGSEGV after displaying splash screen on powerpc
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: powerpc Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
Keywords: crash, needs-qa
Depends on:
Reported: 2021-07-15 13:59 UTC by Curtis Hamilton
Modified: 2021-07-22 17:21 UTC (History)
3 users (show)

See Also:
koobs: maintainer-feedback? (jonc)
koobs: maintainer-feedback? (pkubaj)

Full java crash log (84.29 KB, text/plain)
2021-07-15 13:59 UTC, Curtis Hamilton
no flags Details
Powerpc64 big endian work-around (487 bytes, patch)
2021-07-22 17:21 UTC, Curtis Hamilton
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis Hamilton 2021-07-15 13:59:35 UTC
Created attachment 226484 [details]
Full  java crash log

Using: FreeBSD 13.0-STABLE #5 on PowerPC64

Port builds without error.  However, when run eclipse crashes with SIGSEGV after displaying splash screen, just before loading graphical environment.  Seems to have issues with libswt-pi3-gtk-4934r6.so. 

Note: Build and runs fine on FreeBSD 12.1 powerpc64 and 13.0-STABLE on powerpc64le.

Java crash log attached.
Comment 1 Jonathan Chen 2021-07-15 18:58:15 UTC
Unfortunately, I don't have a powerpc rig to work thru' or test the port. The bug may have been introduce with PR 254149
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-16 01:33:38 UTC
^Triage: Leave maintainer-feedback open until final resolution, request feedback committer that landed bug 254149
Comment 3 Curtis Hamilton 2021-07-22 17:21:09 UTC
Created attachment 226620 [details]
Powerpc64 big endian work-around

I've discovered the issue.  The architecture has been hard coded in the SWT internals for "ppc64le" as the "os.arch" in the following files:

eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java
eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java

Changing "ppc64le" to "ppc64" (or powerpc64) resolves the SIGSEGV issue on big endian but breaks little endian.

The value of os.arch is set in "./production/testScripts/configuration/sdk.tests/testScripts/test.xml" and it may be possible to change this file to support both big endian and little endian.  I'm still researching and testing.

In the interim, the attached patch is a work-around until a more elegant fix can be provided.