Date: Tue, 11 Dec 2001 18:41:31 +0100 From: Willem van Engen <wvengen@stack.nl> To: "Andrew Gallatin" <gallatin@cs.duke.edu> Cc: freebsd-emulation@freebsd.org Subject: Re: flexlm: works with linux_base-6, fails with linux_base-7 Message-ID: <20011211184131.0425b1fd.wvengen@stack.nl> In-Reply-To: <15382.5752.295875.987980@grasshopper.cs.duke.edu> References: <20011210115204.6ddde325.wvengen@stack.nl> <15382.5752.295875.987980@grasshopper.cs.duke.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 11 Dec 2001 09:21:44 -0500 (EST) "Andrew Gallatin" <gallatin@cs.duke.edu> wrote: > > Willem van Engen writes: > > 492 maplelmg CALL open(0x80c3ee0,0x42,0x1b6) > > 492 maplelmg NAMI "/compat/linux/usr/tmp" > > 492 maplelmg NAMI "/usr/tmp/lockmaplelmg" > > 492 maplelmg RET open 5 > > 492 maplelmg CALL semget(0x5,0x6,0xbfbff12c) > > 492 maplelmg RET semget -1 errno -22 Unknown error: -22 > > When posting kdumps of linux binaries, make sure to use linux_kdump, > not kdump. The system call numbers are different between FreeBSD & > linux. If you use the wrong kdump, you get misleading output. I see, thanks! > The failing syscall there (semget == #221) is actually linux_fcntl64 > Try enabling debugging for linux_fcntl64 in > sys/compat/linux/linux_file.c Ok, I compiled a kernel module with DEBUG defined and added some extra printf's. The relevant output can be found below. So this is a fcntl64(fd, F_SETLK, {0,0,0,F_WRLCK,SEEK_CUR}). When I look at it with linux_base-6, the same arguments are used. At the moment I have no clue. - Willem Kernel messages: Dec 11 18:21:27 jeremy /kernel: linux(1960): fstat64(4, *) Dec 11 18:21:27 jeremy /kernel: linux(1960): mmap(0, 8192, 3, 0x00000022, -1, 0) Dec 11 18:21:27 jeremy /kernel: -> (0, 8192, 3, 0x00001002, -1, 0) Dec 11 18:21:27 jeremy /kernel: linux(1960): llseek(4, 0:0, 0) Dec 11 18:21:27 jeremy /kernel: linux(1960): open(/usr/tmp/lockmaplelmg, 0x42, 0x1b6) Dec 11 18:21:27 jeremy /kernel: linux(1960): open returns error 0 Dec 11 18:21:27 jeremy /kernel: linux(1960): fcntl64(4, 00000006, *) Dec 11 18:21:27 jeremy /kernel: > fcntl_bsd(4, F_SETLK, flock) Dec 11 18:21:27 jeremy /kernel: > bsd.l_start = 0, lin.l_start = 0 Dec 11 18:21:27 jeremy /kernel: > bsd.l_len = 0, lin.l_len = 0 Dec 11 18:21:27 jeremy /kernel: > bsd.l_pid= 0, lin.l_pid = 0 Dec 11 18:21:27 jeremy /kernel: > bsd.l_type= 3, lin.l_type = 1 Dec 11 18:21:27 jeremy /kernel: > bsd.l_whence= 1, lin.l_whence = 1 Dec 11 18:21:27 jeremy /kernel: linux(1960): time(*) Dec 11 18:21:27 jeremy /kernel: linux(1959): real select returns 4 Dec 11 18:21:27 jeremy /kernel: linux(1959): select_out -> 4 Dec 11 18:21:27 jeremy /kernel: linux(1959): sendsig(0x8050550, 20, 0xc9074f2c,0) linux_kdump with linux_base-7: 925 maplelmg CALL close(0x4) 925 maplelmg RET close 0 925 maplelmg CALL munmap(0x28203000,0x2000) 925 maplelmg RET munmap 0 925 maplelmg CALL linux_open(0x80c3ee0,0x42,0x1b6) 925 maplelmg NAMI "/compat/linux/usr/tmp" 925 maplelmg NAMI "/usr/tmp/lockmaplelmg" 925 maplelmg RET linux_open 4 925 maplelmg CALL linux_fcntl64(0x4,0x6,0xbfbff114) 925 maplelmg RET linux_fcntl64 -1 errno 22 Invalid argument 925 maplelmg CALL close(0x4) 925 maplelmg RET close 0 925 maplelmg CALL linux_time(0) 925 maplelmg RET linux_time 1008086436/0x3c162da4 925 maplelmg CALL write(0x1,0x280d6000,0x5d) 925 maplelmg GIO fd 1 wrote 93 bytes "17:00:36 (maplelmg) cannot establish lock - exiting (file: /usr/tmp/lo\ ckmaplelmg, errno: 22) " 925 maplelmg RET write 93/0x5d 925 maplelmg CALL close(0x1) 925 maplelmg RET close 0 925 maplelmg CALL munmap(0x280d6000,0x2000) 925 maplelmg RET munmap 0 925 maplelmg CALL exit(0x29) 924 lmgrd PSIG SIGCHLD caught handler=0x8050550 mask=0x0 code=0x0 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011211184131.0425b1fd.wvengen>