From owner-freebsd-emulation@FreeBSD.ORG Sun Apr 28 09:08:01 2013 Return-Path: Delivered-To: emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 76CDB98A for ; Sun, 28 Apr 2013 09:08:01 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell0.rawbw.com (shell0.rawbw.com [198.144.192.45]) by mx1.freebsd.org (Postfix) with ESMTP id 68D231E88 for ; Sun, 28 Apr 2013 09:08:01 +0000 (UTC) Received: from eagle.yuri.org (stunnel@localhost [127.0.0.1]) (authenticated bits=0) by shell0.rawbw.com (8.14.4/8.14.4) with ESMTP id r3S8twoC016805 for ; Sun, 28 Apr 2013 01:55:58 -0700 (PDT) (envelope-from yuri@rawbw.com) Message-ID: <517CE41E.2020007@rawbw.com> Date: Sun, 28 Apr 2013 01:55:58 -0700 From: Yuri User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130327 Thunderbird/17.0.4 MIME-Version: 1.0 To: emulation@freebsd.org Subject: Linux linux_fcntl64 with F_GETLK is faulty? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Apr 2013 09:08:01 -0000 While running a linux 32-bit program on 9.1 amd64, I see these two lines in truss log, and program also eventually fails: linux_open("/some/file/name",0x40,0644) = 5 (0x5) linux_fcntl64(0x5,0x7,0xffff8410,0xffff8410,0x2a988ff4,0x6) ERR#9 'Bad file descriptor' cmd=0x7 is F_GETLK in linux. Several questions with this: 1. Why EBADF error is returned? fd=5 appears to be a valid descriptor based on the presence of the previous open call. 2. Is file locking not implemented in linux emulator? Is this related to the issue when acrobat reader requires linux_adobe.ko kernel module and also consumes 100% CPU all the time due to some workaround? Theare are in make.conf of this system, if this matters: OVERRIDE_LINUX_BASE_PORT=f10 OVERRIDE_LINUX_NONBASE_PORTS=f10 Yuri