git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: httpd and php integration


On 10/18/2018 04:57 PM, Rainer Jung wrote:
Am 18.10.2018 um 21:55 schrieb Dennis Clarke:
On 10/18/2018 03:42 PM, Rainer Jung wrote:
Am 18.10.2018 um 21:18 schrieb Dennis Clarke:
On 10/18/2018 02:12 PM, Daniel Ruggeri wrote:
php: "5.6.38"


I do build PHP 7.x myself including recent library versions both on some Linux platforms as well as on Solaris Sparc. But the typical use is via PHP-FPM, not mod_php. So httpd integration is done via mod_proxy_fcgi which is part of httpd nowadays. I do not test PHP with the httpd test suite, only with the tests that come with PHP itself.

Yes, I see the php-fpm approach and ye old mod_php was fine for php 5.x
world but the world has moved onwards.

When running the test suite I typically get about 50-80 test failures on Linux and 150-200 test failures on Solaris (of about 13000 non-skipped tests).

I get outright SIGBUS core dump :-(

Yes, I sometimes get them and try to get them analyzed (by myself) and fixed (by the PHP people). On Solaris Sparc the SIGBUS almost always comes from bad alignment, where an 8 byte type is not located at an address divisible by 8. X86_64 is not sensible to this and of course the PHP people do not typically test on Sparc.

*nod*

Concerning the 7.2.8 failure: the biggest difference between our setups is probably the compiler. I wanted to keep deltas to the mostly used platform Linux small, so I build using GCC (which I compile myself).

You and I seem to be the last people still bootstrapping gcc on Solaris
sparc but that is another discussion on another maillist ;-)

The alignment in question could well be sensible to the compiler used. Furthermore I am doing still 32 bit builds, and it looks like you are doing 64 bit builds.

Pure 64-bit has been my way for almost the last decade. I think I waved
farewell to Solaris 8 back in 2008 and that resulted in a near revolt
within "Blastwave" because, well, money.  That is an old story.  Also we
all thought OpenSolaris was going to change the landscape.  Another old
story.  However my 64-bit stack has been the floor plan stuff that kept
a small finance company running production software for many years and
that included recent Apache httpd and php and the usual stuff needed for
Wordpress sites and a lot of custom internal stuff.  Gets more difficult
every day to deal with updates however and here we are looking at httpd
with tls 1.3 and with httpd ver 2.4.37.  All good stuff to be sure.


Looking at your issue

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

I did not myself observe this problem. It looks like a pcre problem,

I was thinking the same and built my own.

beta $ file /usr/local/bin/pcretest
/usr/local/bin/pcretest: ELF 64-bit MSB executable SPARCV9 Version 1, UltraSPARC3 Extensions Required, dynamically linked, not stripped
beta $
beta $ /usr/local/bin/pcretest -C
PCRE version 8.40 2017-01-11
Compiled with
  8-bit support
  UTF-8 support
  16-bit support
  UTF-16 support
  32-bit support
  UTF-32 support
  Unicode properties support
  No just-in-time compiler support
  Newline sequence is LF
  \R matches all Unicode newlines
  Internal link size = 4
  POSIX malloc threshold = 10
  Parentheses nest limit = 250
  Default match limit = 10000000
  Default recursion depth limit = 10000000
  Match recursion uses heap
beta $

Works very very well. So I am surprised at the alignment. In fact I have *had* it running neatly for a while. I often wondered what that internal
link size really means ... hrmmm .. 4 ? 32-bit? Could be a red herring.

not really a PHP problem. The pcre they bundle in 7.2.8 is version 8.41. Recent for 8.x would be 8.42, but even in 7.2.11 it is still at 8.41. On the other hand, I did not find an immediate information, that 8.42 fixes an alignment problem in the jit. But it does contain quite a few jit changes.

OKay .. I am going back to the source well and perhaps bootstrap GCC 8.x
again and why not? It has been a over a month since I looked.


You debugger output shows jump = 0x101e2915c. This address is not divisible by 8, so it seems it confirms the alignment problem.


 0x101e2915c ??

Not sure where you are seeing that but .. I am going back to start over
with some updates and possibly a new gcc bootstrap and pcre and whatever
else I can throw at the wall here. Really the Apache 2.4.37 ( today 37
and tomorrow 38? ) is what I am aiming for.


You could try to reproduce the problem by compiling pcre 8.41 standalone and run the pcre test suite.

Yep. That first.

Uf you can reproduce, you can check, whether it is goine in 8.42 and then at least point the php people to that finding, asking them for an upgrade. Finally you can also try to add pcre 8.42 into your php source tree under ext/pcre/pcrelib.

I may do both.  Actually ... now that I think on it.

It seems PHP does not change any of the files, but you would also need to add the generated files config.h, pcre_chartables.c and pcre.h. You can probably get those by first running configure and maybe also make for a standalone pcre 8.42.

All good thinking ... thank you.


Concerning your foo.php script, I get the same results, but it starts working when using INPUT_ENV. I don't know what the definition of INPUT_SERVER for PHP CLI is. At least for PHP with FCGI it seems to be known that INPUT_SERVER doesn't work well. So probably not something specific to your build.

Not worth digging into.  For now.  That would be like moving around the
deck chairs on the Titanic.

Thank you Rainer.

Dennis Clarke