From nobody@FreeBSD.org  Wed Oct 30 02:40:37 2002
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0628D37B401
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 30 Oct 2002 02:40:37 -0800 (PST)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B848043E42
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 30 Oct 2002 02:40:36 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.6/8.12.6) with ESMTP id g9UAea7R071657
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 30 Oct 2002 02:40:36 -0800 (PST)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.6/8.12.6/Submit) id g9UAealj071656;
	Wed, 30 Oct 2002 02:40:36 -0800 (PST)
Message-Id: <200210301040.g9UAealj071656@www.freebsd.org>
Date: Wed, 30 Oct 2002 02:40:36 -0800 (PST)
From: "&#321;ukasz Gryglicki" <morgothdbma@o2.pl>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Program written in C++ can hang system (started by normal non-root user!)
X-Send-Pr-Version: www-1.0

>Number:         44745
>Category:       i386
>Synopsis:       Program written in C++ can hang system (started by normal non-root user!)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 30 02:50:00 PST 2002
>Closed-Date:    Sun Jul 13 00:19:50 PDT 2003
>Last-Modified:  Sun Jul 13 00:19:50 PDT 2003
>Originator:     &#321;ukasz Gryglicki
>Release:        FreeBSD Release v4.5
>Organization:
student
>Environment:
FreeBSD RELEASE 4.5 i386 /usr/src/sys/compile/MORGOTH etc.. (gcc 2.95)
Sorry but I'm using NT-Shit (2000) by now!
>Description:
My program (memory allocator) can hang system when tries to allocate more than RAM + SWAP memory. I think kernel should kill it! For example I've go 192MB ram & 700MB swap when I call alloc_bsd 1200MB, it hungs my system even I'm doing it as normal user UID=500. If You are intrested of this problem I can sent full source_code
>How-To-Repeat:
SOURCE_CODE alloc_bsd.c



>Fix:
Fix kernel memory management (this program does not allocate all 1200MB
at a time, because kernel kill it, but allocates 1MB and again, again, again)
I got message: swap_pagger get_free_block failed or something like this
and system hanged up)

                                :-(
>Release-Note:
>Audit-Trail:

From: Peter Pentchev <roam@ringlet.net>
To: "&#321;ukasz Gryglicki" <morgothdbma@o2.pl>
Cc: bug-followup@FreeBSD.org
Subject: Re: i386/44745: Program written in C++ can hang system (started by normal non-root user!)
Date: Wed, 30 Oct 2002 13:02:51 +0200

 On Wed, Oct 30, 2002 at 02:40:36AM -0800, &#321;ukasz Gryglicki wrote:
 > 
 > >Number:         44745
 > >Category:       i386
 > >Synopsis:       Program written in C++ can hang system (started by normal non-root user!)
 > >Originator:     &#321;ukasz Gryglicki
 > >Release:        FreeBSD Release v4.5
 > >Environment:
 > FreeBSD RELEASE 4.5 i386 /usr/src/sys/compile/MORGOTH etc.. (gcc 2.95)
 > >Description:
 
 > My program (memory allocator) can hang system when tries to allocate
 > more than RAM + SWAP memory. I think kernel should kill it! For
 > example I've go 192MB ram & 700MB swap when I call alloc_bsd 1200MB,
 > it hungs my system even I'm doing it as normal user UID=500. If You
 > are intrested of this problem I can sent full source_code
 
 Isn't this something that should be easily solved by setting appropriate
 limits for the users in, say, the /etc/login.conf file?
 
 G'luck,
 Peter
 
 -- 
 Peter Pentchev	roam@ringlet.net	roam@FreeBSD.org
 PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
 Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
 If I had finished this sentence,
State-Changed-From-To: open->closed 
State-Changed-By: kris 
State-Changed-When: Sun Jul 13 00:19:17 PDT 2003 
State-Changed-Why:  
This sounds like it can be solved by setting resource limits 
in login.conf.  If not, please provide the source code to an 
example application demonstrating the problem. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=44745 
>Unformatted:
