[#2617] irb for 1.5.x — Andrew Hunt <Andy@...>
5 messages
2000/05/03
[#2639] OT: Japanese names — Dave Thomas <Dave@...>
4 messages
2000/05/09
[#2643] Ruby Toplevel — Dave Thomas <Dave@...>
7 messages
2000/05/09
[#2656] Re: Append alias for Array.append? — Aleksi Niemel<aleksi.niemela@...>
Hideto ISHIBASHI:
5 messages
2000/05/09
[#2660] win OLE / eRuby — Andrew Hunt <Andy@...>
8 messages
2000/05/09
[#2663] Re: win OLE / eRuby — Aleksi Niemel<aleksi.niemela@...>
>At Tue, 9 May 2000 09:14:51 -0400,
4 messages
2000/05/09
[#2667] The reference manual is now online — Dave Thomas <Dave@...>
6 messages
2000/05/09
[#2668] Re: The reference manual is now online — schneik@...
4 messages
2000/05/09
[#2702] Re: Append alias for Array.append? — Andrew Hunt <andy@...>
>From: Aleksi Niemel<aleksi.niemela@cinnober.com>
7 messages
2000/05/10
[#2752] RE: Array.pop and documentation [was: Append al ias for Array.append?] — Aleksi Niemel<aleksi.niemela@...>
6 messages
2000/05/11
[#2758] Re: irb install — Andrew Hunt <andy@...>
>|Excellent! Will you consider adding mod_ruby to install_app as
7 messages
2000/05/11
[#2777] Re: irb install
— "NAKAMURA, Hiroshi" <nakahiro@...>
2000/05/12
Hi,
[#2764] More code browsing questions — Albert Wagner <alwagner@...>
I see some class definitions contain "include" and "extend" statements.
6 messages
2000/05/12
[#2843] Re: editors for ruby — "Conrad Schneiker" <schneiker@...>
(Posted on comp.lang.ruby and ruby-talk ML.)
6 messages
2000/05/17
[#2874] RE: simple httpd for local use — Aleksi Niemel<aleksi.niemela@...>
> I personally use it for access to full-text indexed linux
6 messages
2000/05/18
[#2875] Re: simple httpd for local use
— hipster <hipster@...4all.nl>
2000/05/18
On Thu, 18 May 2000 09:10:28 +0200, Aleksi Niemelwrote:
[#2920] SWIG: virtual variable? — Yasushi Shoji <yashi@...>
hello,
4 messages
2000/05/22
[#2928] FYI: What our Python friends are up to. — "Conrad Schneiker" <schneiker@...>
Hi,
8 messages
2000/05/22
[#2964] Thank you — h.fulton@...
Thanks, Matz (and others) for your replies to
4 messages
2000/05/24
[#2973] Re: Socket.getnameinfo — ts <decoux@...>
>>>>> "D" == Dave Thomas <Dave@thomases.com> writes:
10 messages
2000/05/25
[#3016] rbconfig.rb — Dave Thomas <Dave@...>
5 messages
2000/05/28
[#3039] Re: Final for World Series: Python vs Ruby — "Dat Nguyen" <thucdat@...>
1 message
2000/05/30
[#3058] FailureClass? — Aleksi Niemel<aleksi.niemela@...>
Question arising from the FAQ:
7 messages
2000/05/31
[ruby-talk:02965] Re: Messages: [BUG] Segmentation Fault
From:
"David Douthitt" <DDouthitt@...>
Date:
2000-05-24 14:29:03 UTC
List:
ruby-talk #2965
The script isn't too small.... but....
I didn't change the script. The first time I received a SegFault was under HP-UX 10.20, but it went away as I kept developing the code.
The second appeared in this environment (listed below) in this same code, but went away. It was not at the same place listed below.
Some of these appear to start showing up, then disappear spontaneously.
The program runs as a cron job, and all three invokations listed below generate the same error at the same place.
# ruby -v
ruby 1.4.3 (1999-12-08) [i586-linux-gnu]
# uname -a
Linux system-xyz.ournet.wherever 2.2.9-27mdk #1 Mon Jun 14 16:44:05 CEST 1999 i586 unknown
# crontab -l
[...snip...]
9,19,29,39,39,49,59 * * * Mon-Fri /usr/local/bin/logs2web -n ccdserv appserv devserv stat1 stat2 sysadm dbserv1 "172.16.3.71" "172.16.3.72" "172.16.3.73"
4,14,24,34,44,54 * * * Mon-Fri /usr/local/bin/logs2web -sn xntpd named oracle syslog syslogd vmunix unix kernel ftpd telnetd hosts.allow
5,15,25,35,45,55 * * * Mon-Fri /usr/local/bin/logs2web -sh hosts.allow
[...snip...]
# rpm -qi ruby
Name : ruby Relocations: /usr
Version : 1.4.3 Vendor: MandrakeSoft
Release : 3mdk Build Date: Tue Feb 15 19:47:28 2000
Install date: Thu Mar 2 17:00:27 2000 Build Host: kenobi.mandrakesoft.com
Group : Development/Languages Source RPM: ruby-1.4.3-3mdk.src.rpm
Size : 2313282 License: GPL
Packager : Atsushi Yamagata <yamagata@plathome.co.jp>
URL : http://www.netlab.co.jp/ruby/jp/
Summary : Object Oriented Script Language
Description :
Ruby is the interpreted scripting language for quick and
easy object-oriented programming. It has many features to
process text files and to do system management tasks (as in
Perl). It is simple, straight-forward, and extensible.
The message:
/usr/local/bin/logs2web:2: [BUG] Segmentation fault
The script:
#!/usr/bin/env ruby
require("getopts")
#----------------------------------
# CLASSES
#----------------------------------
class File
def File.any_exist? (*files)
# the flatten is necessary for
# cases where the argument is an array -
# instead of strings.
#
# any_exist("fooe", "foo2") ===> files == [ "fooe", "foo2" ]
# any_exist(ary) ===> files == [[ "fooe", "foo2" ]]
return (files.flatten.find { |file|
File.exist?(file)
}) != nil
end
def File.zap_existing (*files)
files.flatten.select { |file|
File.exist?(file)
}.each { |file|
File.unlink(file)
# File.unlink(file + ".html") if File.exist?(file + ".html")
}
end
end
class MessageWork < File
@message_work = "message." + $$.to_s
@lines = 5000
def MessageWork.create
system "/usr/bin/tail -#{@lines} /var/log/messages > #{@message_work}"
end
def MessageWork.split
$*.each { |sys|
next if sys == "others"
if ($subsystems)
system "egrep ':.. [^ ]* (in\.|)#{sys}' #{@message_work} > #{sys}"
else
system "grep ':.. #{sys} ' #{@message_work} > #{sys}"
end
}
end
def MessageWork.others
system "cat " + $*.join(" ") + " #{@message_work} | sort | uniq -u > others"
end
def MessageWork.erase
unlink(@message_work) unless $keep
end
end
class WebPage
def initialize (name)
@page_name = name + ".html"
@log_name = name
@web_page = "/home/httpd/html/it/unix/logs/" + @page_name
end
def install
File.rename(@page_name, @web_page)
end
def create
opts = ""
opts += "-n" if $no_color
opts += "-h" if $host_file
# system "/usr/bin/time -f \"real %e, user %U, sys %S\" nice /usr/local/bin/log2html #{opts} #{@log_name} > #{@page_name}"
system "/usr/local/bin/log2html #{opts} #{@log_name} > #{@page_name}"
File.unlink(@log_name)
end
end
#----------------------------------
# MAIN PROGRAMME
#----------------------------------
getopts("skznh")
$subsystems = $OPT_s
$host_file = $OPT_h
$keep = $OPT_k
$no_color = $OPT_n
$zap_old_files = $OPT_z
Dir.chdir("/tmp/log2html")
if File.any_exist?($*)
if $zap_old_files
File.zap_existing($*)
else
exit 1
end
end
MessageWork.create
MessageWork.split
if ! $subsystems
MessageWork.others
$*.push "others"
end
MessageWork.erase
$*.each { |sys|
page = WebPage.new(sys)
page.create
page.install
}
>>> matz@netlab.co.jp 5/23/00 10:15p >>>
Hi,
In message "[ruby-talk:02955] Messages: [BUG] Segmentation Fault"
on 00/05/23, "David Douthitt" <DDouthitt@cuna.com> writes:
|What causes these? I got several under HP-UX 10.20 first week I used Ruby; now I'm getting them under Linux Mandrake with kernel 2.2.9-27mdk.
|
|They are popping up in a cron job, and no changes have been made to the code or to the system.
Could you show me detailed information?
Ruby version, platform, error reproducing script (preferably small),
input, output, etc.
matz.