<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV id=yiv2007561995>
<TABLE id=yiv2007561995bodyDrftID class=yiv2007561995 border=0 cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD style="FONT-FAMILY: arial; FONT-SIZE: 10pt" id=yiv2007561995drftMsgContent>
<DIV>Frank,</DIV>
<DIV> </DIV>
<DIV>Thanks for the update.</DIV>
<DIV> </DIV>
<DIV>Yes, the real cause is something to do with physical pages. Somehow, pages are not supposed to be updated get flushed, then cause the file to be written, but the file is opened for read, so cause the write to receive ACCESS DENIED error.</DIV>
<DIV> </DIV>
<DIV>I debugged Windows code, MmFlushSection()  => <FONT size=2>
<DIV>MiFlushSectionInternal()</DIV>
<DIV> </DIV>
<DIV>the error is inside <FONT size=2>MiFlushSectionInternal() , you can google to find some source code on this function to get some clues, it basically check dirty pages, if found, then send a write request to update the file using the following code:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV><FONT size=2><FONT size=2>
<DIV>Status = IoSynchronousPageWrite (ControlArea->FilePointer,</DIV>
<DIV> Mdl,</DIV>
<DIV>(PLARGE_INTEGER)&StartingOffset,</DIV>
<DIV>&IoEvent,</DIV>
<DIV>IoStatus );</DIV></FONT></FONT></FONT></DIV>
<DIV> </DIV>
<DIV>Let me know if you need more helps,</DIV>
<DIV> </DIV>
<DIV>Huihong<BR><BR>--- On <B>Thu, 9/29/11, Frank Mehnert <I><frank.mehnert@oracle.com></I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px"><BR>From: Frank Mehnert <frank.mehnert@oracle.com><BR>Subject: Re: [vbox-dev] [RESOLVED] vbox bug causing Windows system cache problems?<BR>To: vbox-dev@virtualbox.org<BR>Date: Thursday, September 29, 2011, 11:38 AM<BR><BR>
<DIV class=yiv2007561995plainMail>Huihong,<BR><BR>unfortunately this isn't really a fix. There are two code paths in the HGCM<BR>code to share data between guest and host. The VBGLR0_CAN_USE_PHYS_PAGE_LIST<BR>flag is set if the guest can use lists of physical pages. If you remove that<BR>condition, the old (slower) code is used. This is only a workaround but we<BR>have to find the correct fix for the real bug. Though this workaround might<BR>help you for the time being.<BR><BR>Thanks for your help anyway,<BR><BR>Frank<BR><BR>On Thursday 29 September 2011 19:38:05 Huihong Luo wrote:<BR>> r36201 caused this issue, kind of weird.<BR>>  <BR>> VMMDev.cpp<BR>>  <BR>> this condition:<BR>>  <BR>> && requestHeader.requestType != VMMDevReq_GetHostVersion<BR>>  <BR>> After I removed this condition from latest svn code, the cache error no<BR>> longer displays. <BR>> Is there any special call to make from
 guest addition to ensure the above<BR>> condition?<BR>> <BR>> --- On Thu, 9/29/11, Huihong Luo <<A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com" rel=nofollow target=_blank>huisinro@yahoo.com</A>> wrote:<BR>> <BR>> <BR>> From: Huihong Luo <<A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com" rel=nofollow target=_blank>huisinro@yahoo.com</A>><BR>> Subject: Re: [vbox-dev] vbox bug causing Windows system cache problems?<BR>> To: "Vitali Pelenjow" <<A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=Vitali.Pelenjow@oracle.com" rel=nofollow target=_blank>Vitali.Pelenjow@oracle.com</A>><BR>> Cc: <A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" rel=nofollow target=_blank>vbox-dev@virtualbox.org</A><BR>> Date: Thursday, September 29, 2011, 8:32 AM<BR>> <BR>> <BR>> <BR>> <BR>> <BR>> <BR>> <BR>>
 Vitali,<BR>>  <BR>> No problem, I've been doing that. Now narrowed down to r36210 - r36190,<BR>> where r36210 has the bug, but r36190 works. <BR>> I will go further. Most likely a bug in vmm.<BR>>  <BR>> - huihong<BR>> <BR>> --- On Thu, 9/29/11, Vitali Pelenjow <<A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=Vitali.Pelenjow@oracle.com" rel=nofollow target=_blank>Vitali.Pelenjow@oracle.com</A>> wrote:<BR>> <BR>> <BR>> From: Vitali Pelenjow <<A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=Vitali.Pelenjow@oracle.com" rel=nofollow target=_blank>Vitali.Pelenjow@oracle.com</A>><BR>> Subject: Re: [vbox-dev] vbox bug causing Windows system cache problems?<BR>> To: "Huihong Luo" <<A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com" rel=nofollow target=_blank>huisinro@yahoo.com</A>><BR>> Cc: <A
 href="http://us.mc1603.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" rel=nofollow target=_blank>vbox-dev@virtualbox.org</A><BR>> Date: Thursday, September 29, 2011, 1:58 AM<BR>> <BR>> <BR>> Hi Huihong,<BR>> <BR>> we would appreciate, if you could narrow down the changeset, which<BR>> introduced the regression.<BR>> This would be a great help. The changeset range is still too wide to<BR>> have a guess.<BR>> <BR>> Thanks,<BR>> Vitali.<BR>> <BR>> Huihong Luo wrote:<BR>> > After last few days' buiding different OSE revisions, the bug exists<BR>> > between<BR>> > r36100 - r36222 (Feb 28, 11 - Mar-09, 11)<BR>> > if you have some wild guess on which code change may have caused that,<BR>> > let me know, to save some time.<BR>> > Otherwise I will continue the brutal force way of narrowing down the<BR>> > code set that caused the bug.<BR>> ><BR>> > --- On *Tue,
 9/27/11, Huihong Luo /<<A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com" rel=nofollow target=_blank>huisinro@yahoo.com</A>>/* wrote:<BR>> >     From: Huihong Luo <<A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com" rel=nofollow target=_blank>huisinro@yahoo.com</A>><BR>> >     Subject: Re: [vbox-dev] vbox bug causing Windows system cache<BR>> >     problems?<BR>> >     To: <A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" rel=nofollow target=_blank>vbox-dev@virtualbox.org</A><BR>> >     Date: Tuesday, September 27, 2011, 12:33 PM<BR>> ><BR>> >     After some backing tracing, this error occurs from vbox 4.1.0<BR>> >     r73009, and works well with 4.0.12 and before.<BR>>
 >     The windows cache manager displays an error message as attached<BR>> >     from our driver.<BR>> >     We run exactly the same guest (same disk, same configure) using<BR>> >     different versions of vbox downloaded from virtualbox.org.<BR>> >     so very likely there is a bug in vbox between 4.0.12 and 4.1.0<BR>> ><BR>> >     --- On *Mon, 9/26/11, Huihong Luo /<<A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com" rel=nofollow target=_blank>huisinro@yahoo.com</A>>/* wrote:<BR>> ><BR>> ><BR>> >         From: Huihong Luo <<A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com" rel=nofollow target=_blank>huisinro@yahoo.com</A>><BR>> >         Subject:
 [vbox-dev] vbox bug causing Windows system cache<BR>> >         problems?<BR>> >         To: <A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" rel=nofollow target=_blank>vbox-dev@virtualbox.org</A><BR>> >         Date: Monday, September 26, 2011, 6:47 PM<BR>> ><BR>> >         After one week of debugging, there might be a bug in vbox that<BR>> >         causes Windows MmFlushSection() to behave weirdly.<BR>> >         We have a Windows driver working very well on old versions of<BR>> >         vbox, but not on v4. The problem was caused by MmFlushSection,<BR>> >         which wrongly updates files that are opened for read. In
 other<BR>> >         words, MmFlushSection() causes files to write even if they are<BR>> >         opened for read, and thus get ACCESS denined error.<BR>> >         It seems somehow the page dirty bit is not set correctly in<BR>> >         some case, because MmFlushSection checks dirty pages.<BR>> >         I first thought there might be some bugs in our driver's code,<BR>> >         but strange thing is that it works fine before with old<BR>> >         versions of vbox, so I post this message just in case<BR>> >         something wrong with vbox code.<BR>> ><BR>> ><BR>> >         -----Inline Attachment
 Follows-----<BR>> ><BR>> >         _______________________________________________<BR>> >         vbox-dev mailing list<BR>> >         <A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" rel=nofollow target=_blank>vbox-dev@virtualbox.org</A><BR>> >     <BR>> >   <<A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" rel=nofollow target=_blank>http://us.mc1603.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org</A><BR>> >> <A href="http://vbox.innotek.de/mailman/listinfo/vbox-dev" rel=nofollow target=_blank>http://vbox.innotek.de/mailman/listinfo/vbox-dev</A><BR>> ><BR>> ><BR>> >     -----Inline Attachment Follows-----<BR>> ><BR>> > 
    _______________________________________________<BR>> >     vbox-dev mailing list<BR>> >     <A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=vbox-dev@www.virtualbox.org" rel=nofollow target=_blank>vbox-dev@www.virtualbox.org</A><BR>> > <BR>> >   <<A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=vbox-dev@www.virtualbox" rel=nofollow target=_blank>http://us.mc1603.mail.yahoo.com/mc/compose?to=vbox-dev@www.virtualbox</A><BR>> >.org> <A href="https://www.virtualbox.org/mailman/listinfo/vbox-dev" rel=nofollow target=_blank>https://www.virtualbox.org/mailman/listinfo/vbox-dev</A><BR>> ><BR>> > _______________________________________________<BR>> > vbox-dev mailing list<BR>> > <A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" rel=nofollow target=_blank>vbox-dev@virtualbox.org</A><BR>>
 > <A href="https://www.virtualbox.org/mailman/listinfo/vbox-dev" rel=nofollow target=_blank>https://www.virtualbox.org/mailman/listinfo/vbox-dev</A><BR><BR>-- <BR>Dr.-Ing. Frank Mehnert<BR>Senior Manager Software Development Desktop Virtualization, VirtualBox<BR>ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | 71384 Weinstadt, Germany<BR><BR>Hauptverwaltung: Riesstr. 25, D-80992 München<BR>Registergericht: Amtsgericht München, HRA 95603<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: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven<BR></DIV><BR>-----Inline Attachment Follows-----<BR><BR>
<DIV class=yiv2007561995plainMail>_______________________________________________<BR>vbox-dev mailing list<BR><A href="http://us.mc1603.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" rel=nofollow target=_blank>vbox-dev@virtualbox.org</A><BR><A href="https://www.virtualbox.org/mailman/listinfo/vbox-dev" rel=nofollow target=_blank>https://www.virtualbox.org/mailman/listinfo/vbox-dev</A><BR></DIV></BLOCKQUOTE></TD></TR></TBODY></TABLE></DIV></td></tr></table>