[#21058] dRuby failed, ruby 1.8.0 preview7? — Masatoshi SEKI <m_seki@...>
咳といいます。
5 messages
2003/08/01
[#21072] __libc_ia64_register_backing_store_base — akira yamada / やまだあきら <akira@...>
5 messages
2003/08/02
[#21081] conversion from float to string — Yoshiki Wada <ysk@...5.so-net.ne.jp>
和田と申します。
8 messages
2003/08/02
[#21082] Re: conversion from float to string
— matz@... (Yukihiro Matsumoto)
2003/08/02
まつもと ゆきひろです
[#21083] Re: conversion from float to string
— Koji Arai <JCA02266@...>
2003/08/02
新井です。
[#21093] (ary - ary) preserves duplicated values — Koji Arai <JCA02266@...>
新井です。
7 messages
2003/08/03
[#21134] Re: [PATCH] Change configure to use Cygwin net release naming convention (PR#1077) — WATANABE Hirofumi <eban@...>
わたなべです。
4 messages
2003/08/05
[#21137] with-static-linked-ext — nobu.nakada@...
なかだです。
10 messages
2003/08/05
[#21140] Re: with-static-linked-ext
— nobu.nakada@...
2003/08/05
なかだです。
[#21142] Re: with-static-linked-ext
— matz@... (Yukihiro Matsumoto)
2003/08/05
まつもと ゆきひろです
[#21146] Regexp.alt(pat1, pat2, ...) — Tanaka Akira <akr@...17n.org>
提案なのですが、複数の Regexp (や String) を | でつなぐ Regexp.alt
4 messages
2003/08/05
[#21153] ChangeLog — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
12 messages
2003/08/06
[#21154] Re: ChangeLog
— matz@... (Yukihiro Matsumoto)
2003/08/06
まつもと ゆきひろです
[#21159] Re: ChangeLog
— nobu.nakada@...
2003/08/06
なかだです。
[#21160] Re: ChangeLog
— matz@... (Yukihiro Matsumoto)
2003/08/06
まつもと ゆきひろです
[#21170] soap4r to /src/ruby/lib — "NAKAMURA, Hiroshi" <nakahiro@...>
なひです。
11 messages
2003/08/08
[#21176] marshalling ivtbl of Time — "NAKAMURA, Hiroshi" <nakahiro@...>
なひです。
10 messages
2003/08/11
[#21475] Re: marshalling ivtbl of Time
— Tanaka Akira <akr@...17n.org>
2003/10/03
In article <1065144546.011594.19001.nullmailer@picachu.netlab.jp>,
[#21179] [BUG]net/httpでBUG — "yamamoto madoka" <dan@...2.so-net.ne.jp>
こんにちは、山本 円と申します。
8 messages
2003/08/11
[#21183] Process::UID.switch, Process::GID.switch — Kazuhiro NISHIYAMA <zn@...>
西山和広です。
5 messages
2003/08/11
[#21216] [PATCH] reducing PUSH/POP/EXEC_TAG() for retry — nobu.nakada@...
なかだです。
4 messages
2003/08/21
[#21225] Re: [ruby-cvs] ruby: * enum.c (inject_i): use rb_yield_values. — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
14 messages
2003/08/22
[#21227] Re: [ruby-cvs] ruby: * enum.c (inject_i): use rb_yield_values.
— nobu.nakada@...
2003/08/22
なかだです。
[#21228] Re: [ruby-cvs] ruby: * enum.c (inject_i): use rb_yield_values.
— matz@... (Yukihiro Matsumoto)
2003/08/22
まつもと ゆきひろです
[#21229] Re: [ruby-cvs] ruby: * enum.c (inject_i): use rb_yield_values.
— nobu.nakada@...
2003/08/22
なかだです。
[#21231] Re: [ruby-cvs] ruby: * enum.c (inject_i): use rb_yield_values.
— matz@... (Yukihiro Matsumoto)
2003/08/23
まつもと ゆきひろです
[#21232] Re: [ruby-cvs] ruby: * enum.c (inject_i): use rb_yield_values.
— nobu.nakada@...
2003/08/23
なかだです。
[#21233] Re: [ruby-cvs] ruby: * enum.c (inject_i): use rb_yield_values.
— matz@... (Yukihiro Matsumoto)
2003/08/23
まつもと ゆきひろです
[#21234] Re: [ruby-cvs] ruby: * enum.c (inject_i): use rb_yield_values.
— Koji Arai <JCA02266@...>
2003/08/23
新井です。
[#21236] Re: [ruby-cvs] ruby: * enum.c (inject_i): userb_yield_values.
— Koji Arai <JCA02266@...>
2003/08/23
新井です。
[#21237] SEGV — keiju@... (Keiju ISHITSUKA)
けいじゅ@いしつかです.
12 messages
2003/08/23
[#21259] Regexp#initialize が $SAFE==4 で落ちる — Kazuhiro NISHIYAMA <zn@...>
西山和広です。
9 messages
2003/08/25
[#21262] Re: Regexp#initialize が $SAFE==4 で落ちる
— matz@... (Yukihiro Matsumoto)
2003/08/26
まつもと ゆきひろです
[#21264] Re: Regexp#initializeが $SAFE==4 で落ちる
— nobu.nakada@...
2003/08/26
なかだです。
[#21280] スレッド内の例外でRuby停止 — "yamamoto madoka" <dan@...2.so-net.ne.jp>
こんにちは、山本と申します。
9 messages
2003/08/29
[#21281] 大量メモリ消費攻撃に対する対応 — Hidetoshi NAGAI <nagai@...>
永井@知能.九工大です.
16 messages
2003/08/29
[#21285] Re: 大量メモリ消費攻撃に対する対応
— matz@... (Yukihiro Matsumoto)
2003/08/29
まつもと ゆきひろです
[#21288] Re: 大量メモリ消費攻撃に対する対応
— Hidetoshi NAGAI <nagai@...>
2003/08/29
永井@知能.九工大です.
[#21306] Re: 大量メモリ消費攻撃に対する対応
— matz@... (Yukihiro Matsumoto)
2003/09/03
まつもと ゆきひろです
[#21309] Re: 大量メモリ消費攻撃に対する対応
— Hidetoshi NAGAI <nagai@...>
2003/09/03
永井@知能.九工大です.
[ruby-dev:21272] Fwd: SEGV with net/http
From:
Minero Aoki <aamine@...>
Date:
2003-08-27 04:51:17 UTC
List:
ruby-dev #21272
青木です。
net/http を使ってたら落ちた、というメールが来たのでとりあえず
転送します。
i686-linux なので家でも落とせるかと思ったんですが、再現しません
でした。バックトレースその他が必要そうなら頼んでみます。
-------------------------------------------------------------------
青木峰郎
Subject: net/http.rb
From: "Raymond D. Mosteller" <rmostell@usc.edu>
To: Minero Aoki <aamine@loveruby.net>
Date: Mon, 25 Aug 2003 15:52:54 -0700
Minero Aoki <aamine@loveruby.net>
Dear Mr. Aoki,
Thank you very much for all of your hard work and dedication to Ruby
development. I sincerely appreciate your contributions to Ruby.
I have written a Ruby program (my_webchxr.rb) for checking links on my
webpages using the net/http.rb Ruby library. Each time the program runs it
checks 900+ links for me on 22 web pages. Most of the time calls to
http.rb work very well. However, once every few thousand calls, my program
terminates abnormally and gives one of two messages regarding line 1547 in
http.rb (see examples below). This occurs sporadically and is not
connected to any specific host or path values. I have tried very hard to
fix this problem myself but have been unsuccessful even after reading all
the excellent documentation in http.rb. Because you are the author of the
http.rb library, I thought perhaps you could advise me how to avoid this
program failure.
I apologize in advance if this is a really stupid question.
Thank you for your kindness,
Ray Mosteller
rmostell@usc.edu
My system is a Pentium 500 MHz machine with 128 MB RAM running Mandrake
Linux 9.0
#--------------------------------------------
Example #1:
/usr/local/lib/ruby/1.8/net/http.rb:1547: [BUG] Segmentation fault
ruby 1.8.0 (2003-08-04) [i686-linux]
(no traceback is given after the above message)
#--------------------------------------------
Example #2a: (using get method)
/usr/local/lib/ruby/1.8/net/http.rb:1547:in `read_status_line': method `[]'
called on terminated object (0x40193008) (NotImplementedError)
from /usr/local/lib/ruby/1.8/net/http.rb:1528:in `read_new'
from /usr/local/lib/ruby/1.8/net/http.rb:819:in `request'
from /usr/local/lib/ruby/1.8/net/http.rb:809:in `request'
from /usr/local/lib/ruby/1.8/net/http.rb:807:in `start'
from /usr/local/lib/ruby/1.8/net/http.rb:810:in `request'
from /usr/local/lib/ruby/1.8/net/http.rb:604:in `get'
from my_webchxr.rb:65:in `check_html_data'
from my_webchxr.rb:120:in `check_href'
from my_webchxr.rb:117:in `each'
from my_webchxr.rb:117:in `check_href'
from my_webchxr.rb:187:in `main_loop'
from my_webchxr.rb:180:in `each'
from my_webchxr.rb:180:in `main_loop'
from my_webchxr.rb:201
#--------------------------------------------
Example #2b: (using head method)
/usr/local/lib/ruby/1.8/net/http.rb:1547:in `read_status_line': method `[]'
called on terminated object (0x40193094) (NotImplementedError)
from /usr/local/lib/ruby/1.8/net/http.rb:1528:in `read_new'
from /usr/local/lib/ruby/1.8/net/http.rb:819:in `request'
from /usr/local/lib/ruby/1.8/net/http.rb:809:in `request'
from /usr/local/lib/ruby/1.8/net/http.rb:807:in `start'
from /usr/local/lib/ruby/1.8/net/http.rb:810:in `request'
from /usr/local/lib/ruby/1.8/net/http.rb:633:in `head'
from my_webchxr.rb:42:in `check_html_headers'
from my_webchxr.rb:119:in `check_href'
from my_webchxr.rb:118:in `each'
from my_webchxr.rb:118:in `check_href'
from my_webchxr.rb:196:in `main_loop'
from my_webchxr.rb:187:in `each'
from my_webchxr.rb:187:in `main_loop'
from my_webchxr.rb:212
#--------------------------------------------
Example 2c: (using request_head method)
/usr/local/lib/ruby/1.8/net/http.rb:1547:in `read_status_line': method `[]'
called on terminated object (0x40193030) (NotImplementedError)
from /usr/local/lib/ruby/1.8/net/http.rb:1528:in `read_new'
from /usr/local/lib/ruby/1.8/net/http.rb:819:in `request'
from /usr/local/lib/ruby/1.8/net/http.rb:736:in `request_head'
from my_webchxr.rb:55:in `check_html_headers'
from my_webchxr.rb:156:in `check_href'
from my_webchxr.rb:155:in `each'
from my_webchxr.rb:155:in `check_href'
from my_webchxr.rb:232:in `main_loop'
from my_webchxr.rb:223:in `each'
from my_webchxr.rb:223:in `main_loop'
from my_webchxr.rb:248
#--------------------------------------------
code from http.rb: (line 1547 is labeled)
def read_status_line( sock )
str = sock.readline
m = /\AHTTP(?:\/(\d+\.\d+))?\s+(\d\d\d)\s*(.*)\z/in.match(str) or
raise HTTPBadResponse, "wrong status line: #{str.dump}"
m.to_a[1,3] # line 1547
end
#--------------------------------------------
This is code from my_webchxr.rb:
def check_html_headers(url)
# check html headers on url
# return nil if OK
# return error msg if not ok
host,path = urlparse(url)
# used with ruby 1.6.7 and 1.6.8, http 1.1
# Net::HTTP.version_1_1 # declare to use ver 1.1 features
# h = Net::HTTP.new(host,80)
# reply = h.head(path,nil)
# re = /^30[12]/ # error codes 301/302 are OK (moved)
# use with ruby 1.8.0, http 1.2
Net::HTTP.version_1_2 # declare to use ver 1.2 features
http = Net::HTTP.start(host, 80)
reply = http.request_head(path)
puts "Check_headers1: #{url} Code = #{reply.code} Msg = #{reply.message}"
return nil if /^(2|3)\d\d/ =~ reply.code # OK if code = 200 or 30x (moved)
return "http://#{url} Request_head error: #{reply.code} Msg =
#{reply.message}\n"
rescue Timeout::Error => errmsg
puts "Check_headers2: #{url} Timeout::Error: #{errmsg}"
return "http://#{url} Timeout::Error: #{errmsg}\n"
rescue => errmsg
puts "Check_headers3: #{url} Other Error: #{errmsg}"
# return nil if re =~ errmsg # error codes 301/302 are OK (moved)
return "http://#{url} Other Error: #{errmsg}\n"
end
def check_html_data(url)
# check hdr and html data on url
# return nil if OK
# return error msg if not OK
host,path = urlparse(url)
# used with ruby 1.6.7 and 1.6.8, http 1.1
# Net::HTTP.version_1_1 # declare to use ver 1.1 features
# h = Net::HTTP.new(host,80)
# hdr,data = h.get(path,nil)
# puts "Check_data1: #{url} Code = #{hdr.code} Msg = #{hdr.message}"
# re = /^30[12]/ # error codes 301/302 are OK (website moved)
# use with ruby 1.8.0, http 1.2
Net::HTTP.version_1_2 # declare to use ver 1.2 features
http = Net::HTTP.start(host, 80)
reply = http.request_get(path)
puts "Check_data1: #{url} Code = #{reply.code} Msg = #{reply.message}"
return nil if /^(2|3)\d\d/ =~ reply.code # OK if code = 200 or 30x (moved)
return "http://#{url} Request_get error: #{reply.code} Msg =
#{reply.message}\n"
rescue Timeout::Error => errmsg
puts "Check_data2: #{url} Timeout::Error: #{errmsg}\n"
return "http://#{url} Timeout::Error: #{errmsg}\n"
rescue => errmsg
puts "Check_data3: #{url} Other Error: #{errmsg}\n"
# return nil if re =~ errmsg # error codes 301/302 are OK (website
moved)
return "http://#{url} Other Error: #{errmsg}\n"
end