<div dir="ltr">No problem, I know your plate is full.  My patch was simply to get me going until you got a chance to do a proper fix. Please let me know if you need any testing done.<br></div><div class="gmail_extra"><br><br>

<div class="gmail_quote">On Thu, Apr 11, 2013 at 2:02 PM, Michael Thayer <span dir="ltr"><<a href="mailto:michael.thayer@oracle.com" target="_blank">michael.thayer@oracle.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hello Ribhi,<br>
<br>
Thank you for your patch and for the effort you spent tracking this down (and sorry for my slow answer).  I will indeed not apply your patch as it is though, as I would prefer to go slightly deeper and catch the problem at source (and I think that a couple of other places might be at risk too).<br>


<br>
Regards,<br>
<br>
Michael<div class="im"><br>
<br>
On 28/03/13 01:30, Ribhi Kamal wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
It seems that UIMachineView::maxGuestSize() continues to execute while<br>
some other thread/process destroys the UIMachineView object. To test<br>
this out, I put in a hack in UIMachineView to basically SpinLock until<br>
any existing maxGuestSize exits. Then it sets a flag using a static<br>
variable to prevent maxGuestSize from using any member variables after<br>
the view has been destroyed. When the view is recreated, the flag is reset.<br>
<br>
I've attached is my hack (based on 4.2.10), it works pretty well and<br>
seems to stop the crash. I hope this will help you put in a better fix<br>
in the future.<br>
<br>
Just one question, Which process/thread executes maxGuestSize? An EMT<br>
thread?<br>
<br>
Cheers!<br>
<br>
fyi, There are cases where this hack will not work (in theory) so please<br>
don't use it.<br>
<br>
<br>
On Sat, Mar 16, 2013 at 4:09 PM, Ribhi Kamal <<a href="mailto:rbhkamal@gmail.com" target="_blank">rbhkamal@gmail.com</a><br></div><div class="im">
<mailto:<a href="mailto:rbhkamal@gmail.com" target="_blank">rbhkamal@gmail.com</a>>> wrote:<br>
<br>
    Just happened while switching from full screen back to normal view.<br>
    This is something new, only in 4.2, because the virtual machine used<br>
    to crash only while closing it so it wasn't a big deal. I'll open a<br>
    bug once I reproduce it with the released binaries... don't wait.<br>
<br>
    Meanwhile, please let me know if you need any additional<br>
    information/testing.<br>
<br>
    Thanks,<br>
    Ribhi<br>
<br>
<br>
<br>
    On Fri, Mar 15, 2013 at 8:26 PM, Ribhi Kamal <<a href="mailto:rbhkamal@gmail.com" target="_blank">rbhkamal@gmail.com</a><br></div><div class="im">
    <mailto:<a href="mailto:rbhkamal@gmail.com" target="_blank">rbhkamal@gmail.com</a>>> wrote:<br>
<br>
        "Unfortunately, I can't find the log files"<br>
<br>
        Obviously that is not true, I uploaded the logs to my dropbox<br>
<br>
<br>
        On Fri, Mar 15, 2013 at 8:25 PM, Ribhi Kamal <<a href="mailto:rbhkamal@gmail.com" target="_blank">rbhkamal@gmail.com</a><br></div><div><div class="h5">
        <mailto:<a href="mailto:rbhkamal@gmail.com" target="_blank">rbhkamal@gmail.com</a>>> wrote:<br>
<br>
            I've been seeing a crash when closing VirtualBox.exe that is<br>
            almost never reproducible. Few days ago I managed to get a<br>
            crash dump and ran the analysis, see below. At the time of<br>
            the crash, I was closing the virtual machine after it had<br>
            been running for ~24 hours. Unfortunately, I can't find the<br>
            log files<br>
<br>
            I'm using the following:<br>
            VirtualBox 4.2.8 (Cross compiled with VS2010-SP1 on windows<br>
            7 64bit, Target Host = x86)<br>
            Host Win7 32bit<br>
            Guest Linux 2.6 32bit<br>
            Build Type: Release<br>
<br>
            Please let me know if you have any questions.<br>
<br>
            Thanks,<br>
            Ribhi<br>
<br>
            Log files:<br>
            Successful:<br>
            <a href="https://www.dropbox.com/s/xrvcr8sud4z63ia/Success.log" target="_blank">https://www.dropbox.com/s/<u></u>xrvcr8sud4z63ia/Success.log</a><br>
            Crash: <a href="https://www.dropbox.com/s/p5pslbt3sl9cpeo/Crash.log" target="_blank">https://www.dropbox.com/s/<u></u>p5pslbt3sl9cpeo/Crash.log</a><br>
<br>
<br>
            0:000> !analyze -v -f<br>
            ******************************<u></u>******************************<u></u>*******************<br>
<br>
            *<br>
            *<br>
            *                        Exception<br>
            Analysis                                   *<br>
            *<br>
            *<br>
            ******************************<u></u>******************************<u></u>*******************<br>
<br>
<br>
            GetPageUrlData failed, server returned HTTP status 404<br>
            URL requested:<br>
            <a href="http://watson.microsoft.com/StageOne/VirtualBox_exe/4_2_8_0/51420e3b/unknown/0_0_0_0/bbbbbbb4/80000003/00000000.htm?Retriage=1" target="_blank">http://watson.microsoft.com/<u></u>StageOne/VirtualBox_exe/4_2_8_<u></u>0/51420e3b/unknown/0_0_0_0/<u></u>bbbbbbb4/80000003/00000000.<u></u>htm?Retriage=1</a><br>


<br>
<br>
            FAULTING_IP:<br>
            VirtualBox!UIMachineView::<u></u>maxGuestSize+18<br>
            [c:\vboxbuild\virtualbox\4.2.<u></u>8\src\src\vbox\frontends\<u></u>virtualbox\src\runtime\<u></u>uimachineview.cpp<br>
            @ 702]<br></div></div>
            *0145ed68 f00fc70f        lock cmpxchg8b qword ptr [edi] *<div class="im"><br>
<br>
            EXCEPTION_RECORD:  ffffffff -- (.exr 0xffffffffffffffff)<br>
            ExceptionAddress: 00000000<br>
                ExceptionCode: 80000003 (Break instruction exception)<br>
               ExceptionFlags: 00000000<br>
            NumberParameters: 0<br>
<br>
            FAULTING_THREAD:  00000ef4<br>
<br>
            DEFAULT_BUCKET_ID:  STATUS_BREAKPOINT<br>
<br>
            PROCESS_NAME:  VirtualBox.exe<br>
<br>
            ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION}  Breakpoint<br>
            A breakpoint has been reached.<br>
<br>
            EXCEPTION_CODE: (HRESULT) 0x80000003 <a href="tel:%282147483651" value="+12147483651" target="_blank">(2147483651</a><br></div>
            <tel:%282147483651>) - One or more arguments are invalid<div><div class="h5"><br>
<br>
            MOD_LIST: <ANALYSIS/><br>
<br>
            NTGLOBALFLAG:  0<br>
<br>
            APPLICATION_VERIFIER_FLAGS:  0<br>
<br>
            ADDITIONAL_DEBUG_TEXT:  Followup set based on attribute<br>
            [Is_ChosenCrashFollowupThread] from Frame:[0] on<br>
            thread:[PSEUDO_THREAD]<br>
<br>
            LAST_CONTROL_TRANSFER:  from 0143bea0 to 0145ed68<br>
<br>
            PRIMARY_PROBLEM_CLASS:  STATUS_BREAKPOINT<br>
<br>
            BUGCHECK_STR:<br>
            APPLICATION_FAULT_STATUS_<u></u>BREAKPOINT_NULL_POINTER_READ<br>
<br>
            STACK_TEXT:<br>
            03a3ca98 0145ed68 virtualbox!UIMachineView::<u></u>maxGuestSize+0x18<br>
            03a3cab0 0143bea0<br>
            virtualbox!UIFrameBuffer::<u></u>VideoModeSupported+0x30<br>
            03a3cac8 6927c724 vboxc!<u></u>vmmdevVideoModeSupported+0x74<br>
            03a3caec 690b4edc vboxdd!vmmdevRequestHandler+<u></u>0xecc<br>
            03a3fb5c 72f198d1 vboxvmm!IOMIOPortWrite+0x91<br>
            03a3fb84 72f0891f vboxvmm!<u></u>HWACCMR3RestartPendingIOInstr+<u></u>0xcf<br>
            03a3fba4 72ea303c vboxvmm!<u></u>emR3ExecuteIOInstruction+0x1c<br>
            03a3fc78 72ea3589 vboxvmm!emR3HwaccmHandleRC+<u></u>0x189<br>
            03a3fc8c 72ea3788 vboxvmm!emR3HwAccExecute+0x168<br>
            03a3fcb0 72ea0d84 vboxvmm!EMR3ExecuteVM+0x274<br>
            03a3fcd8 72efb2aa vboxvmm!<u></u>vmR3EmulationThreadWithId+<u></u>0x45a<br>
            03a3fcf8 72efb2f4 vboxvmm!vmR3EmulationThread+<u></u>0x14<br>
            03a3fd0c 69ca1523 vboxrt!rtThreadMain+0x33<br>
            03a3fd38 69ce539b vboxrt!rtThreadNativeMain+0x6b<br>
            03a3fd58 6bb6c556 msvcr100!_endthreadex+0x3f<br>
            03a3fd90 6bb6c600 msvcr100!_endthreadex+0xce<br>
            03a3fd9c 76b4ed6c kernel32!BaseThreadInitThunk+<u></u>0xe<br>
            03a3fda8 7722377b ntdll!__RtlUserThreadStart+<u></u>0x70<br>
            03a3fde8 7722374e ntdll!_RtlUserThreadStart+0x1b<br>
