-
Notifications
You must be signed in to change notification settings - Fork 146
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 #10
Comments
Are you able to get a backtrace? (This might be helpful: https://bugs.php.net/bugs-generating-backtrace.php) I'll attempt to reproduce that myself. Can you tell me what OS and Mosquitto versions you're using? |
Ubuntu 12.04 with mosquitto version 1.2.3 (build date 2013-12-04 21:24:29+0000) |
BTW, on setTlsOptions is it cipers or ciphers ? |
It’s ciphers. On 21 Jan 2014, at 11:04, stilllife00 [email protected] wrote:
|
This is what I was able to get, I don't know if it is useful: $ gdb php ~/core-php.6913 warning: Can't read pathname for load map: Input/output error. warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20090626/mysql.so" does not match "/usr/lib/php5/20090626/mysql.so" (CRC mismatch). warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20090626/mysql.so" does not match "/usr/lib/php5/20090626/mysql.so" (CRC mismatch). warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20090626/mysqli.so" does not match "/usr/lib/php5/20090626/mysqli.so" (CRC mismatch). warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20090626/mysqli.so" does not match "/usr/lib/php5/20090626/mysqli.so" (CRC mismatch). warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20090626/pdo_mysql.so" does not match "/usr/lib/php5/20090626/pdo_mysql.so" (CRC mismatch). warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20090626/pdo_mysql.so" does not match "/usr/lib/php5/20090626/pdo_mysql.so" (CRC mismatch). Core was generated by `php server.php'. |
Could you get into gdb again, and after the prompt appears, type 'bt' and paste what you get back? |
#0 0x000000000068d6f0 in zend_call_function (fci=0x2be2d70, fci_cache=0x2be2db8) at /build/buildd/php5-5.3.10/Zend/zend_execute_API.c:859 |
Do you know if it is a bug or if I am doing something wrong? |
It's a bug, definitely :-) you shouldn't be able to crash PHP by doing that. I'm looking at it, but I'm at PHP Benelux just now, which is distracting me!
|
I can't crash it on this OSX system, I'll try again on an Ubuntu VM as soon as I can. |
Right - two things. First off, having the names of the parameters in the methods like that is a little odd (though works). I'd just change it to Also, I've found a problem with loopForever(). If you replace it with while (true) { $client->loop(); } it should continue to work. |
The segmentation fault remains. It fails on that setTlsOptions method, no matter which loop I use |
Any idea? |
I tried the same code in a Max OSX Mavericks machine and the segmentation fault remains. Maybe there are some problems in the way I created the ca.crt file (plus the bug). |
Hi, |
I am trying to test Mosquitto with TLS but I get a segmentation fault error.
This is the code:
define('BROKER', '10.11.25.36');
define('PORT', 8883);
define('SECURE', TRUE);
$client = new Mosquitto\Client();
$client->onConnect('connect');
$client->onDisconnect('disconnect');
$client->onSubscribe('subscribe');
$client->onMessage('message');
if(SECURE){
$client->setTlsOptions($certReqs = Mosquitto\Client::SSL_VERIFY_PEER, $tlsVersion = 'tlsv1.2', $cipers=NULL);
$client->setTlsCertificates($caPath = 'path/to/my/ca.crt');
}
try {
$client->connect(BROKER, PORT, 60);
$client->onLog('logger');
$client->subscribe('/api/send/#', 1);
$client->loopForever();
}
catch (Exception $e){
echo "ERROR " . $e->getMessage();
}
What am I missing?
The text was updated successfully, but these errors were encountered: