something went wonky - sys?

I can’t understand why this starts to happen sometimes and I can’t figure out what I did to get it to stop…

I had added a little debug coding in there (since it started happening) and it indicated the sys() function seemed to stop working.

def assert_blast_installed_and_compatible
begin
aa = sys(‘blastdbcmd -version’, path: config[:bin])
puts ["output: version ",aa.count]
aa.each { |item| puts item }

out, = sys(‘blastdbcmd -version’, path: config[:bin])

ericiam@graingenes:/data/seqserv2rc8$ bundle exec bin/sequenceserver -c /data/seqserv2rc8/gg-sequenceserver/sequenceserver.conf

[2022-02-01 07:00:15] INFO Reading configuration file: /data/seqserv2rc8/gg-sequenceserver/sequenceserver.conf.
output: version
2
<---- nothing from sys()

Something went wonky

Looks like you have encountered a bug in SequenceServer. Please could you
report this incident to our Google Group -
https://groups.google.com/forum/?fromgroups#!forum/sequenceserver

Error:
undefined method empty?' for nil:NilClass /data/seqserv2rc8/lib/sequenceserver.rb:251:in assert_blast_installed_and_compatible’
/data/seqserv2rc8/lib/sequenceserver.rb:192:in init_binaries' /data/seqserv2rc8/lib/sequenceserver.rb:81:in init’
bin/sequenceserver:180:in block (2 levels) in <top (required)>' /var/lib/gems/2.7.0/gems/slop-3.6.0/lib/slop.rb:260:in parse!’
/var/lib/gems/2.7.0/gems/slop-3.6.0/lib/slop.rb:65:in parse!' bin/sequenceserver:48:in <top (required)>’
/var/lib/gems/2.7.0/gems/bundler-2.2.30/lib/bundler/cli/exec.rb:58:in load' /var/lib/gems/2.7.0/gems/bundler-2.2.30/lib/bundler/cli/exec.rb:58:in kernel_load’

???
In the past, I had never seen this problem, then all of a sudden, today, it started happening.

Later, it just magically started working after changing the debug code a little (seemingly inconsequential change).

[2022-02-01 07:23:54] INFO Reading configuration file: /data/seqserv2rc8/sequenceserver.conf.
output: version
2
blastdbcmd: 2.12.0+ <---- surprise!!! started working! why???
Package: blast 2.12.0, build Jun 4 2021 03:22:54

Running sequenceserver 2 rc8

Hmm, the error message suggests that sys is returning an empty array on the second invocation. That should technically only happen if stdout, and stderr options were given to sys:

sys(command, path: …, stdout: ‘/path/to/redirect/stdout/to’, stderr: ‘/path/to/redirect/stderr/to’)

Not sure what else could cause that.

What version of Ruby?

Priyam