dirkolbrich's avatar

Can't use artisan tinker - Psy Shell broken?

Update: No, it's not the Psy Shell. See my comment further down the discussion thread.

I can't use artisan tinker to create a new user. Instead I get this strange error. The $user ist created and then exit from the Psy Shell. Is the Psy Shell broken or is it in my side?

A little help or a test would be helpful. Thanks in advance.

vagrant@homestead:~/Coding/Haystack$ artisan tinker
[14.09.2015 14:52:47 p1993/t140138303833920 WARNING] ZSemaphoreImpl::constructor: failed to get semaphore id: Permission denied
[14.09.2015 14:52:47 p1993/t140138303833920 WARNING] ZSemaphoreImpl::constructor: failed to get semaphore id: Permission denied
Psy Shell v0.5.2 (PHP 5.6.12-1+deb.sury.org~trusty+1 — cli) by Justin Hileman
>>> $user = new Haystack\User;
=> Haystack\User {#750}
ErrorException with message 'stream_select(): unable to select [4]: Interrupted system call (max_fd=16)'
>>> vagrant@homestead:~/Coding/Haystack$
>>>
Exit:  Ctrl+D
PHP Notice:  fwrite(): send of 734 bytes failed with errno=32 Broken pipe in /home/vagrant/Coding/Haystack/vendor/psy/psysh/src/Psy/ExecutionLoop/ForkingLoop.php on line 82
PHP Stack trace:
PHP   1. {main}() /home/vagrant/Coding/Haystack/artisan:0
PHP   2. Illuminate\Foundation\Console\Kernel->handle() /home/vagrant/Coding/Haystack/artisan:36
PHP   3. Symfony\Component\Console\Application->run() /home/vagrant/Coding/Haystack/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:100
PHP   4. Symfony\Component\Console\Application->doRun() /home/vagrant/Coding/Haystack/vendor/symfony/console/Application.php:126
PHP   5. Symfony\Component\Console\Application->doRunCommand() /home/vagrant/Coding/Haystack/vendor/symfony/console/Application.php:195
PHP   6. Illuminate\Console\Command->run() /home/vagrant/Coding/Haystack/vendor/symfony/console/Application.php:878
PHP   7. Symfony\Component\Console\Command\Command->run() /home/vagrant/Coding/Haystack/vendor/laravel/framework/src/Illuminate/Console/Command.php:136
PHP   8. Illuminate\Console\Command->execute() /home/vagrant/Coding/Haystack/vendor/symfony/console/Command/Command.php:259
PHP   9. Illuminate\Container\Container->call() /home/vagrant/Coding/Haystack/vendor/laravel/framework/src/Illuminate/Console/Command.php:150
PHP  10. call_user_func_array:{/home/vagrant/Coding/Haystack/vendor/laravel/framework/src/Illuminate/Container/Container.php:502}() /home/vagrant/Coding/Haystack/vendor/laravel/framework/src/Illuminate/Container/Container.php:502
PHP  11. Illuminate\Foundation\Console\TinkerCommand->fire() /home/vagrant/Coding/Haystack/vendor/laravel/framework/src/Illuminate/Container/Container.php:502
PHP  12. Psy\Shell->run() /home/vagrant/Coding/Haystack/vendor/laravel/framework/src/Illuminate/Foundation/Console/TinkerCommand.php:54
PHP  13. Symfony\Component\Console\Application->run() /home/vagrant/Coding/Haystack/vendor/psy/psysh/src/Psy/Shell.php:282
PHP  14. Psy\Shell->doRun() /home/vagrant/Coding/Haystack/vendor/symfony/console/Application.php:126
PHP  15. Psy\ExecutionLoop\ForkingLoop->run() /home/vagrant/Coding/Haystack/vendor/psy/psysh/src/Psy/Shell.php:313
PHP  16. fwrite() /home/vagrant/Coding/Haystack/vendor/psy/psysh/src/Psy/ExecutionLoop/ForkingLoop.php:82
0 likes
2 replies
webkenny's avatar
Level 2

Hi there,

I've seen this stream_select error before in a Symfony issue. One comment in particular stands out which is the command can return false if its interrupted by a system call. I don't know a ton about it, but is it possible something is hosing your calls in the background?

dirkolbrich's avatar

Thanks for the hint. It wasn't the Psy Shell. It's Zend Zray, which seem to interfere with artisan tinker. I uninstalled Zend Zray and everything went fine. Reinstalling Zend Zray reproduced the error. I don't know, what is going on, but it seems that Zray for the CLI interferes with the Psy Shell. For the time being I disabled Zray for the cli:

$ sudo rm /etc/php5/cli/conf.d/zray.ini

That fixed the error.

Please or to participate in this conversation.