Opened 11 years ago
Closed 5 years ago
#2348 closed defect (fixed)
Crash in MapGuide Web Extensions upon web server shutdown
Reported by: | ydie22 | Owned by: | jng |
---|---|---|---|
Priority: | medium | Milestone: | |
Component: | Web API | Version: | 2.5.0 |
Severity: | minor | Keywords: | ISAPI crash |
Cc: | External ID: |
Description
This issue refers to a post made in the mapguide-internals and mapguide-users mailing lists on August, 22nd.
We are currently experiencing a crash (almost systematic) of our web server process running the web extensions when shutting it down.
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?
Our environment(s): MapGuide 2.5.0 Windows 7 (32-bit) or 8 (64-bit) IIS Express 8.0
Change History (1)
comment:1 by , 5 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
In 9586: