Subject: port-i386/5436: SCO 80386 COFF executable crashes system with COMPAT_SVR4
To: None <gnats-bugs@gnats.netbsd.org>
From: John Kohl <jtk@kolvir.arlington.ma.us>
List: netbsd-bugs
Date: 05/10/1998 15:40:47
>Number:         5436
>Category:       port-i386
>Synopsis:       SCO 80386 COFF executable crashes system with COMPAT_SVR4
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 10 12:50:00 1998
>Last-Modified:
>Originator:     John Kohl
>Organization:
NetBSD Kernel Hackers `R` Us
>Release:        NetBSD-current, 1998/05/10
>Environment:
	
System: NetBSD kolvir.arlington.ma.us 1.3E NetBSD 1.3E (KOLVIR) #56: Sun May 10 11:27:52 EDT 1998 jtk@kolvir.arlington.ma.us:/u4/sandbox/src/sys/arch/i386/compile/KOLVIR i386


>Description:
	I have COMPAT_SVR4 enabled in my i386 kernel.  Running a SCO
binary which is recognized as:
	file ls3c
	ls3c: 80386 COFF executable
will reset the system.  Kills both UVM and non-UVM kernels of recent vintage

I was able to get a (partial?) ktrace of the failure:
% kdump -f /var/tmp/ktrace.ls3c 
   427 ktrace   RET   ktrace 0
   427 ktrace   CALL  execve(0xefbfd9ce,0xefbfd8fc,0xefbfd904)
   427 ktrace   NAMI  "./ls3c"
   427 ls3c     EMUL  "ibcs2"
   427 ls3c     RET   execve JUSTRETURN
   427 ls3c     CALL  open(0x404fa8,0,0xc444)
   427 ls3c     NAMI  "/emul/ibcs2/etc/default/lang"
   427 ls3c     NAMI  "/etc/default/lang"
   427 ls3c     RET   open -1 errno 2 No such file or directory
   427 ls3c     CALL  sigsys(0x1,0x1)
   427 ls3c     RET   sigsys 0
   427 ls3c     CALL  sigsys(0x12,0x1)
   427 ls3c     RET   sigsys 0
   427 ls3c     CALL  umask(0)
   427 ls3c     RET   umask 18/0x12
   427 ls3c     CALL  open(0x40aa84,0,0x1b6)
   427 ls3c     NAMI  "./lls3.mfg"
   427 ls3c     RET   open -1 errno 2 No such file or directory
   427 ls3c     CALL  time(0)
   427 ls3c     RET   time 894828793/0x355600f9
   427 ls3c     CALL  open(0x418244,0,0x1b6)
   427 ls3c     NAMI  "./lls3.cfg"
   427 ls3c     RET   open -1 errno 2 No such file or directory
   427 ls3c     CALL  write(0x2,0x404041,0x3a)
   427 ls3c     GIO   fd 2 wrote 58 bytes
       "LanSafe III: Could not open configuration file (ls3.cfg) 
       "
   427 ls3c     RET   write 58/0x3a
   427 ls3c     CALL  time(0)
   427 ls3c     RET   time 894828793/0x355600f9
   427 ls3c     CALL  time(0)
   427 ls3c     RET   time 894828793/0x355600f9
   427 ls3c     CALL  open(0x40acc4,0x2,0x1b6)
   427 ls3c     NAMI  "./lls3.log"
   427 ls3c     RET   open -1 errno 2 No such file or directory
   427 ls3c     CALL  open(0x40acc4,0x109,0x1b6)
   427 ls3c     NAMI  "./lls3.log"
   427 ls3c     RET   open -1 errno 99 Unknown error: 99
   427 ls3c     CALL  utssys(0xefbfcd94,0,0)
   427 ls3c     RET   utssys 0
   427 ls3c     CALL  time(0x408d7c)
   427 ls3c     RET   time 894828793/0x355600f9
   427 ls3c     CALL  time(0)
   427 ls3c     RET   time 894828793/0x355600f9
   427 ls3c     CALL  open(0x4110f8,0x2,0x1b6)
   427 ls3c     NAMI  "./lls3.abm"

Neither lls3.log or lls3.abm exists in the current directory (an ISO9660
CDROM)

>How-To-Repeat:
Get a sco binary, try to run it.  shriek in horror.

>Fix:
	???
>Audit-Trail:
>Unformatted: