Web Analytics Made Easy -
StatCounter AH00052: child pid [n] exit signal Segmentation fault (11) - CodingForum

Announcement

Collapse
No announcement yet.

AH00052: child pid [n] exit signal Segmentation fault (11)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Apache AH00052: child pid [n] exit signal Segmentation fault (11)

    I upgraded PHP on my Mac from version 7.3.3 (pre-packaged from https://php-osx.liip.ch/) to 8.1.2 with Homebrew and when loading sites I’m getting the error mentioned in the thread title seemingly randomly. There are pages that load normally and then there are other pages that will abort the connection, and I have no idea what is causing this. Does anybody know how to debug this?
    Stop solving problems you don’t yet have!

  • #2
    This is strange: I changed memory_limit from 256M to 512M and then it loaded previously failing pages. Changing back to 256M, it also loaded those pages.
    Stop solving problems you don’t yet have!

    Comment


    • #3
      And back to not working. This is really random. If anybody has any idea how to debug this, please let me know.
      Stop solving problems you don’t yet have!

      Comment


      • #4
        SegFaults are almost always a case of bad or broken memory management, as it literally means that a program is trying to access memory past the limits the OS allocated. Increasing the allocation limit is a band-aid on a deeper problem.

        Silly question from me: Are your server logs overflowing? Last time I had this happen a rogue bit of outdated code was flooding my error.log on every file request until the server just couldn't take it anymore. It is quite literally possible with broken / badly written PHP to hemorrhage so many errors that the memory manger can't handle it.

        Which is a distinct possibility upgrading from PHP 7 to 8. Good deal of changes in there your code might not be ready for. First thing I'd check is what errors and warnings PHP is throwing.
        Walk the dark path, sleep with angels, call the past for help.
        https://cutcodedown.com
        https://medium.com/@deathshadow

        Comment


        • #5
          The last time I developed programs for intel chips is for 80286 CPU. So, my terminologies might be wrong.

          Program development is the same for any CPU. That is, you compile the source then link (bind) the relocatables to create executable.

          It is possible that the executable can get created even if some externals (module) are unresolved. This would mean that the pointer for the missing external contains garbage. It is also possible to load the external during runtime. In which case, if the external module (I think it has the file extension of .SO) is not found, then again, the pointer for that external will be garbage.

          If you are doing a bind, check for warnings that says unresolved externals. The same is true of dynamic linking. Ensure that the required (.SO) module is found.

          In any case, memory violation is a serious bug. If you have the source, then you can examine the error using the dumped memory (if there is any). Otherwise, you'll have to notify the developers and provide them with any informations you have.

          Comment


          • #6
            After a lot more research, trial and error, I think the problem is a conflict between Mac’s built-in Apache httpd and Homebrew’s httpd process, or, more broadly, the server configuration. I was using the built-in server until now (and the package by liip.ch somehow just symlinked its own files) but Homebrew is installing a completely separate one with the new PHP version. I was just loading the new PHP module (libphp7.so) in the old /private/etc/apache2/httpd.conf without changing anything else but Homebrew’s configuration file is in /usr/local/etc/httpd/httpd.conf and loads all its modules from its own server. Apparently what I’m trying do to – loading the new PHP module in the built-in Apache server – doesn’t work as I want, I’ll have to switch all my configurations to the new location.
            Stop solving problems you don’t yet have!

            Comment

            Working...
            X