https://bugs.kde.org/show_bug.cgi?id=423963
Bug ID: 423963 Summary: Cannot spawn child process Product: valgrind Version: 3.15 SVN Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: memcheck Assignee: jsew...@acm.org Reporter: aklitz...@gmail.com Target Milestone: --- SUMMARY An integration test should spawn a subprocess with QProcess of Qt. But valgrind hangs and cannot spawn that child process. STEPS TO REPRODUCE 1. Create a QTest that spawns with QProcess a child 2. Valgrind cannot spawn it and throws this error 3. OBSERVED RESULT EXPECTED RESULT SOFTWARE/OS VERSIONS Linux/KDE Plasma: Linux 5.7.7 (available in About System) KDE Plasma Version: 5.19.2 KDE Frameworks Version: 5.71.0 Qt Version: 5.15.0 ADDITIONAL INFORMATION valgrind -v --tool=memcheck --leak-check=full --show-leak-kinds=definite --errors-for-leak-kinds=definite --error-exitcode=1 --gen-suppressions=all --suppressions=/home/andre/hg/AusweisApp2/libs/test/valgrind.supp --trace-children=yes test/qt/Test_ui_qml_UIPlugInQml ********* Start testing of test_UIPlugInQml ********* Config: Using QtTest library 5.15.0, Qt 5.15.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 10.1.0) --43990-- REDIR: 0x6bbf760 (libstdc++.so.6:operator delete[](void*)) redirected to 0x483b520 (operator delete[](void*)) --43990-- REDIR: 0x6f045f0 (libc.so.6:__strstr_sse2_unaligned) redirected to 0x4841660 (strstr) PASS : test_UIPlugInQml::initTestCase() ==43997== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-43997-by-andre-on-??? ==43997== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-43997-by-andre-on-??? ==43997== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-43997-by-andre-on-??? ==43997== ==43997== TO CONTROL THIS PROCESS USING vgdb (which you probably ==43997== don't want to do, unless you know exactly what you're doing, ==43997== or are doing some strange experiment): ==43997== /usr/lib/valgrind/../../bin/vgdb --pid=43997 ...command... ==43997== ==43997== TO DEBUG THIS PROCESS USING GDB: start GDB like this ==43997== /path/to/gdb test/qt/Test_ui_qml_UIPlugInQml ==43997== and then give GDB the following command ==43997== target remote | /usr/lib/valgrind/../../bin/vgdb --pid=43997 ==43997== --pid is optional if only one valgrind process is running ==43997== ==43997== Warning: invalid file descriptor -16781608 in syscall clone() ==43997== at 0x6F5671D: syscall (in /usr/lib/libc-2.31.so) ==43997== by 0x6812C52: ??? (in /usr/lib/libQt5Core.so.5.15.0) ==43997== by 0x67F6C8B: ??? (in /usr/lib/libQt5Core.so.5.15.0) ==43997== by 0x154717: test_UIPlugInQml::test_qmlEngineInit() (test_UIPlugInQml.cpp:147) ==43997== by 0x150F5D: test_UIPlugInQml::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (test_UIPlugInQml.moc:84) ==43997== by 0x688DE35: QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (in /usr/lib/libQt5Core.so.5.15.0) ==43997== by 0x48A7CF6: ??? (in /usr/lib/libQt5Test.so.5.15.0) ==43997== by 0x48A85B0: ??? (in /usr/lib/libQt5Test.so.5.15.0) ==43997== by 0x48A8B63: ??? (in /usr/lib/libQt5Test.so.5.15.0) ==43997== by 0x48A902D: QTest::qRun() (in /usr/lib/libQt5Test.so.5.15.0) ==43997== by 0x48A93DD: QTest::qExec(QObject*, int, char**) (in /usr/lib/libQt5Test.so.5.15.0) ==43997== by 0x150EB4: main (test_UIPlugInQml.cpp:230) valgrind: m_syswrap/syswrap-main.c:1957 (vgPlain_client_syscall): Assertion '0 == (sci->flags & ~(SfMayBlock | SfPostOnFail | SfPollAfter))' failed. host stacktrace: ==43997== at 0x58041B2A: show_sched_status_wrk (m_libcassert.c:406) ==43997== by 0x58041C47: report_and_quit (m_libcassert.c:477) ==43997== by 0x58041DD7: vgPlain_assert_fail (m_libcassert.c:543) ==43997== by 0x5809AB4F: vgPlain_client_syscall (syswrap-main.c:1980) ==43997== by 0x5809617A: handle_syscall (scheduler.c:1208) ==43997== by 0x58098177: vgPlain_scheduler (scheduler.c:1526) ==43997== by 0x580E38D0: thread_wrapper (syswrap-linux.c:101) ==43997== by 0x580E38D0: run_a_thread_NORETURN (syswrap-linux.c:154) sched status: running_tid=1 Thread 1: status = VgTs_Runnable syscall 56 (lwpid 43997) ==43997== at 0x6F5671D: syscall (in /usr/lib/libc-2.31.so) ==43997== by 0x6812C52: ??? (in /usr/lib/libQt5Core.so.5.15.0) ==43997== by 0x67F6C8B: ??? (in /usr/lib/libQt5Core.so.5.15.0) ==43997== by 0x154717: test_UIPlugInQml::test_qmlEngineInit() (test_UIPlugInQml.cpp:147) ==43997== by 0x150F5D: test_UIPlugInQml::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (test_UIPlugInQml.moc:84) ==43997== by 0x688DE35: QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (in /usr/lib/libQt5Core.so.5.15.0) ==43997== by 0x48A7CF6: ??? (in /usr/lib/libQt5Test.so.5.15.0) ==43997== by 0x48A85B0: ??? (in /usr/lib/libQt5Test.so.5.15.0) ==43997== by 0x48A8B63: ??? (in /usr/lib/libQt5Test.so.5.15.0) ==43997== by 0x48A902D: QTest::qRun() (in /usr/lib/libQt5Test.so.5.15.0) ==43997== by 0x48A93DD: QTest::qExec(QObject*, int, char**) (in /usr/lib/libQt5Test.so.5.15.0) ==43997== by 0x150EB4: main (test_UIPlugInQml.cpp:230) client stack range: [0x1FFEFFD000 0x1FFF000FFF] client SP: 0x1FFEFFEE28 valgrind stack range: [0x100307E000 0x100317DFFF] top usage: 13424 of 1048576 Note: see also the FAQ in the source distribution. It contains workarounds to several common problems. In particular, if Valgrind aborted or crashed after identifying problems in your program, there's a good chance that fixing those problems will prevent Valgrind aborting or crashing, especially if it happened in m_mallocfree.c. If that doesn't help, please report this bug to: www.valgrind.org In the bug report, send all the above text, the valgrind version, and what OS and version you are using. Thanks. --43990-- REDIR: 0x6fbfd70 (libc.so.6:__strncpy_avx2) redirected to 0x483cf40 (strncpy) QDEBUG : test_UIPlugInQml::test_qmlEngineInit(Android) ############ QFileInfo(/tmp/AusweisApp2.43997.port) --43990-- REDIR: 0x6bbf730 (libstdc++.so.6:operator delete(void*)) redirected to 0x483ae40 (operator delete(void*)) -- You are receiving this mail because: You are watching all bug changes.