From owner-freebsd-bugs@freebsd.org Wed Aug 1 21:20:25 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 8945E1069688 for ; Wed, 1 Aug 2018 21:20:25 +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 0CBB988CAD for ; Wed, 1 Aug 2018 21:20:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id C56781069687; Wed, 1 Aug 2018 21:20:24 +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 A35561069686 for ; Wed, 1 Aug 2018 21:20:24 +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 3A4BC88CAC for ; Wed, 1 Aug 2018 21:20:24 +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 87AE31FDBB for ; Wed, 1 Aug 2018 21:20:23 +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 w71LKNxR065204 for ; Wed, 1 Aug 2018 21:20:23 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w71LKN4D065203 for bugs@FreeBSD.org; Wed, 1 Aug 2018 21:20:23 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 230273] linux_select CALL is very slow (100 ms) Date: Wed, 01 Aug 2018 21:20:23 +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.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jasonmader@gmail.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.27 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2018 21:20:25 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D230273 Bug ID: 230273 Summary: linux_select CALL is very slow (100 ms) Product: Base System Version: 11.2-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: jasonmader@gmail.com Linux compatibility layer is taking a long time with either a read() or select() in a jail. I noticed this because the select() is called about 20 times during a network exchange, so the network communication takes about 2 seconds. I always see this take 100 ms, so it makes me think it's a timeout= of some kind. 0.000007856 linux_time(0x0) =3D 1533157182 (0x5b621f3e) 0.000017328 linux_newstat("/etc/localtime",0x7fffffffc500) =3D 0 (0x0) 0.000009030 linux_select(0x1,0x7fffffffd310,0x0,0x0,0x7fffffffd390) =3D 1 (= 0x1) 0.000009219 read(0,"f\0\0\0",4) =3D 4 (0x4) 0.104589092 linux_select(0x1,0x7fffffffd290,0x0,0x0,0x7fffffffd310) =3D 1 (= 0x1) Here's a ktrace of a similar call sequence, 70145 lstc_server CALL linux_time(0) 70145 lstc_server RET linux_time 1533157805/0x5b6221ad 70145 lstc_server CALL linux_newstat(0x800b56e6b,0x7fffffffc500) 70145 lstc_server NAMI "/compat/linux/etc/localtime" 70145 lstc_server NAMI "/etc/localtime" 70145 lstc_server STRU struct stat {dev=3D2853443365, ino=3D53, mode=3D01= 00444, nlink=3D1, uid=3D0, gid=3D0, rdev=3D4294967295, atime=3D1504808312.22183000= 0, mtime=3D1504808312.221900000, ctime=3D1532210790.994694000, birthtime=3D1504808312.221900000, size=3D118, blksize=3D4096, blocks=3D1, f= lags=3D0x800 } 70145 lstc_server RET linux_newstat 0 70145 lstc_server CALL linux_select(0x1,0x7fffffffd310,0,0,0x7fffffffd390) 70145 lstc_server RET linux_select 1 70145 lstc_server CALL read(0,0x7fffffffd3a0,0x4) 70145 lstc_server GIO fd 0 read 4 bytes "f\0\0\0" 70145 lstc_server RET read 4 70145 lstc_server CALL linux_select(0x1,0x7fffffffd290,0,0,0x7fffffffd310) 70145 lstc_server RET linux_select 1 And maybe related, or not, even with jail { sysvsem; } linux_semop() always returns an error. 0.000006559 linux_time(0x0) =3D 1533157182 (0x5b621f3e) 0.000007433 linux_semop(0x20000,0x7fffffffd3d0,0x1) ERR#-11 'Resource temporarily unavailable' 0.000380425 linux_select(0x6,0x7fffffffd310,0x0,0x0,0x7fffffffd390) =3D 1 (= 0x1) 0.000010566 linux_accept(0x4,0x0,0x7fffffffd3ac) =3D 0 (0x0) 0.000007921 linux_getpeername(0x0,0x7fffffffd1b0,0x7fffffffd1cc) =3D 0 (0x0) 0.000007532 linux_getpeername(0x0,0x7fffffffd1b0,0x7fffffffd1cc) =3D 0 (0x0) 0.000009828 linux_semop(0x20000,0x7fffffffd3d0,0x1) ERR#-11 'Resource temporarily unavailable' 0.000009462 linux_getpeername(0x0,0x7fffffffd3c0,0x7fffffffd3dc) =3D 0 (0x0) 0.000009209 linux_getpeername(0x0,0x7fffffffd3c0,0x7fffffffd3dc) =3D 0 (0x0) --=20 You are receiving this mail because: You are the assignee for the bug.=