Zeus Breaks on Long Command Line Input #254

andyl opened this Issue Feb 9, 2013 · 7 comments


None yet
4 participants

andyl commented Feb 9, 2013

I have a test shell that generates an rspec command with a list of _spec files to run. When the command grows beyond 1000 characters or so in length, zeus fails with a command-line parse error.

The workaround is to run rspec with a short Glob pattern instead of a long list of files. But that doesn't work for me, because sometimes the list of _spec files is determined by other factors than the filename, so Glob matching doesn't always work.


andyl commented Feb 9, 2013

Here's some more elaboration on this issue - this is from the RubyMine bug tracker at http://youtrack.jetbrains.com/issue/RUBY-12277

Hey Colin, I found that the names of all the spec files in my project together lead to a longer string than the zeus server expects to read from its clients, so that it was chopping off some of the names of the files. I hacked my zeus gem at this line - https://github.com/burke/zeus/blob/master/rubygem/lib/zeus.rb#L86 - to change the number of bytes read (currently 1024) to a bigger value (2**16 worked for me), and that fixed it for me. I've been meaning to put an issue in with burke about it on Github.

@turadg turadg added a commit that referenced this issue Feb 9, 2013

@turadg turadg Merge pull request #255 from andyl/master
Fix for Issue #254

@rtlong rtlong added a commit to rtlong/zeus that referenced this issue Mar 19, 2013

@rtlong rtlong Increase read buffer, allow more arguments
This is to fix the same problem reported in #254; 
Even with the fix in #255, I'm still seeing this issue. 

I chose 2**16 to match what @andyl did in adc5766d

@turadg turadg added a commit that referenced this issue Mar 19, 2013

@turadg turadg Merge pull request #289 from rtlong/master
Another fix for #254

joakimk commented May 7, 2013

Just ran into this issue. Seems it was fixed 3 months ago but the gem was not updated?

Added this script to one of our projects as a workaround in case anyone needs something similar:


set -e
gem install zeus -v 0.13.3

# This has been patched upstream but not released
printf "Patching zeus to make it possible to run the entire test suite with zeus... "
cat ~/.gem/gems/zeus-0.13.3/lib/zeus.rb | ruby -e 'puts STDIN.readlines.map { |line| line.include?("pid_and_arguments = local.recv(1024)") ? line.sub("1024", "2**16") : line }' > /tmp/a && mv /tmp/a ~/.gem/gems/zeus-0.13.3/lib/zeus.rb
echo "done"

burke closed this in 695a2d5 May 25, 2013

Is this fix in the darn gem yet? I just bundle updated and it still breaks on a glob pattern that incorporates the test files in our test suite... :)


andyl commented Jun 15, 2013

Still broken for me, using Zeus 0.13.3. Have to manually patch after every install.


sevos commented Jun 15, 2013

try 0.13.4.pre2


andyl commented Jun 15, 2013

@sevos - that did it - at last. 0.13.4.pre2 worked w/o patching. thank you!

after installing pre2, I still get "clienthandler.go:102: write unixgram : message too long" when giving zeus the command

zeus test test/**/api/v2/{**,}/*_test.rb

which matches about 60 test files in our suite

>> Dir.glob("test/**/api/v2/{**,}/*_test.rb").length
#=> 60

I've worked around it in the meantime by just creating a new Rake task with this pattern match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment