Skip to content
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 #105

Closed
cmckni3 opened this issue May 8, 2015 · 11 comments
Closed

Segmentation Fault #105

cmckni3 opened this issue May 8, 2015 · 11 comments

Comments

@cmckni3
Copy link

cmckni3 commented May 8, 2015

I am getting a segmentation fault whenever I run the following:

$i = 123;
print $i;

Here is the error message:

/usr/local/bin/boris: line 3: 81017 Segmentation fault: 11  /usr/bin/env php -d allow_url_fopen=On -d detect_unicode=Off /usr/local/Cellar/boris/1.0.8/libexec/boris.phar "$@"
PHP Notice:  fwrite(): send of 1 bytes failed with errno=32 Broken pipe in phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/lib/Boris/EvalWorker.php on line 205
PHP Stack trace:
PHP   1. {main}() /usr/local/Cellar/boris/1.0.8/libexec/boris.phar:0
PHP   2. require() /usr/local/Cellar/boris/1.0.8/libexec/boris.phar:10
PHP   3. Boris\Boris->start() phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/bin/boris:15
PHP   4. Boris\EvalWorker->start() phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/lib/Boris/Boris.php:171
PHP   5. Boris\EvalWorker->_write() phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/lib/Boris/EvalWorker.php:147
PHP   6. fwrite() phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/lib/Boris/EvalWorker.php:205
PHP Fatal error:  Uncaught exception 'RuntimeException' with message 'Socket error: failed to write data' in phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/lib/Boris/EvalWorker.php:206
Stack trace:
#0 phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/lib/Boris/EvalWorker.php(147): Boris\EvalWorker->_write(Resource id #20, '\x00')
#1 phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/lib/Boris/Boris.php(171): Boris\EvalWorker->start()
#2 phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/bin/boris(15): Boris\Boris->start()
#3 /usr/local/Cellar/boris/1.0.8/libexec/boris.phar(10): require('phar:///usr/loc...')
#4 {main}
  thrown in phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/lib/Boris/EvalWorker.php on line 206

I have the following modules installed and enabled. Do you think it is due incompatibility with xdebug?

