From owner-freebsd-doc Mon Dec 16 6:30: 8 2002 Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9AE2337B401 for ; Mon, 16 Dec 2002 06:30:06 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB8C743ED4 for ; Mon, 16 Dec 2002 06:30:05 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gBGEU5x3086310 for ; Mon, 16 Dec 2002 06:30:05 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gBGEU59E086309; Mon, 16 Dec 2002 06:30:05 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 98F7C37B401 for ; Mon, 16 Dec 2002 06:28:40 -0800 (PST) Received: from sentry.granch.ru (sentry.granch.ru [212.20.5.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E6B343E4A for ; Mon, 16 Dec 2002 06:28:39 -0800 (PST) (envelope-from shelton@sentry.granch.ru) Received: from sentry.granch.ru (IDENT:smmsp@localhost.granch.ru [127.0.0.1]) by sentry.granch.ru (8.12.6/8.12.6) with ESMTP id gBGESXE0042970 for ; Mon, 16 Dec 2002 20:28:33 +0600 (NOVT) (envelope-from shelton@sentry.granch.ru) Received: (from root@localhost) by sentry.granch.ru (8.12.6/8.12.6/Submit) id gBGESXYU042969; Mon, 16 Dec 2002 20:28:33 +0600 (NOVT) (envelope-from shelton) Message-Id: <200212161428.gBGESXYU042969@sentry.granch.ru> Date: Mon, 16 Dec 2002 20:28:33 +0600 (NOVT) From: "Rashid N. Achilov" Reply-To: "Rashid N. Achilov" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: docs/46291: correlation between HZ kernel config parameter and socket timeouts is not documented Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 46291 >Category: docs >Synopsis: correlation between HZ kernel config parameter and socket timeouts is not documented >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Mon Dec 16 06:30:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Rashid N. Achilov >Release: FreeBSD 4.7-STABLE i386 >Organization: Granch Ltd. >Environment: System: FreeBSD sentry.granch.ru 4.7-STABLE FreeBSD 4.7-STABLE #6: Mon Dec 9 09:59:17 NOVT 2002 shelton@sentry.granch.ru:/usr/src/sys/compile/Sentry i386 >Description: man setsockopt(2), FreeBSD Handbook and FreeBSD FAQ have missed a correlation between HZ kernel configuration parameter and maximal timeout, accessible to setsockopt() function, when try to set SO_SNDTIMEO or SO_RCVTIMEO. This correlation defined in ~sys/kern/uipc_socket.c in function sosetopt() and is SHRT_MAX / HZ. When HZ set to 1000 (advisable to DEVICE_POLLING), maximum timeout value shorted from 327 sec to 32 sec without any notification. Also I think, EDOM is not suitable error code this occassion. >How-To-Repeat: Include in your kernel config line HZ = 1000 recompile kernel, reload kernel and try to set socket timeout more than 32 sec. System replied: Numerical domain out or range. Which correlation has a math error to socket operation? >Fix: Delete HZ option in kernel config file or do not use socket timeouts more than SHRT_MAX / HZ (rounded to short int) >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message