-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation Fault in Phalcon 1.3.x #2516
Comments
I also have noticed that your test suite is pretty unstable. Take this, for example: https://travis-ci.org/phalcon/cphalcon/builds/26888915 It's a simple CHANGELOG fix, but it broke the whole thing on random PHP versions. This happens on other commits as well. Most are mysterious segfaults. |
Could you tell me this request execution which operations? Or use which Phalcon components, you can rule out under which components are out of the question. |
@klaussilveira do you, by any chance, use Memcache/Libmemcached session adapter and/or Session bags in your app? I've managed to isolate current segfaults a little, which led me to SessionTest and SessionBagTests.
It's interesting that running these two separately does not segfault, but with one after another I can repro this. Here's full gdb: My guess is that there is something wrong with how sessions are destroyed. |
Hello! I have the same problem with Phalcon - stable 1.3.2. I tried with several combinations on my Mac:
but got crashes with 502 Bad Gateway. After Phalcon\Http\Response::send() I check Phalcon\Http\Response::isSent() and successfully log all Phalcon\Http\Response::getContent() with headers. But sometimes with .core, sometimes without it I have the following diagnostic reports: https://github.com/bezl/api/blob/master/php-fpm_2014-07-04-134157_BezlMac.crash I don't use sessions in any case. |
Hello again! The problem doesn't appear on Phalcon v.1.2.6. |
We where having problems too with segfault when upgrading from 1.2.4 to 1.3.2 :( |
At me too; downgraded from 1.3.2 to 1.2.6 and the error went away. But now i dont have the full list of methods which are available at 1.3.x :-( |
The only method I removed was Phalcon\Http\Response::getHeaders()->toArray() but for me it was not critical. Also I believe that all new methods from 1.3.x can be written with 1.2.6 and logic from 1.3.x source code. But I don't know how to tell guys from Phalcon about current issue with stable segfault... I can't freeze Phalcon version for my project development with v1.2.6. |
@phalcon Machine B: Machine C: Machine D: The machine B、C is happen error, A、D is fine. The upgrade is cover installation. The following code will appear this error $session->set('data', 1);
$apps = Robots::findFirst(array(
'conditions' => 'id = :id:'
'bind' => array('id' => $session->get('data'))
)); Code example 2: $json = json_encode(array(1, 2, 3));
$arr = json_decode($json);
$builder->from('Robots')->inWhere('id', $arr)->getQuery()->executue(); My guess is that PHP array operation when happen this problem. |
I have an intermittent problem with Phalcon 1.3.x, running on several different stack combinations:
Nginx gives me the following:
I have attached GDB to the PHP-FPM pool, and got this backtrace on the segfault:
I'm really sorry, but i can't provide any further details on this. I have tried to isolate the problem, but the thing is: it's happening on almost all routes, in a 1/10 proportion. Sometimes it segfaults, sometimes it does not. That trace back there, i got it after making the very same request 3 times. The 4th time i got the segfault.
I have analyzed the process with Valgrind and got something like 20k+ uninitialized variable warnings and many leak errors. I have compiled both PHP and Phalcon in debug mode so i could make my life easier in stepping the code.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: