From owner-freebsd-bugs@freebsd.org Wed Sep 12 16:39:55 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 440871097F0D for ; Wed, 12 Sep 2018 16:39:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id D304689EE2 for ; Wed, 12 Sep 2018 16:39:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 94B2C1097F0C; Wed, 12 Sep 2018 16:39:54 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72BD81097F0B for ; Wed, 12 Sep 2018 16:39:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1314489EE1 for ; Wed, 12 Sep 2018 16:39:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 71F2F13B3D for ; Wed, 12 Sep 2018 16:39:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w8CGdrHR080749 for ; Wed, 12 Sep 2018 16:39:53 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w8CGdrkB080748 for bugs@FreeBSD.org; Wed, 12 Sep 2018 16:39:53 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 231330] nscd does not work for long lines in /etc/group Date: Wed, 12 Sep 2018 16:39:53 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: pa@chalmers.se X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2018 16:39:55 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D231330 Bug ID: 231330 Summary: nscd does not work for long lines in /etc/group Product: Base System Version: 11.2-STABLE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: pa@chalmers.se Created attachment 197057 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D197057&action= =3Dedit Relevant config files and source for test program If I have long entry in /etc/groups it looks like nscd fails to respond and= I get timeouts. If I restart nscd, the first time I do getgrnam I get a cache miss and it w= orks as intended but on following calls it takes very long time: =3D=3D=3D=3D=3D Restart nscd: root@plywood:/users/pa # /etc/rc.d/nscd restart Stopping nscd. Waiting for PIDS: 63354. Starting nscd. Do getgrnam on the affected group (group entry about 3500 bytes): plywood> time ./getgrnam testgroup1 testgroup1 gr_name=3Dtestgroup1 gr_gid=3D20000 0.000u 0.002s 0:00.00 0.0% 0+0k 0+0io 0pf+0w plywood> time ./getgrnam testgroup1 testgroup1 gr_name=3Dtestgroup1 gr_gid=3D20000 0.000u 0.002s 0:16.26 0.0% 0+0k 0+0io 0pf+0w plywood> time ./getgrnam testgroup1 testgroup1 gr_name=3Dtestgroup1 gr_gid=3D20000 0.000u 0.002s 0:16.09 0.0% 0+0k 0+0io 0pf+0w On a not affected group (group entry about 1400 bytes): plywood> time ./getgrnam testgroup2 testgroup2 gr_name=3Dtestgroup2 gr_gid=3D20001 0.000u 0.002s 0:00.00 0.0% 0+0k 0+0io 0pf+0w plywood> time ./getgrnam testgroup2 testgroup2 gr_name=3Dtestgroup2 gr_gid=3D20001 0.000u 0.001s 0:00.00 0.0% 0+0k 0+0io 0pf+0w plywood> time ./getgrnam testgroup2 testgroup2 gr_name=3Dtestgroup2 gr_gid=3D20001 0.000u 0.001s 0:00.00 0.0% 0+0k 0+0io 0pf+0w =3D=3D=3D=3D=3D=3D If I enable debug in nscd and run nscd -nst I can see that the I/O is done = by query_socket_write when the entry is small and it works, but when the entry= is large it takes the path to query_io_buffer_write instead. --=20 You are receiving this mail because: You are the assignee for the bug.=