<div dir="ltr"><div>Hi all,</div><div><br></div><div>We are currently experiencing a crash (almost systematic) of our web server process running the web extensions when shutting it down.</div><div> </div><div>The crash itself is an access violation. After some analysis, we think it could be due to an incomplete cleanup of allocated resources in MgUninitializeWebTierInternal(). Indeed, the connection pool is closed in that function, and right after that the ACE library is shutdown. But unfortunately, the SiteManager is not stopped, more precisely the background thread that regularly pings the server(s). As there is a call to sleep(1) in a loop in that thread (which keeps running during shutdown), what happens is that by the time the sleep(1) call returns, the operating system has already unloaded the DLL that hosts the code of the SiteManager (MgMapGuideCommon.dll), as the process is stopping. Therefore, as the code to execute after sleep(1) is no longer present in memory, that causes an access violation. It should probably be wise to stop the site manager background thread before allowing the web server to proceed with unloading the ISAPI extension and shutting down the process. By the way, the boolean flag m_bCheckServersThreadDone is not marked as volatile, couldn't that be an issue?</div>
<div><br></div><div>Our environment(s):</div><div>MapGuide 2.5.0</div><div>Windows 7 (32-bit) or 8 (64-bit)</div><div>IIS Express 8.0</div><div><br></div><div>I did not have time enough to setup a complete MapGuide build environment to debug with symbols (isn't there a build with symbols available somewhere?), so the conclusions here above may not be accurate.</div>
<div><br></div><div>Has anyone experienced a similar issue?</div><div><br></div><div>Regards,</div><div><br></div><div>Yves</div></div>