NetBSD Problem Report #275

From gnats  Fri Jun  3 13:22:00 1994
Received: from gandalf.bbb.no (root@gandalf.bbb.no [192.124.156.194]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id NAA21756 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Fri, 3 Jun 1994 13:21:41 -0700
Message-Id: <199406032021.WAA00449@gandalf.bbb.no>
Date: Fri, 3 Jun 1994 22:21:18 +0200
From: Thorsten Lockert <tholo@SigmaSoft.COM>
Reply-To: tholo@SigmaSoft.COM
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: shmat(2) fails with ENOMEM
X-Send-Pr-Version: 3.2

>Number:         275
>Category:       kern
>Synopsis:       With a (slightly) fixed shmat(2) (see previous bug-report), it gives ENOMEM
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 03 13:35:02 +0000 1994
>Closed-Date:    Fri Jun 03 23:15:31 +0000 1994
>Last-Modified:  
>Originator:     Thorsten Lockert
>Release:        current
>Organization:
SigmaSoft, Th. Lockert
>Environment:

System: NetBSD gandalf.bbb.no 0.9B GANDALF#3 i386

>Description:
	With shmat(2) fixed to avoid the EMFILE error return due to initialization
	problems, it still fails.  Now with ENOMEM.  I'm not sure as of now if it
	is shm_find_space or vm_mmap that fails, but from looking at the code it
	is very unlikely that it is shm_find_space.  It might, however, be due to
	the code in shm_find_space not returning a usable vm address in the address
	space of the process, I've not investigated that far yet.

	This makes it impossible to use eg. the shared memory extension of X.
>How-To-Repeat:
	Change shmat(2) to initialize the shmid's stored in the p->p_vmspace->vm_shm
	map to -1 or the code to expect (and store) 0 for free entries.  Try to
	attach a shared memory segment
>Fix:
	Unknown.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Fri Jun 3 16:15:31 PDT 1994 
State-Changed-Why:  
Fixed. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.