Issue #6441 has been updated by authorNari (Narihiro Nakamura).


shyouhei (Shyouhei Urabe) wrote:
> authorNari (Narihiro Nakamura) wrote:
> > naruse (Yui NARUSE) wrote:
> > > ???? Ruby ??? open(2) ??????errno=ENFILE ????????????????????
> > > ????????? fd ???使??????????????????????rb_gc() ????????IO ????????????? GC ???????
> > > fd ???解?????????????試???????????????????????????諦????????????????????
> > > 
> > > ????????????IO.pipe ??????????????失?????????????????????????????
> > 
> > 失???????????????????????fd ??解????試???????????諦??????????????????????
> > IO.pipe??????????????????????????????????????????????????
> 
> ???????????????????????????????????????????????????????????????
> ?????????????GC??????????????????????????????????(=fd)?????????????????????????
> 
> ????????????????????????????????????IO.pipe????????????????????ENFILE???????????????????????
> ???????????fd?????????????????????????????????GC???走?????????
> ????????????????????ruby????lazy sweep??????????????????GC????????????????????????????sweep????????????????
> ??????????????????????????GC??????????????????????????????????????fd??????????????????????????????????????????
> ????????fd????????????????????????????????????(=GC??????????????????)???
> 

ENFILE??????????????????rb_gc()???lazy sweep?????????????????????????????
????????????????起????????????????????????????????????????????????????????
????????????????????????????????????????????????

> > > ??????????lazy sweep ????????????????? T_FILE ??????????? sweep ???????????????????????????
> > > pipe ?????????????????????????????????????????
> >
> > ???????????????????pipe?????????????fd???T_FILE???????????????????????????
> > ?????????????????????話?????????????????
> 
> ???????????????????????????以??????????????????????????????????????????????????lazy sweep????????????????????
> ????????????????????座???sweep??????????????????????????????????????????????????????????????????
> 
> > ????????????????????????????????????????????????????????
> 
>   zsh % ulimit -n 7 # ?????????????????
>   zsh % ruby -ve 'loop { IO.pipe }'
>   ruby 2.0.0dev (2012-09-16 trunk 36984) [x86_64-linux]
>   -e:1:in `pipe': Too many open files (Errno::EMFILE)
>           from -e:1:in `block in <main>'
>           from -e:1:in `loop'
>           from -e:1:in `<main>'
>   zsh: exit 1     ~/target/trunk/bin/ruby -ve 'loop { IO.pipe }'
> 
> ????????????????????????????????????????????????????????????????????

???????????????????????????????????????????調?????????????

----------------------------------------
Bug #6441: IO.pipe on ENFILE
https://bugs.ruby-lang.org/issues/6441#change-29513

Author: naruse (Yui NARUSE)
Status: Assigned
Priority: Normal
Assignee: authorNari (Narihiro Nakamura)
Category: 
Target version: 
ruby -v: ruby 2.0.0dev (2012-05-16 trunk 35659) [x86_64-netbsd6.99.5]


???? Ruby ??? open(2) ??????errno=ENFILE ????????????????????
????????? fd ???使??????????????????????rb_gc() ????????IO ????????????? GC ???????
fd ???解?????????????試???????????????????????????諦????????????????????

????????????IO.pipe ??????????????失?????????????????????????????
??????????lazy sweep ????????????????? T_FILE ??????????? sweep ???????????????????????????
pipe ?????????????????????????????????????????


-- 
http://bugs.ruby-lang.org/