After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 792364 - gdbus-threading test method-calls-in-thread: assertion failed (elapsed_msec < 8000): (8220 < 8000)
gdbus-threading test method-calls-in-thread: assertion failed (elapsed_msec <...
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gdbus
2.54.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2018-01-09 11:15 UTC by Simon McVittie
Modified: 2018-01-09 13:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdbus-threading test: Allow even longer for test_method_calls_in_thread (1.02 KB, patch)
2018-01-09 11:16 UTC, Simon McVittie
committed Details | Review

Description Simon McVittie 2018-01-09 11:15:16 UTC
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884660

test_method_calls_in_thread() in gdbus-threading.c tests that GDBus is thread-safe. Three client threads call into a server: thread 1 calls the Sleep() method 100 times with a 40ms argument, thread 2 calls the Sleep() method 20 times with a 200ms argument, and thread 3 calls it 100 times with a 40ms argument. The Sleep() method just waits the indicated time and returns. The main thread waits for the three client threads - they should all take 4000ms, plus D-Bus overhead, minus up to 40ms because GLib timeouts with 1ms granularity can finish slightly early - and asserts that the time elapsed was in the range [3950, 8000) ms. However, in one case observed on Debian "reproducible builds" infrastructure, it took 8220ms.

The 8 second limit is essentially arbitrary: David Zeuthen increased it from 5 to 6 seconds in 2010 because an 867MHz PowerPC took too long, and Martin Pitt increased it from 6 to 8 seconds in 2012 because a PandaBoard (~1 GHz ARM) was also taking too long. So we can increase the timeout as far as is necessary, within reason.

(I was surprised to see an x86-64 still in use in 2017 suffering worse performance than a 2003 PowerPC laptop or a 2010 low-cost embedded developer board, so I have asked whether the "reproducible builds" worker machines are doing other things at the same time or are otherwise particularly slow, but I haven't had any response so far.)
Comment 1 Simon McVittie 2018-01-09 11:16:50 UTC
Created attachment 366542 [details] [review]
gdbus-threading test: Allow even longer for test_method_calls_in_thread

This should take 4 seconds + overhead, but on a slow or heavily
loaded system, there's no guarantee that it won't take significantly
longer.

---

This is the patch we used in Debian.
Comment 2 Philip Withnall 2018-01-09 11:20:02 UTC
Review of attachment 366542 [details] [review]:

Sure. Feel free to push to glib-2-54 too if that would be useful for Debian.
Comment 3 Simon McVittie 2018-01-09 13:12:22 UTC
Fixed in master (2685a533a) for 2.55.2, and in glib-2-54 (56b2983b7) for 2.54.4. Thanks!