Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task :run FAILED (rc 134) on Fedora 35, KDE, x11 #10

Open
bogdandragoiu opened this issue Apr 18, 2022 · 10 comments
Open

Task :run FAILED (rc 134) on Fedora 35, KDE, x11 #10

bogdandragoiu opened this issue Apr 18, 2022 · 10 comments

Comments

@bogdandragoiu
Copy link

Hello,

First off, the daemon works really well! Thank you for making it!

I am experiencing a similar issue to #9, I tried installing similarly to how you did in the comment but no success.

  • The communication to the daemon seems to run, but then OpenJDK seems to crash.
  • I tried installing and reinstalling the dependencies with no success (see screenshot).
  • Disabling SElinux also did not help.
  • In hs_err_pid* I also get a few java/lang/NoSuchMethodError which I'm not sure are the cause of OpenJDK crashing.

I've attached the latest error message, a screenshot and hs_err_pid* log.

Starting a Gradle Daemon (subsequent builds will be faster)

> Configure project :
Project : => no module-info.java found

> Task :run
Apr 18, 2022 12:48:04 PM tornadofx.Stylesheet$Companion detectAndInstallUrlHandler
INFO: Installing CSS url handler, since it was not picked up automatically
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007faf2df96e24, pid=8534, tid=8565
#
# JRE version: OpenJDK Runtime Environment 18.9 (11.0.14.1+1) (build 11.0.14.1+1)
# Java VM: OpenJDK 64-Bit Server VM 18.9 (11.0.14.1+1, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  [libc.so.6+0x90e24]  pthread_mutex_lock+0x4
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /home/bogdan/userspace_tablet_driver/userspace-tablet-driver-gui/core.8534)
#
# An error report file with more information is saved as:
# /home/bogdan/userspace_tablet_driver/userspace-tablet-driver-gui/hs_err_pid8534.log
#
# If you would like to submit a bug report, please visit:
#   https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=java-11-openjdk&version=35
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

> Task :run FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':run'.
> Process 'command '/usr/lib/jvm/java-11-openjdk-11.0.14.1.1-5.fc35.x86_64/bin/java'' finished with non-zero exit value 134

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 10s
3 actionable tasks: 2 executed, 1 up-to-date

Screenshot_20220418_121617
hs_err_pid8534.log

@bogdandragoiu
Copy link
Author

I also just tried using the older versions of JDK which worked in your VM and same effect:

wget https://kojipkgs.fedoraproject.org//packages/java-11-openjdk/11.0.14.0.9/2.fc35/x86_64/java-11-openjdk-11.0.14.0.9-2.fc35.x86_64.rpm
wget https://kojipkgs.fedoraproject.org//packages/java-11-openjdk/11.0.14.0.9/2.fc35/x86_64/java-11-openjdk-headless-11.0.14.0.9-2.fc35.x86_64.rpm

sudo dnf install ./java-11-openjdk-11.0.14.0.9-2.fc35.x86_64.rpm java-11-openjdk-headless-11.0.14.0.9-2.fc35.x86_64.rpm
> Task :run
Apr 18, 2022 1:44:34 PM tornadofx.Stylesheet$Companion detectAndInstallUrlHandler
INFO: Installing CSS url handler, since it was not picked up automatically
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f99a20c6e24, pid=7055, tid=7084
#
# JRE version: OpenJDK Runtime Environment 18.9 (11.0.14+9) (build 11.0.14+9)
# Java VM: OpenJDK 64-Bit Server VM 18.9 (11.0.14+9, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  [libc.so.6+0x90e24]  pthread_mutex_lock+0x4
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /home/bogdan/tablet/userspace-tablet-driver-gui/core.7055)
#
# An error report file with more information is saved as:
# /home/bogdan/tablet/userspace-tablet-driver-gui/hs_err_pid7055.log
#
# If you would like to submit a bug report, please visit:
#   https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=java-11-openjdk&version=35
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

