[Bug 230273] linux_select CALL is very slow (100 ms)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Aug 1 21:20:25 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230273

            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 at FreeBSD.org
          Reporter: jasonmader at 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)                      = 1533157182 (0x5b621f3e)
0.000017328 linux_newstat("/etc/localtime",0x7fffffffc500) = 0 (0x0)
0.000009030 linux_select(0x1,0x7fffffffd310,0x0,0x0,0x7fffffffd390) = 1 (0x1)
0.000009219 read(0,"f\0\0\0",4)                  = 4 (0x4)
0.104589092 linux_select(0x1,0x7fffffffd290,0x0,0x0,0x7fffffffd310) = 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=2853443365, ino=53, mode=0100444,
nlink=1, uid=0, gid=0, rdev=4294967295, atime=1504808312.221830000,
mtime=1504808312.221900000, ctime=1532210790.994694000,
birthtime=1504808312.221900000, size=118, blksize=4096, blocks=1, flags=0x800 }
 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)                      = 1533157182 (0x5b621f3e)
0.000007433 linux_semop(0x20000,0x7fffffffd3d0,0x1) ERR#-11 'Resource
temporarily unavailable'
0.000380425 linux_select(0x6,0x7fffffffd310,0x0,0x0,0x7fffffffd390) = 1 (0x1)
0.000010566 linux_accept(0x4,0x0,0x7fffffffd3ac) = 0 (0x0)
0.000007921 linux_getpeername(0x0,0x7fffffffd1b0,0x7fffffffd1cc) = 0 (0x0)
0.000007532 linux_getpeername(0x0,0x7fffffffd1b0,0x7fffffffd1cc) = 0 (0x0)
0.000009828 linux_semop(0x20000,0x7fffffffd3d0,0x1) ERR#-11 'Resource
temporarily unavailable'
0.000009462 linux_getpeername(0x0,0x7fffffffd3c0,0x7fffffffd3dc) = 0 (0x0)
0.000009209 linux_getpeername(0x0,0x7fffffffd3c0,0x7fffffffd3dc) = 0 (0x0)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list