Fix hang when running tests on OpenBSD by skipping two tests

Eric Wong normalperson at yhbt.net
Tue Nov 15 17:36:19 EST 2011


Jeremy Evans <jeremyevans0 at gmail.com> wrote:
> I assume you aren't purposely testing a large timeout here, so
> hopefully this change is fine.  The original code caused an infinite
> loop on OpenBSD, and also taking up all available space on the file
> system if you let it run long enough because it wrote to the log
> inside the loop.  On 1.8.7:

I expected "timeout 0x7fffffff" to be fine (I sometimes use it :x)...

> E, [2011-11-15T18:55:34.616397 #11092] ERROR -- : master loop error:
> time + 2147483646.000000 out of Time range (RangeError)
> E, [2011-11-15T18:55:34.616538 #11092] ERROR -- :
> /usr/obj/ports/unicorn-4.1.1/unicorn-4.1.1/t/../test/ruby-1.8.7/lib/unicorn/http_server.rb:264:in

Odd, which patchlevel of 1.8.7 is this?  (more of a curiosity at this
point, see below)

> On 1.9.3:
> 
> E, [2011-11-15T19:00:20.464234 #13442] ERROR -- : listen loop error:
> Invalid argument (Errno::EINVAL)
> E, [2011-11-15T19:00:20.464327 #13442] ERROR -- :
> /usr/local/lib/ruby/gems/1.8/gems/unicorn-4.1.1/lib/unicorn/http_server.rb:620:in
> `select'

OK, I need to read POSIX manpages more often, not just the Linux ones.
>From the select() POSIX manpage:

	All implementations shall support a maximum timeout interval of
	at least 31 days.

I think I'll just force Unicorn::Configurator to limit that to 30 days.

But, the POSIX manpage also states:

	If the timeout argument specifies a timeout interval greater
	than the implementation-defined maximum value, the maximum value
	shall be used as the actual timeout value.

So isn't OpenBSD wrong in giving EINVAL here?  Unless somehow the large
time_t was interpreted as a negative value...

> openssl sha1 on OpenBSD doesn't just spit out the hash:
> 
> $ openssl sha1 mocha.diff
> SHA1(mocha.diff)= 4ea47d3cf9e4f1858a298a8a9f5a5671422971d5

This happens on newer openssl under Debian, too.  Maybe just switch to
sha1sum.rb since I'm more comfortable with Ruby 1.9 now than I was in
2009.


More information about the mongrel-unicorn mailing list