> Task :run FAILED

hs_err_pid7055.log

@bogdandragoiu
Copy link
Author

I did some further testing in a VM and found that Fedora KDE spin is affected with either the newest or specific java-11-openjdk issue you tested in #9.
Fedora with Gnome and wayland does work.

Screenshot_20220418_162242
Screenshot_20220418_162825
Screenshot_20220418_170440

@kurikaesu
Copy link
Owner

Thanks for the report!

With the KDE spin VM you ran did you try rebooting after installation before running?
I have seen the exact same terminal corruption happen before but it only happens when trying to run the driver immediately after installation. A reboot appears to fix the issue.

Let me know if rebooting also fixes it for you.

@bogdandragoiu
Copy link
Author

I tried it with no success. I think my KVM setup might be weird or the USB attachment is not working since I can see the same device in both guest and host. I'll try to see if I can reproduce with VirtualBox the way you did and report back.

I didn't think much about the corruption since it showed up when I interacted with the tablet. My suspicion is more something in openjdk or libraries that get called by it is crashing before the GUI is drawn and somehow it works in default Fedora with Gnome, but not the KDE spin.
My initial suspicion was on my system having open glibc with 32 and 64bit and a default Fedora install only has the 64bit, but I couldn't prove that. I did compare versions of those libraries between the Fedora flavors and they seem identical though.

@kurikaesu
Copy link
Owner

Sorry for the late reply, I am currently in between housing and don't have a proper setup to test/debug. I'll have to try on my end with Fedora and KDE spin to see if I can work out why it doesn't run.

@bogdandragoiu
Copy link
Author

Still have not found the issue. I've upgrade to Fedora 36 since, but the issue persist. Same with a secondary physical machine.
Have tried multiple java-11-openjdk RPMs and also tried one I downloaded outside of the repos and same issue.
I'll keep digging.

@bogdandragoiu
Copy link
Author

Tested some more and found that on a working Fedora 36 with Gnome it works. I added KDE via sudo dnf groupinstall "KDE Plasma Workspaces" then rebooted an logging in with KDE reproduces the error. Logging back to Gnome and the GUI works again.

@bogdandragoiu
Copy link
Author

bogdandragoiu commented May 15, 2022

I think I found the culprit. Just messing around I commented out the following:

class UserlandUtility : App(UserlandUtilityView::class){
    override fun onBeforeShow(view: UIComponent) {
        try {
            // GlobalScreen.registerNativeHook()
        } catch (ex: NativeHookException) {
            println("Could not initiate global hook")
        }
    }

And the GUI showed up! But shortcuts can't be set which makes sense considering what com.github.kwhat.jnativehook is for.

Screenshot_20220515_235030

@kurikaesu
Copy link
Owner

Thanks for digging into this. I'll have a look at the native hook library and see if they have changed things up in the latest versions or if the latest version is not compatible with that version of Gnome.

Will have to wait until I finish getting set up here at my new place which should be after this Wednesday the 18th.

@kurikaesu
Copy link
Owner

kurikaesu commented Jun 9, 2022

I've dug into this more on my side and can confirm that on a fresh install of the KDE spin version of Fedora, the GUI will not launch correctly, crashing because of jnativehook.

The version of Fedora that I had installed is 36.

This version of Fedora installs OpenJDK 17 by default and that seems to have issues with jnativehook even though jnativehook says it supports 17.

Installing openjdk-11 by doing a:
sudo yum install java-11-openjdk

Then switching the default JDK the system uses to 11 instead of 17 by doing:
sudo alternatives --config java and picking number 2 (for me since number 2 was version 11

Running ./gradlew run succeeds correctly with no crashes and the GUI is able to communicate with the daemon fine.

At some point we may need to dig into why jnativehook crashes on JDK 17 but that may be something to raise an issue on the jnativehook repo instead of here.

Hope that helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants