From: Eric Wong <e@80x24.org>
To: Antonio Terceiro <terceiro@debian.org>, 830353@bugs.debian.org
Cc: Lucas Nussbaum <lucas@debian.org>, kgio-public@bogomips.org
Subject: Re: Bug#830353: ruby-kgio: FTBFS: ERROR: Test "ruby2.3" failed.
Date: Thu, 14 Jul 2016 23:11:23 +0000 [thread overview]
Message-ID: <20160714231123.GA11770@whir> (raw)
In-Reply-To: <20160714215356.GA20096@debian.org>
Antonio Terceiro <terceiro@debian.org> wrote:
> On Fri, Jul 08, 2016 at 06:53:29PM +0000, Eric Wong wrote:
> > Thanks for the report. Can you try the patch below?
>
> Didn't help.
>
> I can't, however, reproduce this locally on my workstation.
Thanks for following up.
> > I'd be interested to know what non-standard sysctl knobs are set
> > for kernel socket buffer sizes (in /proc/sys/net/{core,ipv4}/*mem*)
> ==> /proc/sys/net/ipv4/tcp_rmem <==
> 4096 12582912 16777216
>
> ==> /proc/sys/net/ipv4/tcp_wmem <==
> 4096 12582912 16777216
Yikes at the gigantic default (middle) values. Anyways, I've
set those locally and notice the problem with my previous patch:
I missed some spots where temporary strings/arrays were created
inside the tests themselves.
> In Debian we don't even have 2.2 anymore. The only things using kgio are
> unicorn and rainbows. Maybe if their dependency on kgio could be skipped on
> Ruby 2.3, we could drop kgio from Debian.
Yes, I still have to check and make sure I don't introduce
performance regressions and such when dropping kgio.
I still need to support Ruby 1.9.3 and 2.0.0 outside of Debian
(or on wheezy LTS/jessie)
The following ought to work (I tested locally with those sysctl
values) but I'll see about making the tests more robust against
larger kernel buffers.
-------8<--------
--- a/test/lib_read_write.rb
+++ b/test/lib_read_write.rb
@@ -7,7 +7,12 @@ $-w = true
require 'kgio'
module LibReadWriteTest
- RANDOM_BLOB = File.open("/dev/urandom") { |fp| fp.read(10 * 1024 * 1024) }
+ RANDOM_BLOB = File.open("/dev/urandom") do |fp|
+ nr = 31
+ buf = fp.read(nr)
+ # get roughly a 20MB block of random data
+ (buf * (20 * 1024 * 1024 / nr)) + (buf * rand(123))
+ end
def teardown
@rd.close if defined?(@rd) && ! @rd.closed?
@@ -369,7 +374,7 @@ module LibReadWriteTest
@nr += 1
IO.select(nil, [self])
end
- buf = "." * 1024 * 1024 * 10
+ buf = RANDOM_BLOB
thr = Thread.new { @wr.kgio_write(buf) }
Thread.pass until thr.stop?
readed = @rd.read(buf.size)
@@ -385,7 +390,7 @@ module LibReadWriteTest
@nr += 1
IO.select(nil, [self])
end
- buf = ["." * 1024] * 1024 * 10
+ buf = [ RANDOM_BLOB, RANDOM_BLOB ]
buf_size = buf.inject(0){|c, s| c + s.size}
thr = Thread.new { @wr.kgio_writev(buf) }
Thread.pass until thr.stop?
--
EW
prev parent reply other threads:[~2016-07-14 23:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160708092805.GA27159@xanadu.blop.info>
2016-07-08 18:53 ` Bug#830353: ruby-kgio: FTBFS: ERROR: Test "ruby2.3" failed Eric Wong
2016-07-14 21:53 ` Antonio Terceiro
2016-07-14 23:11 ` Eric Wong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/kgio/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160714231123.GA11770@whir \
--to=e@80x24.org \
--cc=830353@bugs.debian.org \
--cc=kgio-public@bogomips.org \
--cc=lucas@debian.org \
--cc=terceiro@debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/kgio.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).