[Qt-creator] Valgrind and Qt Creator
Ziller Eike
Eike.Ziller at theqtcompany.com
Mon Mar 21 10:11:53 CET 2016
Hi,
Valgrind on OS X mostly does not work.
Valgrind 3.11.0 claims to support Mac OS X 10.10, with initial support for 10.11,
but we’ve already previously seen that it tends to have even more problems with Qt.
Please follow the advice of the debug output below and report bugs to Valgrind.
Br, Eike
> On Mar 19, 2016, at 1:50 AM, Freddy Martinez <freddy311082 at gmail.com> wrote:
>
> Hi Andre… this is the valgrind output
>
> freddy at Freddys-MacBook-Pro:/Volumes/DATA/nautam/nautam1.1/demo/Nautam/lib$ valgrind ./nautam-server
> ==99053== Memcheck, a memory error detector
> ==99053== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
> ==99053== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
> ==99053== Command: ./nautam-server
> ==99053==
> --99053-- run: /usr/bin/dsymutil "/Volumes/DATA/nautam/nautam1.1/demo/Nautam/lib/libcommon.1.0.0.dylib"
> --99053-- run: /usr/bin/dsymutil "/Volumes/DATA/nautam/nautam1.1/demo/Nautam/lib/libsystem_manager.1.0.0.dylib"
> --99053-- run: /usr/bin/dsymutil "/Volumes/DATA/nautam/nautam1.1/demo/Nautam/lib/libtask_manager.1.0.0.dylib"
> --99053-- run: /usr/bin/dsymutil "/Volumes/DATA/nautam/nautam1.1/demo/Nautam/lib/libforms_manager.1.0.0.dylib"
> --99053-- run: /usr/bin/dsymutil "/Volumes/DATA/nautam/nautam1.1/demo/Nautam/lib/libformula_manager.1.0.0.dylib"
> --99053-- run: /usr/bin/dsymutil "/Volumes/DATA/nautam/nautam1.1/demo/Nautam/lib/libreports_manager.1.0.0.dylib"
> --99053-- run: /usr/bin/dsymutil "/Volumes/DATA/nautam/nautam1.1/demo/Nautam/lib/libdb_manager.1.0.0.dylib"
> --99053-- run: /usr/bin/dsymutil "/Volumes/DATA/nautam/nautam1.1/demo/Nautam/lib/librules_manager.1.0.0.dylib"
> --99053-- run: /usr/bin/dsymutil "/Volumes/DATA/nautam/nautam1.1/demo/Nautam/lib/libsecurity_manager.1.0.0.dylib"
> --99053-- run: /usr/bin/dsymutil "/Volumes/DATA/nautam/nautam1.1/demo/Nautam/lib/libqueries_manager.1.0.0.dylib"
> --99053-- run: /usr/bin/dsymutil "/Volumes/DATA/nautam/nautam1.1/demo/Nautam/lib/libcommunication_manager.1.0.0.dylib"
> --99053-- run: /usr/bin/dsymutil "/Volumes/DATA/nautam/nautam1.1/demo/Nautam/lib/libprocedure_manager.1.0.0.dylib"
> --99053-- run: /usr/bin/dsymutil "/Volumes/DATA/nautam/nautam1.1/demo/Nautam/lib/libperspectives_manager.1.0.0.dylib"
> --99053-- run: /usr/bin/dsymutil "/Volumes/DATA/nautam/nautam1.1/demo/Nautam/lib/libperiods_manager.1.0.0.dylib"
> --99053-- run: /usr/bin/dsymutil "/Volumes/DATA/nautam/nautam1.1/demo/Nautam/lib/libsequence_manager.1.0.0.dylib"
> --99053-- run: /usr/bin/dsymutil "/Volumes/DATA/nautam/nautam1.1/demo/Nautam/lib/libcryptopp.1.0.0.dylib"
> ==99053== Conditional jump or move depends on uninitialised value(s)
> ==99053== at 0x7FFF5FC24A87: bcmp (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC11974: ImageLoaderMachO::validateFirstPages(linkedit_data_command const*, int, unsigned char const*, unsigned long, long long, ImageLoader::LinkContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC16BEA: ImageLoaderMachOCompressed::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, unsigned int, unsigned int, linkedit_data_command const*, encryption_info_command const*, ImageLoader::LinkContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC10ADE: ImageLoaderMachO::instantiateFromFile(char const*, int, unsigned char const*, unsigned long long, unsigned long long, stat const&, ImageLoader::LinkContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC038C2: dyld::loadPhase6(int, stat const&, char const*, dyld::LoadContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC084CF: dyld::loadPhase5(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC081EF: dyld::loadPhase4(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC07F54: dyld::loadPhase3(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC076A9: dyld::loadPhase1(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC0347A: dyld::loadPhase0(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC0315E: dyld::load(char const*, dyld::LoadContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC0876C: dyld::libraryLocator(char const*, bool, char const*, ImageLoader::RPathChain const*) (in /usr/lib/dyld)
> ==99053==
> ==99053== Use of uninitialised value of size 8
> ==99053== at 0x7FFF5FC24A9F: bcmp (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC11974: ImageLoaderMachO::validateFirstPages(linkedit_data_command const*, int, unsigned char const*, unsigned long, long long, ImageLoader::LinkContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC16BEA: ImageLoaderMachOCompressed::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, unsigned int, unsigned int, linkedit_data_command const*, encryption_info_command const*, ImageLoader::LinkContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC10ADE: ImageLoaderMachO::instantiateFromFile(char const*, int, unsigned char const*, unsigned long long, unsigned long long, stat const&, ImageLoader::LinkContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC038C2: dyld::loadPhase6(int, stat const&, char const*, dyld::LoadContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC084CF: dyld::loadPhase5(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC081EF: dyld::loadPhase4(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC07F54: dyld::loadPhase3(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC076A9: dyld::loadPhase1(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC0347A: dyld::loadPhase0(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC0315E: dyld::load(char const*, dyld::LoadContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC0876C: dyld::libraryLocator(char const*, bool, char const*, ImageLoader::RPathChain const*) (in /usr/lib/dyld)
> ==99053==
> ==99053== Use of uninitialised value of size 8
> ==99053== at 0x7FFF5FC24AA4: bcmp (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC11974: ImageLoaderMachO::validateFirstPages(linkedit_data_command const*, int, unsigned char const*, unsigned long, long long, ImageLoader::LinkContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC16BEA: ImageLoaderMachOCompressed::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, unsigned int, unsigned int, linkedit_data_command const*, encryption_info_command const*, ImageLoader::LinkContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC10ADE: ImageLoaderMachO::instantiateFromFile(char const*, int, unsigned char const*, unsigned long long, unsigned long long, stat const&, ImageLoader::LinkContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC038C2: dyld::loadPhase6(int, stat const&, char const*, dyld::LoadContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC084CF: dyld::loadPhase5(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC081EF: dyld::loadPhase4(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC07F54: dyld::loadPhase3(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC076A9: dyld::loadPhase1(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC0347A: dyld::loadPhase0(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC0315E: dyld::load(char const*, dyld::LoadContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC0876C: dyld::libraryLocator(char const*, bool, char const*, ImageLoader::RPathChain const*) (in /usr/lib/dyld)
> ==99053==
> ==99053== Conditional jump or move depends on uninitialised value(s)
> ==99053== at 0x7FFF5FC11977: ImageLoaderMachO::validateFirstPages(linkedit_data_command const*, int, unsigned char const*, unsigned long, long long, ImageLoader::LinkContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC16BEA: ImageLoaderMachOCompressed::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, unsigned int, unsigned int, linkedit_data_command const*, encryption_info_command const*, ImageLoader::LinkContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC10ADE: ImageLoaderMachO::instantiateFromFile(char const*, int, unsigned char const*, unsigned long long, unsigned long long, stat const&, ImageLoader::LinkContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC038C2: dyld::loadPhase6(int, stat const&, char const*, dyld::LoadContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC084CF: dyld::loadPhase5(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC081EF: dyld::loadPhase4(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC07F54: dyld::loadPhase3(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC076A9: dyld::loadPhase1(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC0347A: dyld::loadPhase0(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC0315E: dyld::load(char const*, dyld::LoadContext const&) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC0876C: dyld::libraryLocator(char const*, bool, char const*, ImageLoader::RPathChain const*) (in /usr/lib/dyld)
> ==99053== by 0x7FFF5FC0E8CD: ImageLoader::recursiveLoadLibraries(ImageLoader::LinkContext const&, bool, ImageLoader::RPathChain const&) (in /usr/lib/dyld)
> ==99053==
> --99053-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option
> --99053-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 2 times)
> --99053-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 4 times)
> --99053-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 8 times)
> --99053-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 16 times)
>
> valgrind: m_syswrap/syswrap-amd64-darwin.c:507 (void wqthread_hijack(Addr, Addr, Addr, Addr, Int, Addr)): Assertion 'tst->os_state.pthread - magic_delta == self' failed.
>
> host stacktrace:
> ==99053== at 0x238040B6C: ???
> ==99053== by 0x238040F77: ???
> ==99053== by 0x238040F5A: ???
> ==99053== by 0x2380DFCD9: ???
>
> sched status:
> running_tid=0
>
> Thread 1: status = VgTs_WaitSys (lwpid 2567)
> ==99053== at 0x10449E3C2: semaphore_wait_trap (in /usr/lib/system/libsystem_kernel.dylib)
> ==99053== by 0x1042A85D5: _dispatch_group_wait_slow (in /usr/lib/system/libdispatch.dylib)
> ==99053== by 0x102AE777D: CFPREFERENCES_IS_WAITING_FOR_CFPREFSD (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
> ==99053== by 0x102AE7897: -[CFPrefsSearchListSource generationCountFromListOfSources:count:] (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
> ==99053== by 0x102996CB3: -[CFPrefsSearchListSource alreadylocked_copyDictionary] (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
> ==99053== by 0x10299198B: -[CFPrefsSearchListSource alreadylocked_copyValueForKey:] (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
> ==99053== by 0x102B1964B: ___CFPreferencesCopyAppValueWithContainer_block_invoke (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
> ==99053== by 0x102AE674F: +[CFPrefsSearchListSource withSearchListForIdentifier:container:perform:] (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
> ==99053== by 0x102B195C6: _CFPreferencesCopyAppValueWithContainer (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
> ==99053== by 0x1029A3E92: ___CFBundleCopyUserLanguages_block_invoke (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
> ==99053== by 0x1042A033E: _dispatch_client_callout (in /usr/lib/system/libdispatch.dylib)
> ==99053== by 0x1042A0236: dispatch_once_f (in /usr/lib/system/libdispatch.dylib)
> ==99053== by 0x102A87FAA: _CFBundleCopyLanguageSearchListInBundle (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
> ==99053== by 0x102A62892: _copyQueryTable (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
> ==99053== by 0x102A62071: _copyResourceURLsFromBundle (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
> ==99053== by 0x1029A22E5: _CFBundleCopyFindResources (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
> ==99053== by 0x1029A1E1F: CFBundleCopyResourceURL (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
> ==99053== by 0x1029A1CC2: CFBundleGetLocalInfoDictionary (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
> ==99053== by 0x1029A1C30: CFBundleGetValueForInfoDictionaryKey (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
> ==99053== by 0x1021AE88B: QCoreApplicationPrivate::macMenuBarName() (in /Applications/Qt/5.5/clang_64/lib/QtCore.framework/Versions/5/QtCore)
> ==99053== by 0x1021AE957: QCoreApplicationPrivate::appName() const (in /Applications/Qt/5.5/clang_64/lib/QtCore.framework/Versions/5/QtCore)
> ==99053== by 0x1021B047D: QCoreApplication::init() (in /Applications/Qt/5.5/clang_64/lib/QtCore.framework/Versions/5/QtCore)
> ==99053== by 0x1021B06BA: QCoreApplication::QCoreApplication(int&, char**, int) (in /Applications/Qt/5.5/clang_64/lib/QtCore.framework/Versions/5/QtCore)
> ==99053== by 0x10003C5B8: main (in ./nautam-server)
>
> Thread 2: status = VgTs_WaitSys (lwpid 6147)
> ==99053== at 0x1044A46DE: __workq_kernreturn (in /usr/lib/system/libsystem_kernel.dylib)
> ==99053== by 0x2380DFCD9: ???
> ==99053== by 0x2382081AF: ???
> ==99053== by 0x16F: ???
> ==99053== by 0x700000397C3F: ???
>
> Thread 3: status = VgTs_WaitSys (lwpid 5635)
> ==99053== at 0x1044A46DE: __workq_kernreturn (in /usr/lib/system/libsystem_kernel.dylib)
> ==99053== by 0x1045F4C52: _pthread_workqueue_addthreads (in /usr/lib/system/libsystem_pthread.dylib)
> ==99053== by 0x1042A3672: _dispatch_queue_wakeup_global_slow (in /usr/lib/system/libdispatch.dylib)
> ==99053== by 0x1042A5133: _dispatch_queue_drain (in /usr/lib/system/libdispatch.dylib)
> ==99053== by 0x1042A6112: _dispatch_mgr_queue_drain (in /usr/lib/system/libdispatch.dylib)
> ==99053== by 0x1042A5FED: _dispatch_mgr_invoke (in /usr/lib/system/libdispatch.dylib)
> ==99053== by 0x1042A5D00: _dispatch_mgr_thread (in /usr/lib/system/libdispatch.dylib)
>
> Thread 4: status = VgTs_WaitSys (lwpid 7171)
> ==99053== at 0x1044A46DE: __workq_kernreturn (in /usr/lib/system/libsystem_kernel.dylib)
> ==99053== by 0x1045F5728: _pthread_wqthread (in /usr/lib/system/libsystem_pthread.dylib)
> ==99053== by 0x1045F3364: start_wqthread (in /usr/lib/system/libsystem_pthread.dylib)
>
>
> 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.
>
> i’m running my program without any valgrind option because I want to see if I can fix it…
>
> if anyone can help me I appreciate that… my application is a server that must be running all the time. If I run the application with valgrind, the program exit, if I run it from the command line as any other application, it works fine
>
> best regard
>
> =============================================
> "El tamaño de tus logros depende del tamaño de tus metas."
> C++ and Qt Senior Developer
> B.S. Computer Science
> Buenos Aires, Argentina
>
>> On Mar 18, 2016, at 7:13 PM, André Pönitz <apoenitz at t-online.de> wrote:
>>
>> On Fri, Mar 18, 2016 at 05:34:18PM -0300, Freddy Martinez Garcia wrote:
>>> Guys... i'm using qt-creator with non qt project and when I run the
>>> valgrind everything is perfect, but If i run a qt project with valgrind, my
>>> project doesn't start.. Is this the right place to ask about it or I have
>>> to go to the valgrind mail list ?
>>
>> A valgrind list would be the right place to ask if your application
>> doesn't work with valgrind on the command line.
>>
>> Assuming it does work there, this here (or even bugreports.qt-project.org)
>> is the place to ask about issues with the Qt Creator integration.
>>
>> What version of Qt Creator, valgrind and your OS are we talking about?
>>
>> Is there any output in tha Application Output pane or anything else
>> that looks interesting?
>>
>> Andre'
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
--
Eike Ziller, Principle Software Engineer - The Qt Company GmbH
The Qt Company GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Tuula Haataja
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
More information about the Qt-creator
mailing list