From owner-freebsd-emulation@FreeBSD.ORG Tue Feb 3 11:20:35 2004 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBBE916A4CF; Tue, 3 Feb 2004 11:20:35 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A2AD43D4C; Tue, 3 Feb 2004 11:20:32 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i13JKVVM085309; Tue, 3 Feb 2004 13:20:31 -0600 (CST) (envelope-from dan) Date: Tue, 3 Feb 2004 13:20:31 -0600 From: Dan Nelson To: "Walter C. Pelissero" Message-ID: <20040203192031.GB77596@dan.emsphone.com> References: <16409.17392.62258.191839@hyde.home.loc> <200401291747.i0THlLL04725@clunix.cl.msu.edu> <16415.61145.783013.602178@hyde.home.loc> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16415.61145.783013.602178@hyde.home.loc> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.5.1i cc: freebsd-emulation@freebsd.org cc: freebsd-questions@freebsd.org Subject: Re: Acu Cobol 6.0 for Linux X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.1 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: Tue, 03 Feb 2004 19:20:36 -0000 In the last episode (Feb 03), Walter C. Pelissero said: > I tried linux_kdump (from ports) and things seem to clarify a bit. > > I concentrated on acushare, which is the daemon that supervises > inter-process locking (locking on file access) and licence > verification. Whereas acushare seems to start properly, an attempt to > kill it through the recommended means (not with kill(1)), yields an > IPC error. On Linux strace on the daemon process shows: > > msgrcv(256, {1, "\254\1\0\0\6\0\0\0\6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...}, 100, 1, MSG_NOERROR) = 12 > getpid() = 376 > getuid32() = -1 ENOSYS (Function not implemented) > msgctl(256, IPC_STAT, 0xbffffa54) = 0 > msgsnd(256, {428, "x\1\0\0\6\0\0\0\6\0\0\0"}, 12, 0) = 0 > > That is, msgrcv returns a 12 bytes long message and the daemon > answers. On FreeBSD, on the other hand: > > 75838 acushare RET linux_ipc 12/0xc > 75838 acushare CALL linux_getpid > 75838 acushare RET linux_getpid 75838/0x1283e > 75838 acushare CALL linux_ipc(0xe,0x50000,0x102,0,0xbfbff444,0) > 75838 acushare RET linux_ipc -1 errno 22 Invalid argument > 75838 acushare CALL linux_time(0xbfbff49c) > 75838 acushare RET linux_time 1075830865/0x401fe051 > 75838 acushare CALL write(0,0x2806f000,0x4a) > 75838 acushare GIO fd 0 wrote 74 bytes > "acushare: 2004-02-03 18:54:25: Error replying to test message from run\ > cbl > " > > That is, linux_ipc (possibly a catch-all name for the Linux IPC > functions family), returns a 12 bytes long message, but when it is > supposed to do the msgctl it fails miserably with an errno 22. > > I couldn't make sense out of the six arguments to linux_ipc shown in > the kdump. Does anyone know how to interprete them? linux_ipc is emulated in /sys//linux/linux_machdep.c, and in linux.h: #define LINUX_MSGCTL 14 so the switch() in linux_ipc ends up calling linux_msgctl in /sys/compat/linux/linux_ipc.c. Do you have SYSV message queues enabled in your kernel? Stick "options SYSVMSG" in your config file and rebuild, or "kldload sysvmsg" if you have the module. If you do have sysvmsg loaded, you may have to start adding printfs in linux_msgctl() to trace which call is failing and why. -- Dan Nelson dnelson@allantgroup.com