Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [swtbot-dev] Tests get stuck due to deadlocks waiting in syncExec

Hi Patrick,

thanks for you answer.

I tried to debug (not that easy) that and it seems to me that not the OS.g_main_context_iteration is stuck but the readAndDispatch method is called constantly because there seem to be events to be processed.

(I'll try to validate that tomorrow with another remote debug setup)

Is that the reason the SWTBot thread does not get the UI lock?

I was not able to identify any events from that loop.

Is there anything else I can provide or try?

Best Regards,

Peter

BTW: I noticed i probably should have posted that question in the forum instead on the dev list. Sorry about that.

Should i move my request to the forum?


Gtk-WARNING **: Allocating size to GtkScrolledWindow 0x7fca5cec50d0 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?

Gtk-WARNING **: Negative content width -9 (allocation 4, extents 6x7) while allocating gadget (node separator, owner GtkSeparatorToolItem)


On 23.04.2021 16:49, Patrick Tasse wrote:
Hi Peter,

Are you able to reproduce this while debugging? I am curious to know if OS.g_main_context_iteration() is stuck or if the readAndDIspatch() loop is executing constantly.

At first glance it looks like the main thread is stuck and SWTBot is just waiting for the display thread to be available.

I have seen in the past some examples of GTK freezing the UI (for example https://bugs.eclipse.org/bugs/show_bug.cgi?id=532340) but it was usually with older versions. Your GTK version seems recent enough.

Patrick


On Fri, Apr 23, 2021 at 9:42 AM Peter Hermsdorf <peter.hermsdorf@xxxxxxxxx> wrote:
Hi everyone,

we are in the process of migrating our RCP based product from Eclipse
Mars to 2020-12.
Which indirectly also means updating to Java 11 and GTK3( for SWTBot tests).

After migration we face the issue that at some point the test execution
get's stuck. (but always at the same test(s))
A thread dump shows that the SWTBot Testable thread get's stuck waiting
for the UI thread.

Excerpt: (full dump attached as .zip file)

Thread [main] (Suspended)
             OS.g_main_context_iteration(long, boolean) line: not
available [native method]
             Display.readAndDispatch() line: 4524
             PartRenderingEngine$5.run() line: 1157
             Realm.runWithDefault(Realm, Runnable) line: 338
             PartRenderingEngine.run(MApplicationElement,
IEclipseContext) line: 1046
             E4Workbench.createAndRunUI(MApplicationElement) line: 155
Thread [WorkbenchTestable] (Suspended)
             waiting for: RunnableLock  (id=115)
             Object.wait(long) line: not available [native method]
             RunnableLock(Object).wait() line: 328
             UISynchronizer(Synchronizer).syncExec(Runnable) line: 253
             UISynchronizer.syncExec(Runnable) line: 133
             Display.syncExec(Runnable) line: 5895
             UIThreadRunnable$4(UIThreadRunnable).run() line: 76
             UIThreadRunnable.syncExec(Display, VoidResult) line: 201
             UIThreadRunnable.syncExec(VoidResult) line: 186
             SWTBotTreeItem(AbstractSWTBot<T>).notify(int, Event,
Widget, Runnable) line: 197
             SWTBotTreeItem(AbstractSWTBot<T>).notify(int, Event,
Widget) line: 155
             SWTBotTreeItem.notifyTree(int, Event) line: 237
             SWTBotTreeItem.doubleClick() line: 450

I can't see what's causing the issue here. Any idea's or hints are more
than welcome!

Environment:
* the build is running in a docker container with Xvnc TigerVNC 1.7.0 as
Display
* Java is the latest JustJ OpenJDK build 11.0.4
* Eclipse Target Platform is 2020-12 with SWTBot version 3.0.0.202006031738
* GTK version is 3.22.11
* GTK Theme is Adwaita
* Docker image is based on
https://git.eclipse.org/r/plugins/gitiles/sirius/org.eclipse.sirius/+/master/releng/or g.eclipse.sirius.releng/docker/build/Dockerfile

Thank you.

Bye Peter

_______________________________________________
swtbot-dev mailing list
swtbot-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/swtbot-dev


Back to the top