Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Nov 2002 02:29:40 -0500 (EST)
From:      Mathew Kanner <mat@cnd.mcgill.ca>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/45023: flexlm does not run with linux-base-7, stops matlab
Message-ID:  <200211070729.gA77Tef2034581@cnd184.cnd.mcgill.ca>

next in thread | raw e-mail | index | archive | help

>Number:         45023
>Category:       kern
>Synopsis:       flexlm does not run with linux-base-7, stops matlab
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 06 23:30:05 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Mathew Kanner
>Release:        FreeBSD 4.7-RELEASE i386
>Organization:
>Environment:
System: FreeBSD cnd184.cnd.mcgill.ca 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Wed Oct 9 15:08:34 GMT 2002 root@builder.freebsdmall.com:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:

FlexLM does not work with linux_base-7 but does with linux_base-6.
flock is the apparent cause.  Willem van Engen reported it on
freebsd-emulation on 12/10/2001, and Andrew Gallatin proposes the
solution here.

flexlm gives the vague error message:
cannot establish lock - exiting (file: "", errno: 22)

This allows me to run matlab

>How-To-Repeat:
	Run flexlm with linux-base-7
	
>Fix:

--- /usr/src/sys/compat/linux/linux_file.c	Mon Nov  5 14:08:22 2001
+++ /usr/src/sys/compat/linux/linux_file.c.new	Thu Nov  7 02:16:51 2002
@@ -766,8 +766,8 @@
 	}
 	bsd_flock->l_whence = linux_flock->l_whence;
 	bsd_flock->l_start = (off_t)linux_flock->l_start;
-	bsd_flock->l_len = (off_t)linux_flock->l_len;
-	bsd_flock->l_pid = (pid_t)linux_flock->l_pid;
+	bsd_flock->l_pid = 0;
+	bsd_flock->l_len = 0;
 }
 
 static void
@@ -818,8 +818,8 @@
 	}
 	bsd_flock->l_whence = linux_flock->l_whence;
 	bsd_flock->l_start = (off_t)linux_flock->l_start;
-	bsd_flock->l_len = (off_t)linux_flock->l_len;
-	bsd_flock->l_pid = (pid_t)linux_flock->l_pid;
+	bsd_flock->l_pid = 0;
+	bsd_flock->l_len = 0;
 }
 
 static void
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211070729.gA77Tef2034581>