From Jos.Backus@nl.origin-it.com  Sun Aug 23 13:10:44 1998
Received: from gw-nl1.philips.com (gw-nl1.philips.com [192.68.44.33])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA17459
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 23 Aug 1998 13:10:43 -0700 (PDT)
          (envelope-from Jos.Backus@nl.origin-it.com)
Received: from smtprelay-nl1.philips.com (localhost.philips.com [127.0.0.1])
          by gw-nl1.philips.com with ESMTP id WAA12516
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 23 Aug 1998 22:09:57 +0200 (MEST)
          (envelope-from Jos.Backus@nl.origin-it.com)
Received: from hal.mpn.cp.philips.com (hal.mpn.cp.philips.com [130.139.64.195]) 
	by smtprelay-nl1.philips.com (8.8.5/8.6.10-1.2.2m-970826) with SMTP id WAA24442
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 23 Aug 1998 22:09:57 +0200 (MET DST)
Received: (qmail 28522 invoked by uid 666); 23 Aug 1998 20:10:18 -0000
Message-Id: <19980823201018.28521.qmail@hal.mpn.cp.philips.com>
Date: 23 Aug 1998 20:10:18 -0000
From: "Jos Backus" <Jos.Backus@nl.origin-it.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Progress RDBMS gives suspicious IPC-related warning when run under iBCS2

>Number:         7729
>Category:       i386
>Synopsis:       Progress broker is unable to read status of semaphore set
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 23 13:20:00 PDT 1998
>Closed-Date:    Sun Feb 7 20:33:18 MET 1999
>Last-Modified:  Sun Feb  7 20:35:23 MET 1999
>Originator:     Jos Backus
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
Origin B.V.
>Environment:

	-current as of today
	kernel config options:
	options   SYSVSHM
	options   SYSVSEM
	options   SYSVMSG
	Progress RDBMS 7.3C13 for SCO 3.2v4.2 (COFF executables)
	iBCS2 emulation

>Description:

	The Progress broker (_mprosrv) manages access to the physical database
	using shared memory and semaphores. Self-service clients attach to the
	shared memory db buffers. Semaphores are used to synchronize access.

	ktrace'ing the broker process reveals the following:

   546 _mprosrv CALL  open(0xefbfda44,0x2,0)
   546 _mprosrv NAMI  "/compat/ibcs2/usr/local/dlc/7.3C13/db/testdb.db"
   546 _mprosrv NAMI  "/usr/local/dlc/7.3C13/db/testdb.db"
   546 _mprosrv RET   open 5
   546 _mprosrv CALL  old.fstat(0x5,0x2,0x1)
   546 _mprosrv RET   old.fstat 0
   546 _mprosrv CALL  getfsstat(0xefbfdadc,0xefbfda98)
   546 _mprosrv NAMI  "testdb.db"
   546 _mprosrv RET   getfsstat 0
   546 _mprosrv CALL  sigaltstack(0x1,0x55057439,0x1,0,0)
   546 _mprosrv RET   sigaltstack -1 errno 2 No such file or directory
   546 _mprosrv CALL  getfsstat(0xefbfdad4,0xefbfda90)
   546 _mprosrv NAMI  "testdb.db"
   546 _mprosrv RET   getfsstat 0
   546 _mprosrv CALL  sigaltstack(0x1,0x55057439,0x1d,0x7b6,0)
   546 _mprosrv RET   sigaltstack 131072/0x20000
   546 _mprosrv CALL  getuid
   546 _mprosrv RET   getuid 0
   546 _mprosrv CALL  sigaltstack(0,0x20000,0,0x2,0xefbfdb30)
   546 _mprosrv RET   sigaltstack -1 errno 14 Bad address	# Oops!
   546 _mprosrv CALL  old.lseek(0x4,0xae57,0)
   546 _mprosrv RET   old.lseek 44631/0xae57
   546 _mprosrv CALL  read(0x4,0xefbfd758,0x51)
   546 _mprosrv GIO   fd 4 read 81 bytes
       "%BSYSTEM ERROR: unable to %s semaphore set %s:%c, errno %d. (551)\0\0\
        \0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   546 _mprosrv RET   read 81/0x51
   546 _mprosrv CALL  fchdir(0xefbfd600)
   546 _mprosrv RET   fchdir 903898754/0x35e06682
   546 _mprosrv CALL  fchdir(0x40f114)
   546 _mprosrv RET   fchdir 903898754/0x35e06682
   546 _mprosrv CALL  write(0x1,0xefbfd630,0x5a)
   546 _mprosrv GIO   fd 1 wrote 90 bytes
       "18:59:14 SERVER: SYSTEM ERROR: unable to read status of semaphore set \
        :\240, errno 14. (551)
       "
   546 _mprosrv RET   write 90/0x5a
   546 _mprosrv CALL  sigaltstack(0,0x20000,0,0x8,0x1)
   546 _mprosrv RET   sigaltstack 0
   546 _mprosrv CALL  sigaltstack(0x2,0x20000,0xefbfdb40,0x1,0)
   546 _mprosrv RET   sigaltstack 0
   546 _mprosrv CALL  sigaltstack(0,0x20000,0x1,0x8,0x1)
   546 _mprosrv RET   sigaltstack 0  

>How-To-Repeat:

	Start the broker process on a db and watch the screen. Alternatively,
	ktrace the broker.

>Fix:
	
	No idea. It does work under BSD/OS's SCO emulation though.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: guido 
State-Changed-When: Sun Feb 7 20:33:18 MET 1999 
State-Changed-Why:  
the fixes in ibcs2_ipc.[ch] do fix the above problem. This was tested 
last week. The SCO3 progress version now seems to work correctly. 
>Unformatted:
emulation
From: Jos.Backus@nl.origin-it.com
Reply-To: Jos.Backus@nl.origin-it.com
X-send-pr-version: 3.2


