View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001647 | Xdebug | Uncategorized | public | 2019-03-08 01:56 | 2019-03-21 20:43 |
Reporter | dinu | Assigned To | derick | ||
Priority | normal | Severity | crash | Reproducibility | sometimes |
Status | closed | Resolution | fixed | ||
Platform | php7 + php-fpm | OS | CentOS | ||
Product Version | 2.7.0 | ||||
Target Version | 2.7.1 | Fixed in Version | 2.7.1 | ||
Summary | 0001647: Memory corruption when a conditional breakpoint is used | ||||
Description | Only with 2.7.x (0 and RC2 tested), 2.6.1 doesn't exhibit the same behavior. [08-Mar-2019 03:42:12] WARNING: [pool www] child 15249 said into stderr: "zend_mm_heap corrupted" Reproducible 100%, on every request. by removing the breakpoints, it works again. Other breakpoints work, I can't produce a minimal TC because I don't know which breakpoint was triggering the error. | ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 7.2.10-7.2.14 | ||||
|
More details: it seems it happens on conditional BPs, but not straight from the start; I think it happens when it hits a conditional BP after an unconditional BP, or something of sorts. |
|
Seems there's a 0000020:0000020% chance of triggering this bug by adding a conditional breakpoint |
|
Hi, I can't quite think what has changed here, but can you provide more information? https://xdebug.org/support.php#remote lists exactly what I would need. cheers, |
|
I added crash report as "private" (because of old habit). I don't know Mantis, if you don't get a notification it's https://bugs.xdebug.org/view.php?id=1647#c4957 |
|
Additional note: only happens on conditional breakpoint; removing the condition, it works. |
|
I'm running into a similar problem when debugging an old Magento version with the PHP 7.3.3 and XDebug 2.7.0. I have the OpCache turned off (it crashes, too, when it's turned on). I ran GDB with a breakpoint on the final write() call which sends the "zend_mm_heap corrupted" to get the backtrace. This is what I get #0 write () at ../sysdeps/unix/syscall-template.S:81 When I look at the remote debug log the last items I get are: [180867] When I strace the process the last thing I see before the error is the "run" command. BUT!!!! Now suddenly it's working after not working for the past day. I turned off the remote log and suddenly it's working. And I don't know why. I turned on the Opcache and it's working too, now. Flummoxed. But I'll leave the backtrace there in case it helps. If not, feel free to delete this note. |
|
I, too, feel this and https://bugs.xdebug.org/view.php?id=1649 are somehow related: I noticed both after installing 2.7.0 and always in immediate proximity in the FPM log files. Could it be that on the pipe work you did for allowing Xdebug to work with fork() you are breaking some of the handles you use for logging/communication? |
|
I don't thinks so for my experience. I started, stopped, restarted, and did a number of things over again. The only thing that triggered this for me was running "yum update". The only thing that seems to have fixed it was restarting AFTER I had run gdb and subsequently disabled the remote log to do another strace. It's weird. |
|
yes, previous note was @derick. |
|
... and now it's not working for me again. I did a few successful debugs last night then went away, I came back this morning and it's happening again! It looks like my VM might have restarted. Then I went into my 15-xdebug.ini file, turned on remote_logging and restarted PHP-FPM I debugged a request and it worked. Then I went into my 15-xdebug.ini file, turned remote_logging off and restarted PHP-FPM I debugged a request and it continued to work. |
|
... and then it stops working. And this time I get the strace write(5, "188\0<?xml version=\"1.0\" encoding"..., 193) = 193 |
|
Incidentally, the same issue with xdebug 2.7 happens on PHP 7.2.16 as well. In the yum update I did recently it also updated xdebug to 2.7 for PHP 7.2 with the same issue. Downgrading to 2.6.1 works as a temporary fix on PHP 7.2 for me. |
|
It triggers for me as well when I use conditional BPs. But there are more conditions to be revealed, as using a conditional BP itself doesn't necessary lead to the crash. |
|
I can reproduce this easily now, with your script dinu. |
|
Fixed in GIT for Xdebug 2.7.1. |
|
Cool, thanks! Can this be related to the logging problem related in https://bugs.xdebug.org/view.php?id=1649 ? |
|
No dinu, that seems unrelated. |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-03-08 01:56 | dinu | New Issue | |
2019-03-09 09:45 | dinu | Note Added: 0004950 | |
2019-03-10 14:21 | dinu | Note Added: 0004951 | |
2019-03-10 16:48 | derick | Assigned To | => derick |
2019-03-10 16:48 | derick | Status | new => feedback |
2019-03-10 16:48 | derick | Note Added: 0004953 | |
2019-03-12 16:11 | dinu | Status | feedback => assigned |
2019-03-12 16:16 | dinu | Note Added: 0004958 | |
2019-03-12 16:20 | dinu | Note Added: 0004959 | |
2019-03-13 21:46 | kschroeder | Note Added: 0004963 | |
2019-03-13 21:53 | dinu | Note Added: 0004964 | |
2019-03-13 22:22 | kschroeder | Note Added: 0004965 | |
2019-03-14 03:17 | dinu | Note Added: 0004966 | |
2019-03-14 14:37 | kschroeder | Note Added: 0004967 | |
2019-03-14 15:13 | kschroeder | Note Added: 0004968 | |
2019-03-14 15:32 | kschroeder | Note Added: 0004969 | |
2019-03-20 14:24 | onkeltem | Note Added: 0004971 | |
2019-03-21 12:49 | derick | Status | assigned => confirmed |
2019-03-21 12:49 | derick | Note Added: 0004972 | |
2019-03-21 12:49 | derick | Target Version | => 2.7.1 |
2019-03-21 13:58 | derick | Summary | Crash with "zend_mm_heap corrupted" => Memory corruption when a conditional breakpoint is used |
2019-03-21 14:11 | derick | Status | confirmed => closed |
2019-03-21 14:11 | derick | Resolution | open => fixed |
2019-03-21 14:11 | derick | Fixed in Version | => 2.7.1 |
2019-03-21 14:11 | derick | Note Added: 0004973 | |
2019-03-21 14:31 | dinu | Note Added: 0004976 | |
2019-03-21 20:43 | derick | Note Added: 0004977 | |
2020-03-12 16:35 | derick | Category | Usage problems (Wrong Results) => Variable Display |
2020-03-12 16:38 | derick | Category | Variable Display => Uncategorized |