View Issue Details

IDProjectCategoryView StatusLast Update
0001283Xdebug(No Category)public2016-05-10 21:28
Reporterrudis1261Assigned Toderick 
PriorityhighSeverityblockReproducibilityalways
Status resolvedResolutionno change required 
PlatformLinuxOSDebianOS Version8 (Jessie)
Product Version2.4.0 
Target VersionFixed in Version 
Summary0001283: Docker PHP7 + xdebug dumping core
DescriptionI just can't get xdebug working with PHP7 in a docker file.

It keeps core dumping. I have made sure that I build from the Github repository which is suppose to be on master and tagged 2.4.0, but it doesn't reflect in my php-info. It still shows up as 2.4.0RC3

How can I provide you guys with the information you would need to resolve this?


docker logs -f php-fpm

[04-Mar-2016 21:48:27] NOTICE: fpm is running, pid 42
[04-Mar-2016 21:48:27] NOTICE: ready to handle connections
[04-Mar-2016 21:52:56] WARNING: [pool www] child 43 exited on signal 11 (SIGSEGV - core dumped) after 269.243916 seconds from start
[04-Mar-2016 21:52:56] NOTICE: [pool www] child 45 started


As far as I can tell, as soon as it hits this singleton call it borks hard. This is a very standard piece of code:

    public static function getConfig()
    {
        if(is_null(self::$me))
            self::$me = new Config();
        return self::$me;
    }
Steps To ReproduceSince I use docker, steps to reproduce it would be to build the docker image:
https://github.com/drpain/DockIt

The Dockerfile in question is:
https://github.com/drpain/DockIt/blob/master/images/php-fpm/Dockerfile

To build it do this:
https://github.com/drpain/DockIt.git
cd DockIt
chmod +x install.sh start.sh
./install.sh # Answer yes for the prompts
./start.sh #to start all the containers if they didn't
TagsNo tags attached.
Operating System
PHP Version7.0.0-7.0.4

Activities

derick

2016-03-04 20:49

administrator   ~0003556

"It keeps core dumping. I have made sure that I build from the Github repository which is suppose to be on master and tagged 2.4.0, but it doesn't reflect in my php-info. It still shows up as 2.4.0RC3"

That's a problem, as it really means you're not using 2.4.0. There is now a PECL package, please use that for installation.

----

As to the docker stuff, I don't use it, and I don't to mess up my system with it either. Which means you need to do more work on this.

First of all, make sure you don't compile Xdebug in an optimised mode. This removes useful information from backtraces. The easiest way probably is to change the "-O2" in the Makefile to "-O0 -ggdb3" after you ran ./configure, and before "make". I believe it's in two locations in the Makefile.

Then, you need to come up with a *command line* script to run that shows the crash by running "php the-script-that-segfaults.php". Doing it through PHP-FPM is much much harder to debug with.

The docker container should have additional tools installed, such as valgrind and gdb. Run the script that segfaults with the following commands on the bash shell (in the docker container). You should also install the php-debug debian package (or equivalent):

export USE_ZEND_ALLOC=0
export ZEND_DONT_UNLOAD_MODULES=0
php the-script-that-segfaults.php
valgrind php the-script-that-segfaults.php
gdb --args php the-script-that-segfaults.php

And then on the GDB prompt:
run

and when it crashes, type:
bt full

Please don't paste the output of all of this into the comment fields, but attach a file with all of it.

rudis1261

2016-03-05 11:23

reporter   ~0003558

Hi Derick,

Thanks for all the info. I will try everything you mentioned starting with istalling the pecl directly. Although that what I tried before manually compiling it.

I am very much a php dev, but I would love to get this resolved, so I will do what you ask. I will get back to you with the results.

Cheers,
Rudi

rudis1261

2016-03-05 12:09

reporter   ~0003559

Stupid question, can I edit the original issue? I can't seem to find where. I would like to remove the phpinfo() dump and rather upload a file with it.

derick

2016-03-05 13:35

administrator   ~0003560

I don't think you can. I'll remove the dump and then you can upload it.

rudis1261

2016-03-05 13:37

reporter   ~0003561

Awesome thank you, I will update with details soon.

rudis1261

2016-03-05 13:38

reporter  

phpinfo.pdf (369,955 bytes)

rudis1261

2016-03-07 18:02

reporter   ~0003566

It must have been timing, since I tried to install it on the day you release V2.4.0, and it must not have propagated to all the pecl repos.

I would like to confirm XDEBUG is working!!!! PHP7 + 2.4.0. Hallleluuuyar! Thanks guys

derick

2016-05-10 21:28

administrator   ~0003593

Perfect. Closing this out then :-)

Issue History

Date Modified Username Field Change
2016-03-04 20:05 rudis1261 New Issue
2016-03-04 20:49 derick Note Added: 0003556
2016-03-04 20:49 derick Assigned To => derick
2016-03-04 20:49 derick Status new => feedback
2016-03-05 11:23 rudis1261 Note Added: 0003558
2016-03-05 11:23 rudis1261 Status feedback => assigned
2016-03-05 12:09 rudis1261 Note Added: 0003559
2016-03-05 13:35 derick Note Added: 0003560
2016-03-05 13:36 derick Additional Information Updated View Revisions
2016-03-05 13:37 rudis1261 Note Added: 0003561
2016-03-05 13:38 rudis1261 File Added: phpinfo.pdf
2016-03-07 18:02 rudis1261 Note Added: 0003566
2016-05-10 21:28 derick Note Added: 0003593
2016-05-10 21:28 derick Status assigned => resolved
2016-05-10 21:28 derick Resolution open => no change required
2016-07-31 12:35 derick Category Debug client (console) => debugclient (debugging tool)
2016-07-31 12:35 derick Category debugclient (debugging tool) => (No Category)