-
Notifications
You must be signed in to change notification settings - Fork 198
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 when creating Manager with empty arguments #173
Comments
Cross-referencing with @alcaeus' report: https://gist.github.com/alcaeus/754e1458352e5e872f3c |
I managed to reproduce this in the php-cli as well:
In this case, var_dumping the manager will cause the segfault. However, when adding arguments to the call it just segfaults right away:
|
I just upgraded to 1.1.1 and was able to partly fix the issue. |
I can confirm as well @alcaeus 's result, that after upgrading to v1.1.1, still segfaults with empty arrays. |
@jeremyjannotta: Were you able to create a GDB backtrace of your segfault? @alcaeus is in the process of creating his own, but it would certainly be helpful to have both to compare/contrast. |
Cross-referencing with PHPC-493. |
Here goes:
|
@jeremyjannotta Do you, by any chance, also have |
As I can't repro this, could you run it again in debug mode? -- It'll print out a little more info for debugging: So in gdb run:
|
@bjori Same result - there is no additional output and the trace is exactly the same. |
Heh. I see now why there is no additional output. It segfaults as soon as it tries to convert the options... Doesn't make any sense :| Which PHP version is this? And you are running pecl/mongodb 1.1.1? Could you just for completeness try without xdebug? |
As commented above, I have updated to 1.1.1 which solved one segfault I was experiencing. I've previously tried running without xdebug after @jmikola suspected that and it didn't change a thing. Here's the output without xdebug:
Again, disabling pecl/mongo fixes the issue. Also:
|
Bahhh. Sorry for being so daft. It even worked for me locally on There is a symbol clash between In your case, the stacktrace shows the We'll have to rename the function provided by |
Now that you mention it, yes, it does say mongo.so. I didn't catch that either. Well, at least we now know what the problem is! 👍 |
@alcaeus I do indeed have ext-mongo installed next to ext-mongodb. Also, here is my gdb backtrace, which has the same result:
|
Confirmed as well that disabling ext-mongo fixes the segfault issue. |
Cross-referencing with PHPC-529. Thanks for following up with the traces, guys! |
1.1.2 has been released with a fix for this. |
When executing phpunit to instantiate a Manager, I am seeing a consistent segmentation fault error like this:
when creating a Manager with these empty arguments:
But after removing the empty
[]
arguments it works fine:This was found when I noticed MongoDB\Client passes in these default values.
Also perhaps related, I notice under when trying to access any method, like getServers(), I see this error:
Executing this on Mac OSX 10.11.2, PHP 5.6.14, PHPUnit 5.0.0, MongoDB driver v1.1.0.
The text was updated successfully, but these errors were encountered: