[#68478] Looking for MRI projects for Ruby Google Summer of Code 2015 — Tony Arcieri <bascule@...>
Hi ruby-core,
10 messages
2015/03/10
[#68480] Re: Looking for MRI projects for Ruby Google Summer of Code 2015
— SASADA Koichi <ko1@...>
2015/03/10
I have.
[#68549] Re: Looking for MRI projects for Ruby Google Summer of Code 2015
— SASADA Koichi <ko1@...>
2015/03/17
I sent several ideas on previous, mail, but they are seems rejected?
[#68493] [Ruby trunk - Feature #10532] [PATCH] accept_nonblock supports "exception: false" — nobu@...
Issue #10532 has been updated by Nobuyoshi Nakada.
5 messages
2015/03/11
[#68503] Re: [Ruby trunk - Feature #10532] [PATCH] accept_nonblock supports "exception: false"
— Eric Wong <normalperson@...>
2015/03/12
Committed as r49948.
[#68504] Re: [Ruby trunk - Feature #10532] [PATCH] accept_nonblock supports "exception: false"
— Nobuyoshi Nakada <nobu@...>
2015/03/12
On 2015/03/12 12:08, Eric Wong wrote:
[#68506] Seven stacks (and two questions) — Jakub Trzebiatowski <jaktrze1@...>
The Ruby Hacking Guide says that Ruby has窶ヲ seven stacks. Is it an implementation choice (and it could be implemented with one stack), or is there really a need for seven logical stacks? For example, Lua has one stack, and still closures with upvalues are totally possible (it窶冱 like Ruby窶冱 blocks that can reference local variables of their enclosing method, but it works for any function with any upvalues).
5 messages
2015/03/12
[#68520] Possible regression in 2.1 and 2.2 in binding when combined with delegate? — Joe Swatosh <joe.swatosh@...>
# The following code
3 messages
2015/03/14
[#68604] GSOC project Cross-thread Fiber support — surya pratap singh raghuvanshi <oshosurya@...>
- *hi i am a third year computer science student interested in working
6 messages
2015/03/22
[#68606] Re: GSOC project Cross-thread Fiber support
— Tony Arcieri <bascule@...>
2015/03/22
Hi Surya,
[#68619] Re: GSOC project Cross-thread Fiber support
— surya pratap singh raghuvanshi <oshosurya@...>
2015/03/23
hi tony,
[ruby-core:68469] [Ruby trunk - Bug #10494] ioctl returns EINVAL instead of ENOTTY for pipes on older linux, breaking piped test suite
From:
nagachika00@...
Date:
2015-03-09 17:28:41 UTC
List:
ruby-core #68469
Issue #10494 has been updated by Tomoyuki Chikanaga.
Backport changed from 2.0.0: DONE, 2.1: REQUIRED to 2.0.0: DONE, 2.1: DONE
Backported into `ruby_2_1` branch at r49910.
----------------------------------------
Bug #10494: ioctl returns EINVAL instead of ENOTTY for pipes on older linux, breaking piped test suite
https://bugs.ruby-lang.org/issues/10494#change-51811
* Author: Charles Nutter
* Status: Closed
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-linux]
* Backport: 2.0.0: DONE, 2.1: DONE
----------------------------------------
Yeah I know the title is a mouthful. I'll try to explain.
BACKGROUND:
Starting sometime recently, MRI's test suite started to use a custom version of test/unit contained in test/lib. Inside unit.rb, there's code that uses io/console to determine the window size for some fancy formatting.
https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit.rb#L404
The surrounding rescue captures LoadError (io/console doesn't exist), NoMethodError (winsize is not defined), ENOTTY (fd is not a tty), and EBADF (fd is no longer valid), and provides suitable fallback code for console width.
PROBLEM:
However, when we ran the MRI suite with JRuby on Travis, we got the following error:
[exec] Run options: -q --
[exec]
[exec] # Running tests:
[exec]
[exec]
[exec] Errno::EINVAL: Invalid argument - ioctl(TIOCGWINSZ) winsize at /home/travis/build/jruby/jruby/lib/ruby/stdlib/io/console.rb:120
[exec] terminal_width at /home/travis/build/jruby/jruby/test/mri/lib/test/unit.rb:404
[exec] put_status at /home/travis/build/jruby/jruby/test/mri/lib/test/unit.rb:433
This is from within a Maven build target we use to run our test suites with the proper environment. We could not reproduce this on current Linux versions.
CAUSE:
For those unfamiliar with the JVM, the standard process-launching APIs *always* set the child's stdio to pipes that you can then read, a la popen in MRI. Long story short, it turns out that Linux incorrectly returned EINVAL instead of ENOTTY when calling ioctl with a pipe up until this fix in May of 2012: https://lkml.org/lkml/2012/5/25/142
This is after the release of Ubuntu 12.04 that Travis runs, and I'm guessing they have not updated the kernels.
REPRODUCTION (for Linux kernels prior to this patch):
I was able to reproduce this EINVAL on a Travis dev box (thanks asarih!) with both JRuby and MRI using the following command line:
$ rvm ruby-2.1 do ruby -rio/console -e 'p $stdout.winsize' | cat
-e:1:in `winsize': Invalid argument (Errno::EINVAL)
from -e:1:in `<main>'
SOLUTION:
????????
I'm not sure.
* We could just patch the test library. I have done this for JRuby here: https://github.com/jruby/jruby/commit/29122372da5ba2f359239aa916e074a57fe96b70
* We could modify io/console #winsize and other methods to raise this incorrect EINVAL as ENOTTY, since we should know in each of those methods that we have the right request and data structure (ergo EINVAL should not happen on non-buggy systems)
We need to do one or the other for the test suite to be runnable on these earlier Linux kernels when stdout is a pipe.
--
https://bugs.ruby-lang.org/