Subject: port-amiga/7667: MIT-SHM problems in Xamiga
To: None <gnats-bugs@gnats.netbsd.org>
From: Ruben van Staveren <ruben@verweg.com>
List: netbsd-bugs
Date: 05/30/1999 01:36:44
>Number:         7667
>Category:       port-amiga
>Synopsis:       MIT-SHM problems in Xamiga
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-amiga-maintainer (NetBSD/amiga Portmaster)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 30 01:35:02 1999
>Last-Modified:
>Originator:     Ruben van Staveren
>Organization:
.-------------------------------------------------------------------.
| Ruben van Staveren - http://www.verweg.com/ - A1260@50/48 - S5   _|_o
| verweg dot com - Don't Panic, Sync your disks!- NetBSD - AmigaOS//| #>
| ruben+spam@verweg.com - Self-certified B.O.F.H - PGP 2.6.3ia  \X/ | 4
`-------------------------------------------------------------------'
>Release:        NetBSD-1.4-RELEASE
>Environment:
	
System: NetBSD enterprise.verweg.com 1.4 NetBSD 1.4 (ENTERPRISE) #0: Mon May 24 18:20:56 CEST 1999 ruben@enterprise.verweg.com:/usr/src/sys/arch/amiga/compile/ENTERPRISE amiga

#	$NetBSD: GENERIC,v 1.119.2.1 1999/04/12 08:26:32 tron Exp $
include "arch/amiga/conf/std.amiga"

maxusers	16
options 	RTC_OFFSET=0

options 	BB060STUPIDROM	
options 	M68060		# support for 060
options 	M060SP		# MC68060 software support (Required for 060)
options 	M68040		# support for 040
options 	FPSP		# MC68040 floating point support

#
# Networking options
#
options 	INET		# IP networking support (Required)
options 	GATEWAY		# Packet forwarding
options 	MROUTING	# Multicast routing
options 	PPP_BSDCOMP	# BSD-Compress compression support for PPP
options 	PPP_DEFLATE	# Deflate compression support for PPP
options 	PPP_FILTER	# Active filter support for PPP (requires bpf)
options 	PFIL_HOOKS	# pfil(9) packet filter hooks
options 	IPFILTER_LOG	# ipmon(8) log support

# Filesystems
file-system 	FFS		# Berkeley fast file system
file-system 	MFS		# Memory based filesystem
file-system 	NFS		# Network File System client side code
file-system 	ADOSFS		# AmigaDOS file system
file-system 	CD9660		# ISO 9660 + Rock Ridge filesystem
file-system 	MSDOSFS		# MS-DOS filesystem
file-system 	FDESC		# user file descriptor filesystem
file-system 	KERNFS		# kernel data-structure filesystem
file-system 	NULLFS		# loopback filesystem
file-system 	PROCFS		# /proc filesystem
file-system 	UMAPFS		# NULLFS + uid and gid remapping
file-system 	UNION		# union filesystem

# Filesystem options
options 	NFSSERVER	# Network File System server side code
options 	QUOTA		# User and group quotas in FFS

#
# Compatability options for various existing systems
#
options 	TCP_COMPAT_42	# compatibility with 4.2BSD TCP/IP
options 	COMPAT_43	# compatibility with 4.3BSD interfaces
options 	COMPAT_09	# compatibility with NetBSD 0.9
options 	COMPAT_10	# compatibility with NetBSD 1.0
options 	COMPAT_12	# compatibility with NetBSD 1.2
options 	COMPAT_13	# compatibility with NetBSD 1.3
options 	COMPAT_SUNOS	# Support to run Sun (m68k) executables
options 	COMPAT_NOMID	# allow nonvalid machine id executables
options 	COMPAT_LINUX	# Support to run Linux/m68k executables
options 	EXEC_ELF32	# 32-bit ELF executables (Linux)

#
# Support for System V IPC facilities.
#
options 	SYSVSHM		# System V-like shared memory
options 	SYSVMSG		# System V-like messages
options 	SYSVSEM		# System V-like semaphores

#
# Support for various kernel options
#
options 	KTRACE		# system call tracing support
options 	LKM		# Loadable kernel modules
options 	NKMEMCLUSTERS=256	# Size of kernel malloc area
options 	UCONSOLE	# anyone can redirect a virtual console
options 	SCSIVERBOSE	# Verbose SCSI errors

options 	NTP		# NTP phase/frequency locked loop

#
# Misc. debugging options
#
options 	DDB		# Kernel debugger
options 	DDB_HISTORY_SIZE=100	# Enable history editing in DDB
options 	DIAGNOSTIC	# Extra kernel sanity checks

#
# Amiga specific options
#

# ATTENTION: There is NO WARRANTY AT ALL that the sync will be complete
# before the 10 secondinterval ends, or that KBDRESET does work at all.
options 	KBDRESET	# sync on Ctrl-Amiga-Amiga

# These options improve performance with the built-in serial port
# on slower Amigas.  Try the larger buffers first then lev6_defer.
options 	SERIBUF_SIZE=4096
options 	SEROBUF_SIZE=32
#options 	LEV6_DEFER	# defers l6 to l4 (below serial l5)

options 	GRF_ECS		# Enhanced Chip Set
options 	GRF_NTSC	# NTSC
options 	GRF_PAL		# PAL
options 	GRF_AGA		# AGA Chip Set
options 	GRF_AGA_VGA	# AGA VGAONLY timing
options 	GRF_SUPER72	# AGA Super-72

grfcc0		at mainbus0		# custom chips
grf0		at grfcc0
ite0		at grf0			# terminal emulators for grfs

#ifdef AMIGA_CONFIGURATION
#
# Amiga Mainboard devices (sans graphics and keyboard)
#

ser0		at mainbus0		# Amiga onboard serial
par0		at mainbus0		# Amiga onboard parallel
ms*		at mainbus0		# Amiga mice
fdc0		at mainbus0		# Amiga FDC
fd*		at fdc0 unit ?		# floppy disks on the later
#a34kbbc0	at mainbus0		# A3000/A4000 battery backed clock
a2kbbc0 	at mainbus0		# A2000 battery backed clock
aucc*		at mainbus0		# Amiga CC audio
audio*		at aucc?
#endif


# scsi stuff
bzivsc0 	at zbus0		# Blizzard 12x0 IV scsi 
scsibus*	at bzivsc0
idesc0		at mainbus0		# A4000 & A1200 IDE
scsibus*	at idesc0

# each hard drive from low target to high
# will configure to the next available sd unit number
sd*	at scsibus? target ? lun ?	# scsi disks
st*	at scsibus? target ? lun ?	# scsi tapes
cd*	at scsibus? target ? lun ?	# scsi cds
ss*	at scsibus? target ? lun ?	# scsi scanner
ch*	at scsibus? target ? lun ?	# scsi autochangers
uk*	at scsibus? target ? lun ?	# scsi unknown

pseudo-device	loop			# loopback network interface
pseudo-device	sl		1	# SLIP network interfaces
pseudo-device	ppp		1	# PPP network interfaces
pseudo-device	tun		1	# network tunnel line discipline
pseudo-device	gre		16	# generic L3 over IP tunnel
pseudo-device	ipip		2	# IP Encapsulation within IP (RFC 2003)
pseudo-device	bpfilter	16	# Berkeley packet filter
pseudo-device	ipfilter		# IP Filter package

pseudo-device	view		10	# views
pseudo-device	pty		16	# pseudo ptys

pseudo-device	vnd		4	# vnode pseudo-disks
pseudo-device	ccd		4	# concatenated disk devices
pseudo-device	raid		4	# RAIDframe disk driver

config	netbsd root on ? type ?


>Description:
	Application which need MIT-SHM support (IPC/Image caching) will bomb
	Xamiga. memory says problem occured in NetBSD-1.3 too but was ignored
	by me because of suspectable hardware/compiler problems.

	A fresh pkgsrc compile and install of both Windowmaker and Xlockmore
	with egcs-1.1.1 showed the problem still persisted.

	May be applicable to any package that extensively uses MIT-SHM
	on NetBSD/amiga. other platforms unverified.
>How-To-Repeat:
	Compile and install from pkgsrc the packages windowmaker-0.52.0
	Mesa-3.0 (needed by xlockmore-4.13.1) and run them.

	Windowmaker crashes and bombs the X server too. 
	xlockmore bombs the X server and dies when using one of the 
	GL screensaver/locker modes.

	unusable when not disabling MIT-SHM support
	Xserver only fails in current session and in case when using xdm, reloads
	itself after a while. startx users need to.. startx again :)
	
>Fix:
	In the packages involved, disable support for MIT-SHM when possible,
	and recompile/install. Packages in question do not need MIT-SHM support
	for windowmaker-0.52.0 this involves adding --disable-shm to the pkgsrc's
	Makefile CONFIGURE_ARGS= define.

	For Mesa-3.0 this involves the removal of -DSHM in the system dependant
	Makefile target.

	True fix is ofcourse the recovery of MIT-SHM in Xamiga
>Audit-Trail:
>Unformatted: