Fwd: Crash in MapGuide Web Extensions upon web server shutdown

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fwd: Crash in MapGuide Web Extensions upon web server shutdown

Yves Dierick
Cross-posted from mapguide-users list as suggested.

---------- Forwarded message ----------
From: Yves Dierick <[hidden email]>
Date: Thu, Aug 22, 2013 at 10:39 AM
Subject: Crash in MapGuide Web Extensions upon web server shutdown
To: [hidden email]


Hi all,

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

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.

Has anyone experienced a similar issue?

Regards,

Yves
_______________________________________________
mapguide-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals