From lbnstn@lili23.lili.uni-bielefeld.de  Tue Nov 11 02:30:34 1997
Received: from lili23.lili.uni-bielefeld.de (lili23.lili.uni-bielefeld.de [129.70.23.23])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id CAA13940
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 11 Nov 1997 02:30:31 -0800 (PST)
          (envelope-from lbnstn@lili23.lili.uni-bielefeld.de)
Received: (from lbnstn@localhost)
	by lili23.lili.uni-bielefeld.de (8.8.5/8.8.5) id LAA01032;
	Tue, 11 Nov 1997 11:30:16 +0100 (CET)
Message-Id: <199711111030.LAA01032@lili23.lili.uni-bielefeld.de>
Date: Tue, 11 Nov 1997 11:30:16 +0100 (CET)
From: lbnstn@lili.uni-bielefeld.de
Reply-To: lbnstn@lili.uni-bielefeld.de
To: FreeBSD-gnats-submit@freebsd.org
Subject: ibcs2 emulation
X-Send-Pr-Version: 3.2

>Number:         5009
>Category:       kern
>Synopsis:       ibcs2 emulation
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 11 02:40:01 PST 1997
>Closed-Date:    Thu Aug 16 10:28:10 PDT 2001
>Last-Modified:  Thu Aug 16 10:29:23 PDT 2001
>Originator:     Uwe Laubenstein
>Release:        FreeBSD 2.2.5-RELEASE i386
>Organization:
>Environment:

	Custum kernel (same configuration on 2.2.2-R and 2.2.5-R),
	ibcs2 emulation loaded as a lkm.
	Upgrade to 2.2.5-R was done by removing /usr/src, copying the
	new sources and executing "make world".

>Description:

	The C-compiler from SCO-Openserver 5.0.2 works under
	FreeBSD 2.2.2-R but fails after upgrading to 2.2.5-R with
	the following error message:

		libsocket: socket: /dev/socksys: No such file or directory
		/compat/ibcs2/usr/ccs/lib/acomp: ERROR- Failed to initialize
						policy manager.(IFOR_PM_FATAL)

	Booting the 2.2.5-R system with an old 2.2.2-R kernel solves the
	problem.
	The following output from ktrace/kdump shows the differences
	between 2.2.2-R and 2.2.5-R:

	FreeBSD 2.2.2-RELEASE:

	ktrace   RET   ktrace 0
	ktrace   CALL  execve(0xefbfdd37,0xefbfdcb8,0xefbfdce8)
	ktrace   NAMI  "/compat/ibcs2/usr/ccs/lib/acomp"
	acomp    RET   execve 0
	acomp    CALL  setlogin(0x72,0x44c530)
	acomp    RET   setlogin -1 errno 22 Invalid argument
	acomp    CALL  old.lstat(0xefbfdb3e,0x62,0xefbfdba0,0xefbfdba0,0x401d2c)
	acomp    RET   old.lstat 0
	acomp    CALL  break(0x451558)
	acomp    RET   break 0
	acomp    CALL  break(0x452558)
	acomp    RET   break 0
	acomp    CALL  break(0x453558)
	acomp    RET   break 0
	acomp    CALL  close(0)
	acomp    RET   close 0
	acomp    CALL  open(0xefbfdd5b,0,0x1b6)
	acomp    NAMI  "xx.c"
	acomp    RET   open 0
	...

	FreeBSD 2.2.5-RELEASE:

	ktrace   RET   ktrace 0
	ktrace   CALL  execve(0xefbfdd37,0xefbfdcb8,0xefbfdce8)
	ktrace   NAMI  "/compat/ibcs2/usr/ccs/lib/acomp"
	acomp    RET   execve 0
	acomp    CALL  setlogin(0x72,0x44c530)
	acomp    RET   setlogin -1 errno 22 Invalid argument
	acomp    CALL  old.lstat(0xefbfdb3e,0x62,0xefbfdba0,0xefbfdba0,0x401d2c)
	acomp    RET   old.lstat 0
	acomp    CALL  old.lstat(0x1,0x42f20c,0x42f210,0xefbfdb18,0x53618)
	acomp    RET   old.lstat 0
	acomp    CALL  break(0x44d558)
	acomp    RET   break 0
	acomp    CALL  open(0x42fe84,0,0x44c6c4)
	acomp    NAMI  "/compat/ibcs2/dev/socksys"
	acomp    NAMI  "/dev/socksys"
	acomp    RET   open -1 errno 2 No such file or directory
	acomp    CALL  write(0x2,0xefbfd9e8,0x13)
	acomp    GIO   fd 2 wrote 19 bytes
       "libsocket: socket: "
	acomp    RET   write 19/0x13
	...

>How-To-Repeat:

	If you have access to SCO's C-compiler try:

	/compat/ibcs2/usr/ccs/lib/acomp -i xx.c -o xx.s -f xx.c -E
						-y0/usr/include -Qy -Xa

>Fix:
	
	No idea. The files in /sys/i386/ibcs2 did not change between
	2.2.2-RELEASE and 2.2.5-RELEASE so the problem must be somewhere
	else in the kernel sources.

>Release-Note:
>Audit-Trail:

From: Martin Kammerhofer <dada@sbox.tu-graz.ac.at>
To: lbnstn@lili.uni-bielefeld.de
Cc: FreeBSD problems <FreeBSD-gnats-submit@FreeBSD.ORG>
Subject: Re: kern/5009: ibcs2 emulation
Date: Tue, 11 Nov 1997 17:59:11 +0100 (CET)

 On Tue, 11 Nov 1997 lbnstn@lili.uni-bielefeld.de wrote:
 
 > 		libsocket: socket: /dev/socksys: No such file or directory
 
 Personally I'm not using ibsc2, but I remember a section of the FAQ named
 
       *  When I run a SCO/iBCS2 application, it bombs on socksys
 
 I guess this will solve your problem. (FAQ should be in
 /usr/share/doc/FAQ).
 
 Hope this helps,
 	Martin
 

From: Uwe Laubenstein <lbnstn@lili.uni-bielefeld.de>
To: freebsd-gnats-submit@freebsd.org, dada@sbox.tu-graz.ac.at
Cc:  Subject: Re: kern/5009: ibcs2 emulation
Date: Mon, 17 Nov 1997 19:03:51 +0100

 Hello,
 
 I've tried the solution proposed in the FAQ but it doesn't solve the
 problem. Now the error does not occur on opening /dev/socksys (the
 FAQ suggests linking /dev/socksys to /dev/null) but a little bit
 later in a SCO-function "ipc_open" (if I remember the name correctly).
 
 What I do not understand is why the program tries to open /dev/socksys
 when I run the 2.2.5R kernel and not when I boot the 2.2.2R kernel.
 
 I'll try to investigate it further but at the moment I don't have
 much time.
 
 Thank you for your quick response,
 
 Uwe
State-Changed-From-To: open->closed 
State-Changed-By: johan 
State-Changed-When: Thu Aug 16 10:28:10 PDT 2001 
State-Changed-Why:  
This is just to old. 
Please open up a new PR if this is still a problem  
in more recent version of FreeBSD. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=5009 
>Unformatted:
