[Mapguide-trac] [mapguide-trac] #2348: Crash in MapGuide Web Extensions upon web server shutdown
MapGuide Open Source
trac_mapguide at osgeo.org
Thu Aug 29 00:00:11 PDT 2013
#2348: Crash in MapGuide Web Extensions upon web server shutdown
-----------------------+----------------------------------------------------
Reporter: ydie22 | Owner:
Type: defect | Status: new
Priority: medium | Milestone:
Component: Web API | Version: 2.5.0
Severity: minor | Keywords: ISAPI crash
External_id: |
-----------------------+----------------------------------------------------
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
--
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/2348>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list