Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jul 2006 14:55:01 GMT
From:      kost <kost@ropnet.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   i386/100439: Possible wrong setrlimit() handling
Message-ID:  <200607171455.k6HEt1I0017102@www.freebsd.org>
Resent-Message-ID: <200607171500.k6HF0Wu1094427@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help


>Number:         100439
>Category:       i386
>Synopsis:       Possible wrong setrlimit() handling
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-i386
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 17 15:00:31 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     kost
>Release:        FreeBSD 6.1-RELEASE-p2
>Organization:
RopNet
>Environment:
FreeBSD www4.ropnet.ru 6.1-RELEASE-p2 FreeBSD 6.1-RELEASE-p2 #1: Mon Jun 26 23:56:29 MSD 2006     mar@www4.ropnet.ru:/usr/obj/usr/src/sys/WWW4  i386
>Description:
I've got a wrapper written in C.
It sets some limits on other scripts, which started in this wrapper.
Program makes syscall setrlimit() with RLIMIT_CPU, RLIMIT_NPROC limitations and than starts some perl script like this:
  #!/usr/bin/perl
  while(1){;}

This program eats CPU and dies after few seconds depending on RLIMIT_CPU parameter. There is no problem - everything correct. But there is no string in log files about process killing. I expect the following string in logs:
  pid 32429 (perl5.8.7), uid 0, was killed: exceeded maximum CPU limit
but it's empty.

Talking about RLIMIT_NPROC limit - everything Ok.
I've tested this script on old 5.2.1-RELEASE FreeBSD... there was no questions... everything Ok too.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607171455.k6HEt1I0017102>