Opened 18 years ago
Last modified 18 years ago
#1747 new defect
Empty PHP_MSHUTDOWN_FUNCTION may be cause of memory leaks and even leads apache to crash with SEGFAULT
Reported by: | Owned by: | mapserverbugs | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapScript-PHP | Version: | 4.8 |
Severity: | normal | Keywords: | |
Cc: |
Description
Don't you think that one should call msCleanup in PHP_MSHUTDOWN_FUNCTION? I expirenced apache crashes,after call to ms_newMapObj when using mapserver-4.8.3 compiled with GDAL support while GDAL is compiled with ECW-support. Problem is due to the fact that call to GDALAllRegister() creates threads to asynchronously process requests to ECW library. I'm not an expert in httpd/modphp internals, and I read comments in map_mapscript.c that PHP_MSSHUTDOWN_FUNCTION should be called at the very end of HTTPD lifetime, but for some reason this is not the case with httpd-2.2.0 and php-5.1.2 - apache calls to php_request_shutdown and then unload php_mapscript, which as result casuse httpd thread to crash. But when I added msCleanup to PHP_MSSHUTDOWN_FUNCTION - this problem disappears. If you need any additional info - please, feel free to contact me.
Attachments (2)
Change History (2)
by , 18 years ago
Attachment: | mapserver-mapscript-cleanup.patch added |
---|
by , 18 years ago
Attachment: | mapserver-mapscript-cleanup.2.patch added |
---|
patch preventing memory leaks/httpd crashes due to lack of call to msClean in PHP_MSHUTOWN_FUNCTION
Note:
See TracTickets
for help on using tickets.
patch preventing memory leaks/httpd crashes due to lack of call to msClean in PHP_MSHUTOWN_FUNCTION