Hi All, I am trying to run debug version of VirtualBox with logging enabled and VirtualBox (current version compiled from sources) coredumps. I am using the following env. properties to enable logging: export VBOX_LOG=main.e.l.f export VBOX_LOG_FLAGS="time tid thread" export VBOX_LOG_DEST=dir=/tmp/vbox
VirtualBox crashes while starting with the following back-trace: Core was generated by `Projects/Source/VirtualBox/out/linux.amd64/debug/bin/VirtualBox'. Program terminated with signal SIGTRAP, Trace/breakpoint trap. #0 0x00007fdd6587ea8a in rtCritSectEnter (pSrcPos=0x7fffcd0b67d0, pCritSect=0x2188230) at /home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/generic/critsect-generic.cpp:291 291 AssertBreakpoint(); /* don't do normal assertion here, the logger uses this code too. */ (gdb) bt #0 0x00007fdd6587ea8a in rtCritSectEnter (pSrcPos=0x7fffcd0b67d0, pCritSect=0x2188230) at /home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/generic/critsect-generic.cpp:291 #1 RTCritSectEnterDebug (pCritSect=0x2188230, uId=0, pszFile=0x7fdd659beee0 "/home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/r3/generic/semspinmutex-r3-generic.cpp", iLine=83, pszFunction=0x7fdd659bf020 <RTSemSpinMutexRequest::__PRETTY_FUNCTION__> "int RTSemSpinMutexRequest(RTSEMSPINMUTEX)") at /home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/generic/critsect-generic.cpp:360 #2 0x00007fdd658aba1a in RTSemSpinMutexRequest (hSpinMtx=0x2188230) at /home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/r3/generic/semspinmutex-r3-generic.cpp:83 #3 0x00007fdd657c793a in rtlogLock (pLogger=0x21910c0) at /home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/common/log/log.cpp:386 #4 0x00007fdd657cd062 in RTLogLoggerExV(PRTLOGGER, unsigned int, unsigned int, const char *, typedef __va_list_tag __va_list_tag *) (pLogger=0x21910c0, fFlags=0, iGroup=4294967295, pszFormat=0x7fdd659825b8 "\n!!Assertion Failed!!\nExpression: %s\nLocation : %s(%d) %s\n", args=0x7fffcd0b6908) at /home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/common/log/log.cpp:2900 #5 0x00007fdd657ccf9d in RTLogLoggerV(PRTLOGGER, const char *, typedef __va_list_tag __va_list_tag *) (pLogger=0x0, pszFormat=0x7fdd659825b8 "\n!!Assertion Failed!!\nExpression: %s\nLocation : %s(%d) %s\n", args=0x7fffcd0b6908) at /home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/common/log/log.cpp:2845 #6 0x00007fdd657cd297 in RTLogPrintfV(const char *, typedef __va_list_tag __va_list_tag *) ( pszFormat=0x7fdd659825b8 "\n!!Assertion Failed!!\nExpression: %s\nLocation : %s(%d) %s\n", va=0x7fffcd0b6908) at /home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/common/log/log.cpp:3114 #7 0x00007fdd657cf3e6 in RTLogPrintf (pszFormat=0x7fdd659825b8 "\n!!Assertion Failed!!\nExpression: %s\nLocation : %s(%d) %s\n") at /home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/common/log/logellipsis.cpp:101 #8 0x00007fdd657de81b in RTAssertMsg1 (pszExpr=0x0, uLine=94, pszFile=0x7fdd6597ef80 "/home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/common/log/logformat.cpp", pszFunction=0x7fdd6597f020 <rtlogFormatStr(void*, unsigned long (*)(void*, char const*, unsigned long), void*, char const**, __va_list_tag (*) [1], int, int, unsigned int, char)::__PRETTY_FUNCTION__> "size_t rtlogFormatStr(void*, PFNRTSTROUTPUT, void*, const char**, __va_list_tag (*)[1], int, int, unsigned int, char)") at /home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/common/misc/assert.cpp:170 #9 0x00007fdd657dd746 in RTAssertMsg1Weak (pszExpr=0x0, uLine=94, pszFile=0x7fdd6597ef80 "/home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/common/log/logformat.cpp", pszFunction=0x7fdd6597f020 <rtlogFormatStr(void*, unsigned long (*)(void*, char const*, unsigned long), void*, char const**, __va_list_tag (*) [1], int, int, unsigned int, char)::__PRETTY_FUNCTION__> "size_t rtlogFormatStr(void*, PFNRTSTROUTPUT, void*, const char**, __va_list_tag (*)[1], int, int, unsigned int, char)") at /home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/common/misc/RTAssertMsg1Weak.cpp:39 #10 0x00007fdd657cf9b5 in rtlogFormatStr (pvArg=0x0, pfnOutput=0x7fdd657cdea5 <rtLogOutputPrefixed(void*, char const*, size_t)>, pvArgOutput=0x7fffcd0b6cc0, ppszFormat=0x7fffcd0b6b38, pArgs=0x7fffcd0b6bd0, cchWidth=-1, cchPrecision=-1, fFlags=0, chArgSize=104 'h') at /home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/common/log/logformat.cpp:94 #11 0x00007fdd6582c8b2 in RTStrFormatV(PFNRTSTROUTPUT, void *, PFNSTRFORMAT, void *, const char *, typedef __va_list_tag __va_list_tag *) ( pfnOutput=0x7fdd657cdea5 <rtLogOutputPrefixed(void*, char const*, size_t)>, pvArgOutput=0x7fffcd0b6cc0, pfnFormat=0x7fdd657cf95a <rtlogFormatStr(void*, PFNRTSTROUTPUT, void*, char const**, va_list*, int, int, unsigned int, char)>, pvArgFormat=0x0, pszFormat=0x7fdd4f015720 "c\n", InArgs=0x7fffcd0b6d58) at /home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/common/string/strformat.cpp:806 #12 0x00007fdd657cf958 in RTLogFormatV(PFNRTSTROUTPUT, void *, const char *, typedef __va_list_tag __va_list_tag *) ( pfnOutput=0x7fdd657cdea5 <rtLogOutputPrefixed(void*, char const*, size_t)>, pvArg=0x7fffcd0b6cc0, pszFormat=0x7fdd4f015552 "{%p} %Rfn: %M", args=0x7fffcd0b6d58) at /home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/common/log/logformat.cpp:67 #13 0x00007fdd657cf0e4 in rtlogLoggerExVLocked(PRTLOGGER, unsigned int, unsigned int, const char *, typedef __va_list_tag __va_list_tag *) ( pLogger=0x21910c0, fFlags=2, iGroup=169, pszFormat=0x7fdd4f015552 "{%p} %Rfn: %M", args=0x7fffcd0b6d58) at /home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/common/log/log.cpp:3932 #14 0x00007fdd657cd264 in RTLogLoggerExV(PRTLOGGER, unsigned int, unsigned int, const char *, typedef __va_list_tag __va_list_tag *) (pLogger=0x21910c0, fFlags=2, iGroup=169, pszFormat=0x7fdd4f015552 "{%p} %Rfn: %M", args=0x7fffcd0b6d58) at /home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/common/log/log.cpp:2936 #15 0x00007fdd657cf345 in RTLogLoggerEx (pLogger=0x21910c0, fFlags=2, iGroup=169, pszFormat=0x7fdd4f015552 "{%p} %Rfn: %M") at /home/thurka/Projects/Source/VirtualBox/src/VBox/Runtime/common/log/logellipsis.cpp:83 #16 0x00007fdd4ee86aa3 in VirtualBoxClient::init (this=0x233efd0) at /home/thurka/Projects/Source/VirtualBox/src/VBox/Main/src-client/VirtualBoxClientImpl.cpp:147 #17 0x00007fdd4ee863be in VirtualBoxClient::FinalConstruct (this=0x233efd0) at /home/thurka/Projects/Source/VirtualBox/src/VBox/Main/src-client/VirtualBoxClientImpl.cpp:45 #18 0x00007fdd4ef2af7d in VirtualBoxClientConstructor (aOuter=0x0, aIID=..., aResult=0x7fffcd0b6ff8) at /home/thurka/Projects/Source/VirtualBox/src/VBox/Main/src-client/xpcom/module.cpp:111 #19 0x00007fdd64e9dada in nsGenericFactory::CreateInstance (this=0x2356850, aOuter=0x0, aIID=..., aResult=0x7fffcd0b6ff8) at /home/thurka/Projects/Source/VirtualBox/src/libs/xpcom18a4/xpcom/glue/nsGenericFactory.cpp:82 #20 0x00007fdd64e3c0bf in nsComponentManagerImpl::CreateInstance (this=0x23088a0, aClass=..., aDelegate=0x0, aIID=..., aResult=0x7fffcd0b6ff8) at /home/thurka/Projects/Source/VirtualBox/src/libs/xpcom18a4/xpcom/components/nsComponentManager.cpp:1876 #21 0x00000000005172d8 in CInterface<IVirtualBoxClient, COMBaseWithEI>::createInstance (this=0x23c39d0, aClsId=...) at /home/thurka/Projects/Source/VirtualBox/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.h:664 #22 0x0000000000510b92 in VBoxGlobal::prepare (this=0x23c39b0) at /home/thurka/Projects/Source/VirtualBox/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp:4015 #23 0x00000000004fd8ba in VBoxGlobal::create () at /home/thurka/Projects/Source/VirtualBox/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp:201 #24 0x0000000000455696 in TrustedMain (argc=1, argv=0x21c34d0) at /home/thurka/Projects/Source/VirtualBox/src/VBox/Frontends/VirtualBox/src/main.cpp:512 #25 0x0000000000455d96 in main (argc=1, argv=0x21c34d0, envp=0x7fffcd0b95a8) at /home/thurka/Projects/Source/VirtualBox/src/VBox/Frontends/VirtualBox/src/main.cpp:649 I found out that the crash is caused by some strange formatting used at VirtualBoxClientImpl.cpp:147 (frame #16). There is the following line: LogFlowThisFunc(("rc=%hrc\n", rc)); There are similar usages of LogFlowThisFunc, but all use "rc=%Rrc\n”, so I replaced above line with: LogFlowThisFunc(("rc=%Rrc\n", rc)); and this fixed the crash for me. Is this a known problem? Bye, -- Tomas Hurka <mailto:tomas.hu...@oracle.com> NetBeans Profiler http://profiler.netbeans.org VisualVM http://visualvm.java.net Software Developer Oracle, Praha Czech Republic _______________________________________________ vbox-dev mailing list vbox-dev@virtualbox.org https://www.virtualbox.org/mailman/listinfo/vbox-dev