Debian Bug report logs - #543805
ruby1.9.1: failure of test #226 on GNU/kFreeBSD

version graph

Package: ruby1.9.1; Maintainer for ruby1.9.1 is Antonio Terceiro <terceiro@debian.org>; Source for ruby1.9.1 is src:ruby1.9.1.

Reported by: Petr Salinger <Petr.Salinger@seznam.cz>

Date: Thu, 27 Aug 2009 05:39:01 UTC

Severity: normal

Tags: patch

Fixed in version ruby1.9.1/1.9.2~svn28788-1

Done: Lucas Nussbaum <lucas@lucas-nussbaum.net>

Bug is archived. No further changes may be made.

Forwarded to http://redmine.ruby-lang.org/issues/show/2008

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, akira yamada <akira@debian.org>:
Bug#543805; Package ruby1.9.1. (Thu, 27 Aug 2009 05:39:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Petr Salinger <Petr.Salinger@seznam.cz>:
New Bug report received and forwarded. Copy sent to akira yamada <akira@debian.org>. (Thu, 27 Aug 2009 05:39:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Petr Salinger <Petr.Salinger@seznam.cz>
To: submit@bugs.debian.org
Cc: Lucas Nussbaum <lucas@lucas-nussbaum.net>
Subject: ruby1.9.1: failure of test #226 on GNU/kFreeBSD
Date: Thu, 27 Aug 2009 07:57:30 +0200 (CEST)
Package: ruby1.9.1
Tags: patch
User: debian-bsd@lists.debian.org
Usertags: kfreebsd

Hi, this is followup to #542927.

The test #226 is:

  begin
    require "io/nonblock"
    r, w = IO.pipe
    w.nonblock = true
    w.write_nonblock("a" * 100000)
    w.nonblock = false
    t1 = Thread.new { w.write("b" * 4096) }
    t2 = Thread.new { w.write("c" * 4096) }
    sleep 0.5
    r.sysread(4096).length
    sleep 0.5
    r.sysread(4096).length
    t1.join
    t2.join
  rescue LoadError
  end

It fails randomly under GNU/kFreeBSD, similarly as on darwin, see
http://redmine.ruby-lang.org/issues/show/1066

This failure can be made permanent by adding sleep between "Thread.new":

  begin
    require "io/nonblock"
    r, w = IO.pipe
    w.nonblock = true
    w.write_nonblock("a" * 100000)
    w.nonblock = false
    t1 = Thread.new { w.write("b" * 4096) }
    sleep 0.5
    t2 = Thread.new { w.write("c" * 4096) }
    sleep 0.5
    r.sysread(4096).length
    sleep 0.5
    r.sysread(4096).length
    t1.join
    t2.join
  rescue LoadError
  end


The test assumes that the kernel buffer for pipes have fixed size.
It does not have to be true, there could be adaptive buffer size
provided by kernel. After filling whole kernel buffer (by non-blocking 
write), it might be required to buffer becomes filled only from half
or even empty. The next write() might be blocked until whole 
kernel buffer is read. Such behaviour of kernel is correct one.

The kernel of FreeBSD uses adaptive pipe sizes and direct pipe writes,
see http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/sys_pipe.c

IMO, the test is buggy, I suggest to change it into:

  begin
    require "io/nonblock"
    r, w = IO.pipe
    w.nonblock = true
    bytes = w.write_nonblock("a" * 100000)
    w.nonblock = false
    t1 = Thread.new { w.write("b" * 4096) }
    t2 = Thread.new { w.write("c" * 4096) }
    sleep 0.5
    blocks = 2 + bytes/4096
    blocks.times {
         r.sysread(4096).length
         sleep 0.1
    }
    t1.join
    t2.join
  rescue LoadError
  end

Unfortunately, I don't understand what this should test.

Please, could you forward it also upstream.

Thanks

	Petr




Information forwarded to debian-bugs-dist@lists.debian.org, akira yamada <akira@debian.org>:
Bug#543805; Package ruby1.9.1. (Thu, 27 Aug 2009 08:15:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lucas Nussbaum <lucas@lucas-nussbaum.net>:
Extra info received and forwarded to list. Copy sent to akira yamada <akira@debian.org>. (Thu, 27 Aug 2009 08:15:12 GMT) Full text and rfc822 format available.

Message #10 received at 543805@bugs.debian.org (full text, mbox):

From: Lucas Nussbaum <lucas@lucas-nussbaum.net>
To: Petr Salinger <Petr.Salinger@seznam.cz>
Cc: 543805@bugs.debian.org
Subject: Re: ruby1.9.1: failure of test #226 on GNU/kFreeBSD
Date: Thu, 27 Aug 2009 10:02:08 +0200
On 27/08/09 at 07:57 +0200, Petr Salinger wrote:
> Package: ruby1.9.1
> Tags: patch
> User: debian-bsd@lists.debian.org
> Usertags: kfreebsd
> 
> Hi, this is followup to #542927.
> 
> The test #226 is:
> 
>   begin
>     require "io/nonblock"
>     r, w = IO.pipe
>     w.nonblock = true
>     w.write_nonblock("a" * 100000)
>     w.nonblock = false
>     t1 = Thread.new { w.write("b" * 4096) }
>     t2 = Thread.new { w.write("c" * 4096) }
>     sleep 0.5
>     r.sysread(4096).length
>     sleep 0.5
>     r.sysread(4096).length
>     t1.join
>     t2.join
>   rescue LoadError
>   end
> 
> It fails randomly under GNU/kFreeBSD, similarly as on darwin, see
> http://redmine.ruby-lang.org/issues/show/1066
> 
> This failure can be made permanent by adding sleep between "Thread.new":
> 
>   begin
>     require "io/nonblock"
>     r, w = IO.pipe
>     w.nonblock = true
>     w.write_nonblock("a" * 100000)
>     w.nonblock = false
>     t1 = Thread.new { w.write("b" * 4096) }
>     sleep 0.5
>     t2 = Thread.new { w.write("c" * 4096) }
>     sleep 0.5
>     r.sysread(4096).length
>     sleep 0.5
>     r.sysread(4096).length
>     t1.join
>     t2.join
>   rescue LoadError
>   end
> 
> 
> The test assumes that the kernel buffer for pipes have fixed size.
> It does not have to be true, there could be adaptive buffer size
> provided by kernel. After filling whole kernel buffer (by
> non-blocking write), it might be required to buffer becomes filled
> only from half
> or even empty. The next write() might be blocked until whole kernel
> buffer is read. Such behaviour of kernel is correct one.
> 
> The kernel of FreeBSD uses adaptive pipe sizes and direct pipe writes,
> see http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/sys_pipe.c
> 
> IMO, the test is buggy, I suggest to change it into:
> 
>   begin
>     require "io/nonblock"
>     r, w = IO.pipe
>     w.nonblock = true
>     bytes = w.write_nonblock("a" * 100000)
>     w.nonblock = false
>     t1 = Thread.new { w.write("b" * 4096) }
>     t2 = Thread.new { w.write("c" * 4096) }
>     sleep 0.5
>     blocks = 2 + bytes/4096
>     blocks.times {
>          r.sysread(4096).length
>          sleep 0.1
>     }
>     t1.join
>     t2.join
>   rescue LoadError
>   end
> 
> Unfortunately, I don't understand what this should test.
> 
> Please, could you forward it also upstream.

Hi Petr,

Thanks a lot for the investigation. I've forwarded the bug upstream
(http://redmine.ruby-lang.org/issues/show/2008). I will also disable the
test on FreeBSD for now, since it is not clear what the test is trying
to achieve anyway.
-- 
| Lucas Nussbaum
| lucas@lucas-nussbaum.net   http://www.lucas-nussbaum.net/ |
| jabber: lucas@nussbaum.fr             GPG: 1024D/023B3F4F |




Set Bug forwarded-to-address to 'http://redmine.ruby-lang.org/issues/show/2008'. Request was from Lucas Nussbaum <lucas@lucas-nussbaum.net> to control@bugs.debian.org. (Thu, 27 Aug 2009 08:15:20 GMT) Full text and rfc822 format available.

Reply sent to Lucas Nussbaum <lucas@lucas-nussbaum.net>:
You have taken responsibility. (Sat, 31 Jul 2010 21:48:12 GMT) Full text and rfc822 format available.

Notification sent to Petr Salinger <Petr.Salinger@seznam.cz>:
Bug acknowledged by developer. (Sat, 31 Jul 2010 21:48:12 GMT) Full text and rfc822 format available.

Message #17 received at 543805-close@bugs.debian.org (full text, mbox):

From: Lucas Nussbaum <lucas@lucas-nussbaum.net>
To: 543805-close@bugs.debian.org
Subject: Bug#543805: fixed in ruby1.9.1 1.9.2~svn28788-1
Date: Sat, 31 Jul 2010 21:47:22 +0000
Source: ruby1.9.1
Source-Version: 1.9.2~svn28788-1

We believe that the bug you reported is fixed in the latest version of
ruby1.9.1, which is due to be installed in the Debian FTP archive:

ri1.9.1_1.9.2~svn28788-1_all.deb
  to main/r/ruby1.9.1/ri1.9.1_1.9.2~svn28788-1_all.deb
ruby1.9.1-elisp_1.9.2~svn28788-1_all.deb
  to main/r/ruby1.9.1/ruby1.9.1-elisp_1.9.2~svn28788-1_all.deb
ruby1.9.1-examples_1.9.2~svn28788-1_all.deb
  to main/r/ruby1.9.1/ruby1.9.1-examples_1.9.2~svn28788-1_all.deb
ruby1.9.1-full_1.9.2~svn28788-1_all.deb
  to main/r/ruby1.9.1/ruby1.9.1-full_1.9.2~svn28788-1_all.deb
ruby1.9.1_1.9.2~svn28788-1.debian.tar.gz
  to main/r/ruby1.9.1/ruby1.9.1_1.9.2~svn28788-1.debian.tar.gz
ruby1.9.1_1.9.2~svn28788-1.dsc
  to main/r/ruby1.9.1/ruby1.9.1_1.9.2~svn28788-1.dsc
ruby1.9.1_1.9.2~svn28788.orig.tar.gz
  to main/r/ruby1.9.1/ruby1.9.1_1.9.2~svn28788.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 543805@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Lucas Nussbaum <lucas@lucas-nussbaum.net> (supplier of updated ruby1.9.1 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sat, 31 Jul 2010 17:08:39 -0400
Source: ruby1.9.1
Binary: ruby1.9.1 libruby1.9.1 libruby1.9.1-dbg ruby1.9.1-dev libtcltk-ruby1.9.1 ruby1.9.1-examples ruby1.9.1-elisp ri1.9.1 ruby1.9.1-full
Architecture: source all amd64
Version: 1.9.2~svn28788-1
Distribution: unstable
Urgency: low
Maintainer: akira yamada <akira@debian.org>
Changed-By: Lucas Nussbaum <lucas@lucas-nussbaum.net>
Description: 
 libruby1.9.1 - Libraries necessary to run Ruby 1.9.1
 libruby1.9.1-dbg - Debugging symbols for Ruby 1.9.1
 libtcltk-ruby1.9.1 - Tcl/Tk interface for Ruby 1.9.1
 ri1.9.1    - Ruby Interactive reference (for Ruby 1.9.1)
 ruby1.9.1  - Interpreter of object-oriented scripting language Ruby 1.9.2
 ruby1.9.1-dev - Header files for compiling extension modules for the Ruby 1.9.1
 ruby1.9.1-elisp - ruby-mode for Emacsen
 ruby1.9.1-examples - Examples for Ruby 1.9
 ruby1.9.1-full - Ruby 1.9.1 full installation
Closes: 542927 543805 580852 590002
Changes: 
 ruby1.9.1 (1.9.2~svn28788-1) unstable; urgency=low
 .
   * New release based on upstream snapshot from the 1.9.2 branch,
     after 1.9.2 RC2. That branch is (supposed to be) binary-compatible
     with the 1.9.1 branch.
     + Builds fine on i386. Closes: #580852.
   * Upgrade to Standards-Version: 3.9.1. No changes needed.
   * Updated generated incs.
   * Patches that still need work:
     + Unclear status, need more investigation:
      090729_fix_Makefile_deps.dpatch
      090803_exclude_rdoc.dpatch
      203_adjust_base_of_search_path.dpatch
      902_define_YAML_in_yaml_stringio.rb.dpatch
      919_common.mk_tweaks.dpatch
      931_libruby_suffix.dpatch
      940_test_thread_mutex_sync_shorter.dpatch
     + Maybe not needed anymore, keeping but not applying.
      102_skip_test_copy_stream.dpatch (test doesn't block anymore?)
      104_skip_btest_io.dpatch (test doesn't block anymore?)
      201_gem_prelude.dpatch (we don't use that rubygems anyway?)
      202_gem_default_dir.dpatch (we don't use that rubygems anyway?)
      940_test_file_exhaustive_fails_as_root.dpatch
      940_test_priority_fails.dpatch
      100518_load_libc_libm.dpatch
   * Add disable-tests.diff: disable some tests that cause failures on FreeBSD.
     Closes: #590002, #543805, #542927.
   * However, many new failures on FreeBSD. Since that version is still an
     improvement, add the check that makes test suite failures non-fatal on
     FreeBSD again. That still needs to be investigated.
   * Re-add 903_skip_base_ruby_check.dpatch
   * Add build-dependency on ruby1.8 and drop all pre-generated files.
Checksums-Sha1: 
 7747a33b0916f3cfe01d6d680848cfc67099cbaf 1589 ruby1.9.1_1.9.2~svn28788-1.dsc
 f11fc3a2e5369a12e6b6a4e5bee48966ddd22de4 8505822 ruby1.9.1_1.9.2~svn28788.orig.tar.gz
 5f706ddf1b40ac23e5e55d0b8c34457398eda707 38073 ruby1.9.1_1.9.2~svn28788-1.debian.tar.gz
 4adb759fe7811b983931375cac9e0ad89dfcf36a 777986 ruby1.9.1-examples_1.9.2~svn28788-1_all.deb
 984709072d39e958ea2b57c88d5b63c923d3f4d7 739696 ruby1.9.1-elisp_1.9.2~svn28788-1_all.deb
 2715a6863518ffce6ec245c3786a1c8b295c5715 2095906 ri1.9.1_1.9.2~svn28788-1_all.deb
 f5a8f5efee2977bcfe0a0761a1ab7f2af68f3dac 716026 ruby1.9.1-full_1.9.2~svn28788-1_all.deb
Checksums-Sha256: 
 cea441098bdd9301930150529aed2211849ce1730f1c3a6a5437645fe945ef50 1589 ruby1.9.1_1.9.2~svn28788-1.dsc
 7d6d7fae0ceb8bd287b0f8eb15d1ab56fefe41f808e5b3487a381fb3c0e33b42 8505822 ruby1.9.1_1.9.2~svn28788.orig.tar.gz
 b5fdd504476c0d8c743d2c26e08bdf062a8f4d13ac19da97b894df1c51e46f90 38073 ruby1.9.1_1.9.2~svn28788-1.debian.tar.gz
 a5eaf5271fe9203e73ec125cd15a35d35adc5672ff51210b7ea69d2d1a17480f 777986 ruby1.9.1-examples_1.9.2~svn28788-1_all.deb
 0501935a6d7bea0de620a65fe0bd812387bd461fa16172e055582147f9ba681f 739696 ruby1.9.1-elisp_1.9.2~svn28788-1_all.deb
 a00be7e2de528f83865126396358a1879e9305012fb6d42f0e4ba153ddc889f8 2095906 ri1.9.1_1.9.2~svn28788-1_all.deb
 8d8236d79a05f86f4e526fc566e5d29802ec5ab3a25978374549dd0424deaffa 716026 ruby1.9.1-full_1.9.2~svn28788-1_all.deb
Files: 
 d5568b66cdfd79f1ed93a55c4e0d7738 1589 ruby optional ruby1.9.1_1.9.2~svn28788-1.dsc
 c92331ca6d901d6b9026205f736806e2 8505822 ruby optional ruby1.9.1_1.9.2~svn28788.orig.tar.gz
 0d648584ecc6c50220867aa543be5cfa 38073 ruby optional ruby1.9.1_1.9.2~svn28788-1.debian.tar.gz
 8552b50667b9a3b57acf7a9261e800bf 777986 ruby optional ruby1.9.1-examples_1.9.2~svn28788-1_all.deb
 ad15c9b13480ce96ddf720e1d9369b5a 739696 ruby optional ruby1.9.1-elisp_1.9.2~svn28788-1_all.deb
 a650a372aea6b9e9518fb65334159ff5 2095906 ruby optional ri1.9.1_1.9.2~svn28788-1_all.deb
 a141cde53eddae63db8e8f1ac1928292 716026 ruby optional ruby1.9.1-full_1.9.2~svn28788-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iD8DBQFMVJTg2hliNwI7P08RAqO1AJ45mO9Ww3ZcOtVp4JeoUly9Uzp03wCfYSd3
dP/Way/G4KnwCwxgMr4unKE=
=oCpA
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 13 Sep 2010 07:30:29 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 10:49:53 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.