BiglySoftware / BiglyBT

Feature-filled Bittorrent client based on the Azureus open source project
https://www.biglybt.com
GNU General Public License v2.0
1.52k stars 153 forks source link

BiglyBT hangs on shutdown or update and spins at max cpu #2790

Closed csylvain closed 5 months ago

csylvain commented 1 year ago

OS: Ubuntu 22.04.1 biglybt version number: presently 3.2.0.1_B10 (manually updated from B09 due to issue - copied new BiglyBT.jar over old) desktop: ubuntu standard (gnome?)

ever since "GUI error" message on start up has appeared, shutdown goes through all of the GUI termination but many java threads remain. one of the threads shows max CPU use via 'htop' and using the sigkill feature is the only way to actually terminate biglybt completely. in all other respects, biglybt appears to be fully functional.

this has been going on at least since the 3.2 beta series. it may be related to the "hangs network on shutdown" issue. automatic beta updating is affected negatively, as well. no version update occurs, although the new jar file is waiting in /tmp

Help -> About BiglyBT -> System info:

Java 17.0.5 (64 bit)
  Private Build
/usr/lib/jvm/java-17-openjdk-amd64

SWT v4956r12, gtk/3.24.33, zoom=100, dpi=96
Linux v5.15.0-52-generic, amd64 (64 bit)
B3.2.0.1_B10/4 az3

GUI error message in detail:

java.lang.IllegalArgumentException: Argument not valid
    at org.eclipse.swt.SWT.error(SWT.java:4899)
    at org.eclipse.swt.SWT.error(SWT.java:4833)
    at org.eclipse.swt.SWT.error(SWT.java:4804)
    at org.eclipse.swt.graphics.GC.drawImage(GC.java:849)
    at com.biglybt.ui.swt.widgets.TagPainter.paintControl(TagPainter.java:310)
    at com.biglybt.ui.swt.widgets.TagCanvas.paintControl(TagCanvas.java:261)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5810)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1529)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1555)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1538)
    at org.eclipse.swt.widgets.Control.gtk_draw(Control.java:3891)
    at org.eclipse.swt.widgets.Scrollable.gtk_draw(Scrollable.java:365)
    at org.eclipse.swt.widgets.Composite.gtk_draw(Composite.java:496)
    at org.eclipse.swt.widgets.Canvas.gtk_draw(Canvas.java:174)
    at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2482)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:6834)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:6118)
    at org.eclipse.swt.internal.gtk3.GTK3.gtk_main_do_event(Native Method)
    at org.eclipse.swt.widgets.Display.eventProc(Display.java:1552)
    at org.eclipse.swt.internal.gtk3.GTK3.gtk_main_iteration_do(Native Method)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4469)
    at com.biglybt.ui.swt.mainwindow.SWTThread.<init>(SWTThread.java:438)
    at com.biglybt.ui.swt.mainwindow.SWTThread.createInstance(SWTThread.java:58)
    at com.biglybt.ui.swt.Initializer.<init>(Initializer.java:181)
    at com.biglybt.ui.swt.UI.takeMainThread(UI.java:162)
    at com.biglybt.ui.Main.main(Main.java:247)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at com.biglybt.launcher.Launcher$1.run(Launcher.java:48)
    at java.base/java.lang.Thread.run(Thread.java:833)
parg commented 1 year ago

Not sure that exception is relevant - probably more likely to be related to the SWT library update I recently pushed to beta users.

I'll have a play and see if I can reproduce it.

In the meantime you might be able to attach to the looping JVM with jconsole

or dump threads via https://github.com/BiglySoftware/BiglyBT/wiki/Diagnostics

parg commented 1 year ago

I've managed to reproduce it, just looking into how to fix

parg commented 1 year ago

Try beta B12

csylvain commented 1 year ago

i tried to dump threads using the Diagnostics URL - i submitted the URL to Beta 10 and waited .. and waited .. and gave up after an hour with the CPU spinning away at max.

any further suggestion(s) ? .. oh i refreshed, and see you suggest Beta 12. i am updating right now.

jbesclapez commented 1 year ago

Hello, I just wanted to inform you, that I have the same issue. I am trying to install BiglyBt on a Docker with JDK17. Alll is updated. BiglyBT gets installed and then when I start it, I see the window and it hangs. Thanks and have a good day

jbesclapez commented 1 year ago

I would like to add that I just tried to install v2.6 and I have the same issue. Strange...

csylvain commented 1 year ago

i have been able to successfully exit BiglyBT a few times. seems fixed. thanks!