Details
-
Bug
-
Resolution: Done
-
P0: Blocker
-
5.13, 5.14
-
None
-
Reproduced under Linux, GCC8.2.0 and GCC7.3.0. Affects dev (b179abc33b) and 5.13 branches.
-
-
56a8c277546fba6ad45711e95db26c74178ef512 (qt/qtbase/dev)
Description
Intermittent, and likely why this has slipped through the CI: if you overload the system, this will reliably pass (probably because it'll actually run just one thread at a time, instead of multiple). If the system is NOT loaded, tst_vector will fail.
This opens a bigger problem: in many places we have stress tests that spawn a number of threads and check that nothing crashes / no asserts fire / etc. If the CI is constantly overloaded, those tests are meaningless as just one thread at a time will do work.
QFATAL : tst_QVector_StrictIterators::detachThreadSafetyInt() ASSERT: "aalloc != int(d->alloc) || isShared" in file ../../../../../include/QtCore/../../src/corelib/tools/qvector.h, line 675
FAIL! : tst_QVector_StrictIterators::detachThreadSafetyInt() Received a fatal error.
Loc: [Unknown file(0)]
Totals: 165 passed, 1 failed, 0 skipped, 0 blacklisted, 26ms
********* Finished testing of tst_QVector_StrictIterators *********
*********
GDB log:
Thread 152 "QThread" received signal SIGABRT, Aborted. [Switching to Thread 0x7ffff0e6f700 (LWP 20779)] __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff6cfc801 in __GI_abort () at abort.c:79 #2 0x00007ffff7716a6d in qt_message_fatal (context=..., message=...) at global/qlogging.cpp:1901 #3 0x00007ffff7712d64 in QMessageLogger::fatal (this=0x7ffff0e6ed20, msg=0x7ffff7b258e8 "ASSERT: \"%s\" in file %s, line %d") at global/qlogging.cpp:887 #4 0x00007ffff7709cde in qt_assert (assertion=0x5555555b3340 "aalloc != int(d->alloc) || isShared", file=0x5555555b23d8 "../../../../../include/QtCore/../../src/corelib/tools/qvector.h", line=675) at global/qglobal.cpp:3247 #5 0x0000555555592296 in QVector<int>::realloc (this=0x7ffff0e6ee10, aalloc=506, options=...) at ../../../../../include/QtCore/../../src/corelib/tools/qvector.h:675 #6 0x0000555555587127 in QVector<int>::detach (this=0x7ffff0e6ee10) at ../../../../../include/QtCore/../../src/corelib/tools/qvector.h:396 #7 0x0000555555590a19 in void tst_QVector_StrictIterators::detachThreadSafety<int>() const::{unnamed type#1}::run() (this=0x7fffffffd0a0) at ../qvector/tst_qvector.cpp:2849 #8 0x00007ffff772066f in QThreadPrivate::start (arg=0x7fffffffd0a0) at thread/qthread_unix.cpp:361 #9 0x00007ffff6aa46db in start_thread (arg=0x7ffff0e6f700) at pthread_create.c:463 #10 0x00007ffff6ddd88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) f 5 #5 0x0000555555592296 in QVector<int>::realloc (this=0x7ffff0e6ee10, aalloc=506, options=...) at ../../../../../include/QtCore/../../src/corelib/tools/qvector.h:675 675 Q_ASSERT(aalloc != int(d->alloc) || isShared); (gdb) p aalloc $2 = 506 (gdb) p d->alloc $3 = 506 (gdb) p isShared $4 = false