php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78465 Segfault in MSHUTDOWN
Submitted: 2019-08-27 14:20 UTC Modified: 2021-01-24 17:17 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (100.0%)
From: remi@php.net Assigned:
Status: Open Package: gmagick (PECL)
PHP Version: 7.4.0beta4 OS: GNU/Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
11 + 23 = ?
Subscribe to this entry?

 
 [2019-08-27 14:20 UTC] remi@php.net
Description:
------------
Exactly same issue than https://github.com/Imagick/imagick/issues/295

Same workaround seems to work

PHP_MSHUTDOWN_FUNCTION(gmagick)
{
	DestroyMagick();
	usleep(4242);

	return SUCCESS;
}



Patches

gmagick-bug78465.patch (last revision 2020-02-19 10:17 UTC by remi@php.net)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-08-27 18:02 UTC] danack@php.net
Remi, you can't just add a random sleep to 'fix' bug.

*shuffles feet*

Hey, look over there, an eagle!

*exits room*
 [2020-02-19 10:17 UTC] remi@php.net
The following patch has been added/updated:

Patch Name: gmagick-bug78465.patch
Revision:   1582107421
URL:        https://bugs.php.net/patch-display.php?bug=78465&patch=gmagick-bug78465.patch&revision=1582107421
 [2021-01-24 17:17 UTC] rasmus@php.net
I have looked at this a bit. It is happening on the dlclose(). You can also prevent the crash by setting ZEND_DONT_UNLOAD_MODULES=1 or most likely by compiling PHP itself using -fopenmp. Neither are good solutions though.

Hopefully we can find a real solution, otherwise maybe we add a check to see if PHP itself is compiled with openmp support and if it isn't do the ThreadsResource=1 thing.
 [2022-12-27 10:07 UTC] melindaetinw81 at gmail dot com
ok  for the information you shared. Loved the way you explained everything in this blog.
(https://www.gomedicare.care/)github.com
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 00:01:28 2024 UTC