Date: Mon, 16 Dec 2002 20:28:33 +0600 (NOVT) From: "Rashid N. Achilov" <shelton@sentry.granch.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: docs/46291: correlation between HZ kernel config parameter and socket timeouts is not documented Message-ID: <200212161428.gBGESXYU042969@sentry.granch.ru>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212161428.gBGESXYU042969>