From owner-freebsd-bugs@FreeBSD.ORG Fri Mar 11 18:40:06 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AC851065675 for ; Fri, 11 Mar 2011 18:40:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 487B48FC15 for ; Fri, 11 Mar 2011 18:40:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p2BIe69C058154 for ; Fri, 11 Mar 2011 18:40:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p2BIe6P9058153; Fri, 11 Mar 2011 18:40:06 GMT (envelope-from gnats) Resent-Date: Fri, 11 Mar 2011 18:40:06 GMT Resent-Message-Id: <201103111840.p2BIe6P9058153@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alex Keda Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8ED08106567B for ; Fri, 11 Mar 2011 18:33:35 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 7D6508FC17 for ; Fri, 11 Mar 2011 18:33:35 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p2BIXYY3086235 for ; Fri, 11 Mar 2011 18:33:34 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p2BIXYka086216; Fri, 11 Mar 2011 18:33:34 GMT (envelope-from nobody) Message-Id: <201103111833.p2BIXYka086216@red.freebsd.org> Date: Fri, 11 Mar 2011 18:33:34 GMT From: Alex Keda To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/155480: login.conf: maxproc does not work when command running from cron X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2011 18:40:06 -0000 >Number: 155480 >Category: misc >Synopsis: login.conf: maxproc does not work when command running from cron >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Mar 11 18:40:05 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Alex Keda >Release: 8.2-RELEASE >Organization: USSR >Environment: FreeBSD srv2.host-food.ru 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Tue Mar 1 21:17:04 MSK 2011 lissyara@srv10.host-food.ru:/home/usr_moved/obj/home/usr_moved/src/sys/HOST-FOOD amd64 >Description: I create login class: lissyara# grep id100 --after-context=7 /etc/login.conf id100:\ :coredumpsize=1:\ :cputime=60s:\ :maxproc=12:\ :openfiles=32:\ :priority=20:\ :tc=default: lissyara# then, run command: lissyara# cap_mkdb -v /etc/login.conf cap_mkdb: 10 capability records lissyara# add user: lissyara# grep ^test1234 /etc/master.passwd test1234:$1$kj/WOTuN$vLGcOBPv9ro8eljOe.ChA1:1002:1004:id100:0:0:User &:/home/test1234:/bin/sh lissyara# add cron job for user: lissyara# crontab -l -u test1234 * * * * * /bin/sleep 72000 * * * * * /bin/sleep 72000 * * * * * /bin/sleep 72000 * * * * * /bin/sleep 72000 * * * * * /bin/sleep 72000 * * * * * /bin/sleep 72000 * * * * * /bin/sleep 72000 * * * * * /bin/sleep 72000 * * * * * /bin/sleep 72000 * * * * * /bin/sleep 72000 * * * * * /bin/sleep 72000 * * * * * /bin/sleep 72000 * * * * * /bin/sleep 72000 lissyara# after some time I see lot sleep processes in ps output lissyara# ps -auxww | grep ^test1234 | grep sleep | wc -l 130 lissyara# 130 > 12 ======== If I running commands from ssh session - all OK, I cannot run more than maxproc processes... http://lists.freebsd.org/pipermail/freebsd-current/2011-March/023234.html It's very serious problem - for shared hostings servers and such other applications where users have access to create cron jobs >How-To-Repeat: see full desc >Fix: >Release-Note: >Audit-Trail: >Unformatted: