From owner-freebsd-bugs Tue Feb 12 19:20: 8 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 88AFF37B41B for ; Tue, 12 Feb 2002 19:20:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g1D3K1v12846; Tue, 12 Feb 2002 19:20:01 -0800 (PST) (envelope-from gnats) Received: from wapsolutions.co.nz (port-91-96.fastadsl.net.nz [203.96.91.96]) by hub.freebsd.org (Postfix) with ESMTP id D669937B405 for ; Tue, 12 Feb 2002 19:17:33 -0800 (PST) Received: (from jonc@localhost) by wapsolutions.co.nz (8.11.6/8.11.6) id g1D3HBo00755; Wed, 13 Feb 2002 16:17:11 +1300 (NZDT) (envelope-from jonc) Message-Id: <200202130317.g1D3HBo00755@wapsolutions.co.nz> Date: Wed, 13 Feb 2002 16:17:11 +1300 (NZDT) From: Jonathan Chen Reply-To: Jonathan Chen To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: kern/34895: Linuxulator linux_fcntl64() doesn't handle mode F_SETLKW64 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 34895 >Category: kern >Synopsis: Linuxulator linux_fcntl64() doesn't handle mode F_SETLKW64 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Feb 12 19:20:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Jonathan Chen >Release: FreeBSD 4.5-STABLE i386 >Organization: >Environment: System: FreeBSD central.wapsolutions.co.nz 4.5-STABLE FreeBSD 4.5-STABLE #0: Tue Jan 29 16:21:08 NZDT 2002 root@central.wapsolutions.co.nz:/usr/obj/usr/src/sys/GENERIC i386 >Description: When Linux Informix-SE, any attempt to create a database will fail with a Invalid argument error. Running truss(1) on the sqlexec process reveals the following: [...] linux_open("a.dbs/syscolumns.idx",32770,00) = 4 (0x4) linux_fcntl64(0x4,0x2,0x1) = 0 (0x0) linux_open("a.dbs/syscolumns.dat",32770,00) = 5 (0x5) linux_fcntl64(0x5,0x2,0x1) = 0 (0x0) linux_fcntl64(0x4,0xe,0x8193a88) ERR#22 'Invalid argument' write(1,0x81a4500,22) = 22 (0x16) [...] A quick look at a Linux system's /usr/include/bits/fcntl.h shows: [...] /* Values for the second argument to `fcntl'. */ #define F_DUPFD 0 /* Duplicate file descriptor. */ #define F_GETFD 1 /* Get file descriptor flags. */ #define F_SETFD 2 /* Set file descriptor flags. */ #define F_GETFL 3 /* Get file status flags. */ #define F_SETFL 4 /* Set file status flags. */ #ifndef __USE_FILE_OFFSET64 # define F_GETLK 5 /* Get record locking info. */ # define F_SETLK 6 /* Set record locking info (non-blocking). */ # define F_SETLKW 7 /* Set record locking info (blocking). */ #else # define F_GETLK F_GETLK64 /* Get record locking info. */ # define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ # define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ #endif #define F_GETLK64 12 /* Get record locking info. */ #define F_SETLK64 13 /* Set record locking info (non-blocking). */ #define F_SETLKW64 14 /* Set record locking info (blocking). */ [...] I'm assuming that the '0xe' in the invalid call above refers to F_SETLKW64 on the Linux side. Any tips to fix this appreciated. >How-To-Repeat: Install and load linux_base-7 Download Informix SE http://www.informix.com/evaluate/ and install. Attempt to create a database >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message