From owner-freebsd-bugs@freebsd.org Wed May 9 04:25:40 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 A12E2FA81F3 for ; Wed, 9 May 2018 04:25:40 +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 39F366ECCE for ; Wed, 9 May 2018 04:25:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id E50D8FA81EF; Wed, 9 May 2018 04:25:39 +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 A55B4FA81EE for ; Wed, 9 May 2018 04:25:39 +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 386B26ECCC for ; Wed, 9 May 2018 04:25:39 +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 4E60D5281 for ; Wed, 9 May 2018 04:25:38 +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 w494Pcc4098339 for ; Wed, 9 May 2018 04:25:38 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w494PcYo098338 for bugs@FreeBSD.org; Wed, 9 May 2018 04:25:38 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 228087] F_SETLK randomly fails on NFS4 in threaded operation in MySQL Date: Wed, 09 May 2018 04:25:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: barry.boes@acciodata.com 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 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.25 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2018 04:25:40 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D228087 Bug ID: 228087 Summary: F_SETLK randomly fails on NFS4 in threaded operation in MySQL Product: Base System Version: 11.1-STABLE Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: barry.boes@acciodata.com Tried in 10.4, 11.1-RELEASE, 11.1-STABLE, and 11.2-PRERELEASE client and server. Currently client and server are 11.2-PRERELEASE. Ktrace shows the following : 66181 mysqld CALL close(0x30) 66181 mysqld RET openat 48/0x30 66181 mysqld CALL fcntl(0x30,F_SETLK,0x7fffdd3e5cc0) 66181 mysqld RET close 0 66181 mysqld RET fcntl -1 errno 13 Permission denied Examining a full trace, the files being locked are never locked twice by My= SQL or locked by another process. The file closed in the first line is a diffe= rent file than that opened in the second line. MySQL does this same operation = tens or hundreds of thousands of times successfully then fails on one. From all= of the trace data that I've been able to gather, the FCNTL works 100% of the t= ime IF the close returns before another thread calls open and F_SETLK and fails 100% of the time that the SETLK completes before the close returns in anoth= er thread. Observation affects the results. Failure occurs tens to hundreds of ti= mes more rapidly when not tracing the process. The higher the network latency, the more likely it is to happen. With a latency of 200uS, it happens in seconds on a loaded server. With a latency= of 100us, it happens in tens of seconds. With a latency of 20uS it happens rarely, and below 15uS I have yet to see this failure. No kernel messages are logged. I have duplicated the problem on a variety = of hardware, from 28 core Supermicro motherboards with ECC memory and E5-2XXX = V4's to laptops with i3's, 5's, or 7's. The filesystem setup is as follows : server : ZFS on 11.2-PRERELEASE configured for very low latency (optimized = SSDs and persistent write caches or sync=3Ddisabled). The filesystem is either a base ZFS filesystem or a clone of a snapshot (for easy testing, it happens on either). The client mounts the server system via NFS4 and also runs 11-2-PRERELEASE.= =20 Tested with 100Mb, gigabit, 50 gigabit, and 100Gigabit NICs. --=20 You are receiving this mail because: You are the assignee for the bug.=