NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Guru master

Joined: 24 Jul 2009
Posts: 707
Reply with quote
On the other hand, just because they say that to you doesn't mean they are not investigating the problem.

I have a dialog going with Dmitri at this very moment looking at the problem.

Jay might be referring to yours being the only report through the frontend support system. My report was through the beta testing system.
View user's profileFind all posts by plugnplaySend private message
Guru master

Joined: 24 Jul 2009
Posts: 707
Reply with quote
This probably should be a different thread by now Smile

In my case I was able to trace the problem to my using an auto_prepend script which was causing DebugBreak() to fail. I was using DebugBreak() to test with because I didn't have a project setup for anything on the new server. I created a project and debugged through the server using breakpoints, which appears to work fine.

Now working with Dmitri to try and find out why this auto_prepend script and DebugBreak() cause the PHP exception. Might even be a PHP 7 bug.
View user's profileFind all posts by plugnplaySend private message
Guru master

Joined: 24 Jul 2009
Posts: 707
Reply with quote
The cause of PHP crashing for me appears to be having a global variable being assigned to an object in an auto_prepend_file script, together with using DebugBreak() with an argument. It is possibly a very unusual scenario and could be a PHP 7 bug.

If I had configured a project for debugging and used that for testing, it is unlikely I would have had a problem.

In other respects at the moment PHP 7 debugging appears to be working fine.
View user's profileFind all posts by plugnplaySend private message


Joined: 10 Apr 2014
Posts: 51
Reply with quote
Hey 'plugnplay'

With regards to your setup where you have the debugger running, what OS and webserver setup do you have in place?

In our case we have the following:
- CentOS 7.2.1511
- php 7.0.6 installed through the remi repo
- nginx 1.6.3
- php-fpm 7.0.6-3.el7 (also installed through remi)

Even after installing the latest build of phped and uploading the debugger module in place on the server, I am still seeing the segfault error each time a debug session is started and the debugger fails to go.

I am convinced the problem lies within the debugger itself and everything else about this server is perfectly fine.

p.s. I have no auto-prepend or auto-append stuff either. Very basic site config actually.
View user's profileFind all posts by probc2Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 7835
Reply with quote
segfaults in php7 are expected.
Look at their changelog for 7.0.7 http://php.net/ChangeLog-7.php#7.0.7
Bug #72162 -- use after free
Bug #72101 -- crash on complex code
etc
All these bugs are not fixed in 7.0.6 and btw there are many other fatal bugs in 7.0.7 to be fixed.

RE Neil, he got rid of crashes after server restart.
Perhaps, he "re-loaded" apache to pick new php configuration. This is a known way to get crashes.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Guru master

Joined: 24 Jul 2009
Posts: 707
Reply with quote
I'm in the process of replacing my existing web servers with newer ones. These new ones all have:

* CentOS 7.2.1511
* Apache 2.4.6
* At the time of the issue using PHP 7.0.5 but now 7.0.6
* So that means it is now PHP 7.0.6 (fpm-fcgi) built: May 4 2016 18:32:28
* Zend OPcache 7.0.6 (even when using PHP 7.0.5, but turning OPcache off did not change issue)
* nginx 1.9.14
* Plesk 12.5 latest build, which is also automatically updating PHP, nginx and Apache to what Plesk consider to be the latest stable builds (normally a few weeks behind the latest version release)

These are Plesk maintained builds of PHP from the Plesk repository; it was actually why I chose Plesk for this because they are now managing the PHP builds. The core CentOS PHP is no longer used for web services (it can be, but I don't). From the Plesk admin you can switch sites between any stable release of PHP between 5.2 and 7.0

The server I had the debug problems on was the new staging server, which is identical to all of the others. It is possible it had not been restarted since it was first setup.

Prior to the restart I could 100% reproduce the problem using specific scripts where one of those scripts was an auto-prepend. Including that script directly so it was no longer an auto-prepend worked fine. My testing gave me good reason to believe PHP 7 was hiding a static class from the prepend script. I think the debugger trying to access that class (which it should be able to) and that was causing the crash.

I could also work around the problem by using a couple of specific actions and the problem only occurred when using DebugBreak(). It did not occur when I used breakpoints.

Since the restart and whilst it was still on PHP 7.0.5, I could no longer reproduce the PHP crashes.

It doesn't sound like the same crash probc2 was getting.
View user's profileFind all posts by plugnplaySend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7835
Reply with quote
If there is a problem with stability (either in php or in debugger), it makes sense to try to reproduce the problem using php command line. If it is reproduced (even in a few runs out of many), you can run the same under valgrind's memcheck tool. Very good chances it will find memory errors, and what's more important it may show callstack and location where the problem is. If it is in php, you can submit them bug report. If it's debugger, you're welcome to provide us with the results.
You may want to run valgrind like below
valgrind --tool=memcheck --main-stacksize=50000000 --verbose --num-callers=24 --gen-suppressions=all --log-file=programname.vg-%p.log php /path/to/your/script yourscriptarg1 yourscriptarg2 ...
View user's profileFind all posts by dmitriSend private messageVisit poster's website
PHP version 7
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 3 of 3  

  
  
 Reply to topic