Bug #78303 [Fbk->NoF]: repeating crashes in php_basename with event-mpm+mod_php

From: Date: Sun, 07 Mar 2021 04:22:13 +0000
Subject: Bug #78303 [Fbk->NoF]: repeating crashes in php_basename with event-mpm+mod_php
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-232605@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78303&edit=1

 ID:               78303
 Updated by:       php-bugs@lists.php.net
 Reported by:      theultramage at gmail dot com
 Summary:          repeating crashes in php_basename with
                   event-mpm+mod_php
-Status:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          *General Issues
 Operating System: FreeBSD 12.0
 PHP Version:      7.3.7
 Assigned To:      nikita
 Private report:   N

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.


Previous Comments:
------------------------------------------------------------------------
[2021-02-23 13:20:31] theultramage at gmail dot com

Ah, it's been a while. Back then I did contact the maintainer and they did undo the most
problematic edit, but left in the disabling of PTHREADS_CHECK section because it was supposedly
malfunctioning and aborting for php74. The patch is still there for php80. Afterwards the segfaults
still kept happening, just in other places, so I gave up.

The most recent version I've been running is PHP 7.3.20 with ZTS and DEBUG. Since aug6 I have
logged a segfault on aug8, oct1, oct12, oct17, nov22. None since then. There have been no changes to
the system or my usage pattern since aug6, so I cannot give effective feedback on why it seemingly
stopped crashing. Either it's just luck, or whatever crawler or exploitbot was directly causing
the crash or causing cpu load that was triggering a race condition, has stopped targeting the
server.

At this point in time, the version numbers have gone up a bit, and this report might not be relevant
anymore. I will add a plan to ugprade to 8.0 (as long as everything installed is confirmed
compatible), but it will take time to get results (or lack of thereof).

------------------------------------------------------------------------
[2021-02-23 11:25:21] cmb@php.net

Any update here?  Has this been fixed in the FreeBSD ports?  Do we
still want to apply an improvement to php-src?

------------------------------------------------------------------------
[2019-07-17 15:24:40] nikic@php.net

If it's possible to restore that code in the FreeBSD port, that would be good. We should
probably also change the check on our side from defined(_REENTRANT) to defined(ZTS), as we perform
the availability check without _REENTRANT and I don't believe this symbol has a dependence on
it. The absence of _REENTRANT might affect other things as well though...

------------------------------------------------------------------------
[2019-07-17 11:46:31] theultramage at gmail dot com

The usage of the routines in the autoconf module you referenced, PTHREADS_FLAGS and PTHREADS_CHECK,
has been deliberately patched out in the freebsd ports tree. This is why the flag isn't being
applied.

I traced the port's svn history and it goes back all the way to 2004 and php 4.3.9. It says
"Fix compilation of thread-safe PHP after the PTHREAD_LIBS change" which might be
referring to some sort of systems code restructuring effort.

Originally, they just removed the freebsd piece of code in PTHREADS_FLAGS:
https://svnweb.freebsd.org/ports/head/lang/php4/files/patch-configure?revision=118610&view=markup&pathrev=160333

It was then changed to remove the invocation of the autoconf macros:
https://svnweb.freebsd.org/ports/head/lang/php4/files/patch-configure.in?revision=161492&view=markup&pathrev=170333

------------------------------------------------------------------------
[2019-07-17 11:03:34] nikic@php.net

I got confused here and mixed up CPPFLAGS and CXXFLAGS... adding to CPPFLAGS is right and should
work, so I'm not sure why it isn't happening.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=78303


--
Edit this bug report at https://bugs.php.net/bug.php?id=78303&edit=1


Thread (11 messages)

« previous php.bugs (#232605) next »