Date: Thu, 25 May 1995 03:10:04 -0700 From: David Muir Sharnoff <muir@idiom.com> To: freebsd-bugs Subject: kern/443: 65 sendmails crashes system Message-ID: <199505251010.DAA20837@freefall.cdrom.com> In-Reply-To: Your message of Wed, 31 May 1995 22:00:06 -0700 <199506010500.WAA00734@idiom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>Number: 443 >Category: kern >Synopsis: 65 sendmails crashes system >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs (FreeBSD bugs mailing list) >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu May 25 03:10:01 1995 >Originator: David Muir Sharnoff >Organization: Idiom Consulting >Release: FreeBSD 2.0-RELEASE i386 >Environment: FreeBSD 2.0R on a Pentium 90, 32MB ram, NCR53c810, ST32550Ns >Description: I'm writing a little program to see how fast email can be sent. It kinda stresses the system a bit. I don't mind if my system pauses while it tries to cope, but it shouldn't crash. >How-To-Repeat: Run the following perl5 program on a system that's been configured to handle lots of processes (eg: Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mounted on procfs 4 4 0 100% 47 997 5% /proc Don't forget to change the email address first! I'm not sure what triggered the crash. I was trying to type renice -20 $$ on the console, I had a top running in an xterm, and of course, I had all the usuall things running like innd and xntpd. # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # mtt_send # echo x - mtt_send sed 's/^X//' >mtt_send << 'END-of-mtt_send' X#!/usr/local/bin/perl X X# X# Send fixed-size email messages very quickly for througput X# testing purposes. X# X# Each message has the following header: X# Subject: TTM $count $payload $interval $pid $message_number $current_time X# X# David Muir Sharnoff <muir@idiom.com>, 5/24/95 X# X X$mail_to = 'testmail'; X$count = 300; # messages X$payload = 200; # bytes in body X$interval = 0.2; # seconds, fractional okay X X$sendmail = '/usr/sbin/sendmail'; X$a_long_time = 2; # seconds for an email to really get there X X# ---------------------------------------------------------- X Xrequire 5.000; X$mail_from = getpwuid($<); X Xdie "no $sendmail" unless -x $sendmail; X X$body = "012345678901234567890123456789012345678\n" x ($payload+40 / 40); X$body = substr($body,1,$payload-1); X$body .= "\n"; X X$now = time; Xopen(SENDMAIL,"|$sendmail -t -oem -i") || die "open $sendmail: $!"; Xprint SENDMAIL <<END or die "write to $sendmail: $!"; XTo: $mail_to XFrom: $mail_from XSubject: TTM $count $payload $interval $$ 0 $now X XThis is a lead message to establish a timing baseline. XEND Xclose(SENDMAIL) or die "close $sendmail: $!"; Xsleep($a_long_time); X X$start_time = time; Xfor($sent = 1; $sent <= $count; $sent++) { X X $now = time; X $ideal = $sent * $interval; X $actual = $now - $start_time; X X if ($ideal > $actual) { X # going too fast X $delay = $ideal - $actual; X print STDERR "waiting for $delay seconds\n"; X select(undef,undef,undef,$delay); X } X X $pid = fork(); X redo unless defined $pid; X next if $pid; X X open(SENDMAIL,"|$sendmail -t -oem -i") || die "open $sendmail: $!"; X X $now = time; X print SENDMAIL <<END or die "write to $sendmail: $!"; XTo: $mail_to XFrom: $mail_from XSubject: TTM $count $payload $interval $$ $sent $now X X$body XEND X close(SENDMAIL) or die "close $sendmail: $!"; X print STDERR "message $sent away\n"; X X exit(0); X} X X$ideal = $sent * $interval; X$actual = time - $start_time; X Xprint STDERR "done.\n"; Xprint "$sent messages sent in $actual seconds.\n"; Xprintf "average message delay: %0.2f\n", $actual/$sent; Xprint "Timing run is not valid: requested delay: $interval\n" X if ($actual > $ideal * 1.10 + 1.0); X X END-of-mtt_send exit >Fix: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505251010.DAA20837>