<br>
<br>
            STACK_COMMAND:  .cxr 0000000003A3C7B4 ; kb ; dds 3a3ca98 ; kb<br>
<br>
            FOLLOWUP_IP:<br>
            VirtualBox!UIMachineView::<u></u>maxGuestSize+0<br>
            [c:\vboxbuild\virtualbox\4.2.<u></u>8\src\src\vbox\frontends\<u></u>virtualbox\src\runtime\<u></u>uimachineview.cpp<br>
            @ 701]<br>
            0145ed50 83ec0c          sub     esp,0Ch<br>
<br>
            FAULTING_SOURCE_CODE:<br>
                697:                       RT_MAKE_U64(maxSize.height(),<br>
            maxSize.width()));<br>
                698: }<br>
                699:<br>
                700: QSize UIMachineView::maxGuestSize()<br>
             >  701: {<br>
                702:     uint64_t u64Size =<br>
            ASMAtomicReadU64(&m_<u></u>u64MaxGuestSize);<br>
                703:     return QSize(int(RT_HI_U32(u64Size)),<br>
            int(RT_LO_U32(u64Size)));<br>
                704: }<br>
                705:<br>
                706: QSize UIMachineView::guestSizeHint()<br>
<br>
<br>
            SYMBOL_NAME:  virtualbox!UIMachineView::<u></u>maxGuestSize+0<br>
<br>
            FOLLOWUP_NAME:  MachineOwner<br>
<br>
            MODULE_NAME: VirtualBox<br>
<br>
            IMAGE_NAME:  VirtualBox.exe<br>
<br>
            DEBUG_FLR_IMAGE_TIMESTAMP:  51420e3b<br>
<br>
            FAILURE_BUCKET_ID:<br>
            STATUS_BREAKPOINT_80000003_<u></u>VirtualBox.exe!UIMachineView::<u></u>maxGuestSize<br>
<br>
<br>
            BUCKET_ID:<br>
            APPLICATION_FAULT_STATUS_<u></u>BREAKPOINT_NULL_POINTER_READ_<u></u>virtualbox!UIMachineView::<u></u>maxGuestSize+0<br>
<br>
<br>
            WATSON_STAGEONE_URL:<br>
            <a href="http://watson.microsoft.com/StageOne/VirtualBox_exe/4_2_8_0/51420e3b/unknown/0_0_0_0/bbbbbbb4/80000003/00000000.htm?Retriage=1" target="_blank">http://watson.microsoft.com/<u></u>StageOne/VirtualBox_exe/4_2_8_<u></u>0/51420e3b/unknown/0_0_0_0/<u></u>bbbbbbb4/80000003/00000000.<u></u>htm?Retriage=1</a><br>


<br>
<br>
            Followup: MachineOwner<br>
            ---------<br>
<br>
            --<br>
            -- Ribhi<br>
<br>
<br>
<br>
<br>
        --<br>
        -- Ribhi<br>
<br>
<br>
<br>
<br>
    --<br>
    -- Ribhi<br>
<br>
<br>
<br>
<br>
--<br>
-- Ribhi<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
vbox-dev mailing list<br>
<a href="mailto:vbox-dev@virtualbox.org" target="_blank">vbox-dev@virtualbox.org</a><br>
<a href="https://www.virtualbox.org/mailman/listinfo/vbox-dev" target="_blank">https://www.virtualbox.org/<u></u>mailman/listinfo/vbox-dev</a><br>
<br>
</blockquote>
<br>
<br>
-- <br>
ORACLE Deutschland B.V. & Co. KG   Michael Thayer<br>
Werkstrasse 24                     VirtualBox engineering<br>
71384 Weinstadt, Germany           mailto:<a href="mailto:michael.thayer@oracle.com" target="_blank">michael.thayer@oracle.<u></u>com</a><br>
<br>
Hauptverwaltung: Riesstr. 25, D-80992 München<br>
Registergericht: Amtsgericht München, HRA 95603<br>
Geschäftsführer: Jürgen Kunz<br>
<br>
Komplementärin: ORACLE Deutschland Verwaltung B.V.<br>
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande<br>
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697<br>
Geschäftsführer: Alexander van der Ven, Astrid Kepper, Val Maher<br>
</blockquote></div><br><br clear="all"><br>-- <br>-- Ribhi
</div>