[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ircd2.10.x on FreeBSD
At 06:07 PM 12/2/98 , Genady wrote:
>Yesterday, after compiling ircd2.10.1 at *.lv servers (FreeBSD), we
>expierenced the ircd to freeze when it reached ~240 users.
Yes, same problem on OpenBSD.
>We found it to be fixed by adding in the very beginning of the file
>common/os.h
># define FD_SETSIZE 1024
>(the number meant be more than than defined maxconnections).
You haven't got any warnings from compiler, have you? This is not good
solution. Here is a repost of mail from 3 weeks ago - some people don't
read this list??
X-From_: owner-ircd-dev@xxxxxxx Mon Nov 9 00:41:07 1998
Received: from irc.siol.net ([193.189.160.124]:63105 "EHLO irc.siol.net"
ident: "NO-IDENT-SERVICE[2]") by mail.over.net with ESMTP id <53881-231>;
Mon, 9 Nov 1998 00:40:53 +0100
Received: from oink.irc.org ([206.252.221.6]:35411 "HELO oink.irc.org"
ident: "NO-IDENT-SERVICE[2]") by mivak.siol.net with SMTP id <162348-1407>;
Mon, 9 Nov 1998 00:40:37 +0100
Delivered-To: ircd-dev-out@xxxxxxx
Received: by oink.irc.org (VMailer, from userid 97)
id 6FCE8387; Sun, 8 Nov 1998 18:41:42 -0500 (EST)
Delivered-To: ircd-dev@xxxxxxx
Received: from amon.siol.net (amon.siol.net [193.189.160.9])
by oink.irc.org (VMailer) with ESMTP
id 8AB10382; Sun, 8 Nov 1998 18:41:41 -0500 (EST)
Received: from hang ([193.189.182.172]) by amon.siol.net
(Post.Office MTA v3.5.1 release 219
ID# 620-52342U30000L30000S0V35) with SMTP id net;
Mon, 9 Nov 1998 00:40:31 +0100
Message-Id: <4.1.19981109003603.00ad4b10@xxxxxxxxxxxxx>
X-Misc: ...
X-Mailer: Microsoft-outside-compatible
Date: Mon, 09 Nov 1998 00:37:30 +0100
To: ircd-dev@xxxxxxx
From: Tomaz Borstnar <tomaz.borstnar@xxxxxxxx>
Subject: Fwd: Re: setup.h created by configure running on
openbsd-current (as of 15.10.1998)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: owner-ircd-dev@xxxxxxx
Precedence: list
Return-Path: <owner-ircd-dev@xxxxxxx>
This is what I got freem OpenBSD people. Since it looks useful for others
as well I am reposting this here. Does ircd use this method?
>X-From_: Todd.Miller@xxxxxxxxxxxxx Sat Nov 7 22:45:50 1998
>To: Tomaz Borstnar <tomaz.borstnar@xxxxxxxx>
>cc: Marco S Hyman <marc@xxxxxxxxx>, tech@xxxxxxxxxxx
>Subject: Re: setup.h created by configure running on openbsd-current (as of
>15.10.1998)
>Date: Sat, 07 Nov 1998 14:45:24 -0700
>From: "Todd C. Miller" <Todd.Miller@xxxxxxxxxxxxx>
>X-Orcpt: rfc822;tomaz.borstnar@xxxxxxxx
>
>Modern kernels are not limited by FD_SETSIZE. However, if you want to
>override it you should do so on the command line, not in an include file.
>Ie: in CFLAGS (or CPPFLAGS) in the Makefile you would add
>-DFD_SETSIZE=1024 (or whatever value). You may just want to complain
>to the auther that he should allocate the size of fd_set dynamically.
>Here's an example from sudo:
>
>OLD:
> fd_set readfds;
> FD_ZERO(&readfds);
> FD_SET(fileno(input), &readfds);
>
> ...
>
> while ((n = select(fileno(input) + 1, &readfds, 0, 0, &tv)) == -1) {
> ...
> }
>
>NEW:
> n = howmany(fileno(input) + 1, NFDBITS) * sizeof(fd_mask);
> if ((readfds = (fd_set *) malloc(n)) == NULL) {
> (void) fprintf(stderr, "Cannot allocate memory\n");
> exit(1);
> }
> (void) memset((VOID *)readfds, 0, n);
> FD_SET(fileno(input), readfds);
>
> ...
>
> while ((n = select(fileno(input) + 1, readfds, 0, 0, &tv)) == -1) {
> ...
> }
>
>There are many other examples throughout the OpenBSD source tree.
>
> - todd
>You can contact BOPOH (venq@xxxxxx) for any details, as he was compiling the
>ircd and he found the solution.
With this solution ircd compiles cleanly and works OK.
Tomaz
----
Tomaz Borstnar <tomaz.borstnar@xxxxxxxx>
"Love is the answer to the final question you ask" - Unknown