[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
ldap
libsodium
libxml
mbstring
mcrypt
mhash
mssql
mysql
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_dblib
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xdebug
xml
xmlreader
xmlrpc
xmlwriter
xsl
yaml
zip
zlib

[Zend Modules]
Xdebug
@cmckni3
Copy link
Author

cmckni3 commented May 8, 2015

I tried disabling xdebug but I am still getting a segmentation fault.

@rbrisita
Copy link

Similar error. Using PHP 5.5.24 on Mac OS X 10.9.5.

@zhougn
Copy link

zhougn commented Jun 2, 2015

Similar issue, boris crashes every time I eval the second statement. I'm using PHP 5.5.25 and Boris 1.0.8 on Mac OS X 10.10.3. Both PHP and Boris are installed using Homebrew.

[1] boris> echo "123";
123[2] boris> echo "123";
/usr/local/bin/boris: line 3: 30385 Segmentation fault: 11  /usr/bin/env php -d allow_url_fopen=On -d detect_unicode=Off /usr/local/Cellar/boris/1.0.8/libexec/boris.phar "$@"
PHP Notice:  fwrite(): send of 1 bytes failed with errno=32 Broken pipe in phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/lib/Boris/EvalWorker.php on line 205

Notice: fwrite(): send of 1 bytes failed with errno=32 Broken pipe in phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/lib/Boris/EvalWorker.php on line 205
PHP Fatal error:  Uncaught exception 'RuntimeException' with message 'Socket error: failed to write data' in phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/lib/Boris/EvalWorker.php:206
Stack trace:
#0 phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/lib/Boris/EvalWorker.php(147): Boris\EvalWorker->_write(Resource id #20, '\x00')
#1 phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/lib/Boris/Boris.php(171): Boris\EvalWorker->start()
#2 phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/bin/boris(15): Boris\Boris->start()
#3 /usr/local/Cellar/boris/1.0.8/libexec/boris.phar(10): require('phar:///usr/loc...')
#4 {main}
  thrown in phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/lib/Boris/EvalWorker.php on line 206

Fatal error: Uncaught exception 'RuntimeException' with message 'Socket error: failed to write data' in phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/lib/Boris/EvalWorker.php:206
Stack trace:
#0 phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/lib/Boris/EvalWorker.php(147): Boris\EvalWorker->_write(Resource id #20, '\x00')
#1 phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/lib/Boris/Boris.php(171): Boris\EvalWorker->start()
#2 phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/bin/boris(15): Boris\Boris->start()
#3 /usr/local/Cellar/boris/1.0.8/libexec/boris.phar(10): require('phar:///usr/loc...')
#4 {main}
  thrown in phar:///usr/local/Cellar/boris/1.0.8/libexec/boris.phar/lib/Boris/EvalWorker.php on line 206

@marchelzo
Copy link

Same problem here. PHP 5.5.14 on OS X 10.10.2.

@franquis
Copy link

Same issue: PHP 5.5.26 (cli) with zts & pthreads on OS X 10.10.4

PHP Notice:  fwrite(): send of 1 bytes failed with errno=32 Broken pipe in mysite/vendor/d11wtq/boris/lib/Boris/EvalWorker.php on line 224
PHP Stack trace:
PHP   1. {main}() mysite/artisan:0
PHP   2. Symfony\Component\Console\Application->run() mysite/artisan:59
PHP   3. Symfony\Component\Console\Application->doRun() mysite/vendor/symfony/console/Symfony/Component/Console/Application.php:124
PHP   4. Symfony\Component\Console\Application->doRunCommand() mysite/vendor/symfony/console/Symfony/Component/Console/Application.php:193
PHP   5. Illuminate\Console\Command->run() mysite/vendor/symfony/console/Symfony/Component/Console/Application.php:889
PHP   6. Symfony\Component\Console\Command\Command->run() mysite/vendor/laravel/framework/src/Illuminate/Console/Command.php:100
PHP   7. Illuminate\Console\Command->execute() mysite/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:253
PHP   8. Illuminate\Foundation\Console\TinkerCommand->fire() mysite/vendor/laravel/framework/src/Illuminate/Console/Command.php:112
PHP   9. Illuminate\Foundation\Console\TinkerCommand->runBorisShell() mysite/vendor/laravel/framework/src/Illuminate/Foundation/Console/TinkerCommand.php:31
PHP  10. Boris\Boris->start() mysite/vendor/laravel/framework/src/Illuminate/Foundation/Console/TinkerCommand.php:50
PHP  11. Boris\EvalWorker->start() mysite/vendor/d11wtq/boris/lib/Boris/Boris.php:175
PHP  12. Boris\EvalWorker->_write() mysite/vendor/d11wtq/boris/lib/Boris/EvalWorker.php:166
PHP  13. fwrite() mysite/vendor/d11wtq/boris/lib/Boris/EvalWorker.php:224
PHP Fatal error:  Uncaught exception 'RuntimeException' with message 'Socket error: failed to write data' in mysite/vendor/d11wtq/boris/lib/Boris/EvalWorker.php:225
Stack trace:
#0 mysite/vendor/d11wtq/boris/lib/Boris/EvalWorker.php(166): Boris\EvalWorker->_write(Resource id #339, '\x00')
#1 mysite/vendor/d11wtq/boris/lib/Boris/Boris.php(175): Boris\EvalWorker->start()
#2 mysite/vendor/laravel/framework/src/Illuminate/Foundation/Console/TinkerCommand.php(50): Boris\Boris->start()
#3 mysite/vendor/laravel/framework/src/Illuminate/Foundation/Console/TinkerCommand.php(31): Illuminate\Foundation\Console\TinkerCommand->runBorisShell()
#4 mysite/vendor/laravel/framework/src/Illuminate/Console/Command.php(112): Illuminate\Foundation\Console\TinkerCommand->fire()
#5 mysite/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(253): Illuminate\Console\Comm in mysite/vendor/d11wtq/boris/lib/Boris/EvalWorker.php on line 225

@basz
Copy link

basz commented Oct 21, 2015

idem PHP 5.5.30 on OS X 10.10.2

@message
Copy link

message commented Nov 24, 2015

Same on OSX. echo date("Ymd-His");

@cmckni3
Copy link
Author

cmckni3 commented May 30, 2016

I'm not having this issue anymore on OS X 10.11.5 running boris 1.0.8.

Closing

@cmckni3 cmckni3 closed this as completed May 30, 2016
@evilangelmd
Copy link

what did you do to get rid of error? i have same issue, and all modules required... But on second statement it throws error...

[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
ldap
libxml
mbstring
mcrypt
mhash
mysql
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_mysql
PDO_ODBC
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib

[Zend Modules]

@basz
Copy link

basz commented Mar 3, 2017

Upgrade os and also reinstalled php resolved the issue. I'm now running php71 and Boris works fine

@evilangelmd
Copy link

OS reinstallation is not good idea, but upgrading php to 5.6 had resolved my problem...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants