From owner-freebsd-bugs Sun Apr 14 5: 0:19 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A570937B41C for ; Sun, 14 Apr 2002 05:00:02 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3EC02D60867; Sun, 14 Apr 2002 05:00:02 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id E8EEC37B404 for ; Sun, 14 Apr 2002 04:54:12 -0700 (PDT) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3EBsCk60135; Sun, 14 Apr 2002 04:54:12 -0700 (PDT) (envelope-from nobody) Message-Id: <200204141154.g3EBsCk60135@freefall.freebsd.org> Date: Sun, 14 Apr 2002 04:54:12 -0700 (PDT) From: Christian Laursen To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/37057: Problem with rlimits on filesystem mounted from /dev/vn0c Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 37057 >Category: kern >Synopsis: Problem with rlimits on filesystem mounted from /dev/vn0c >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Apr 14 05:00:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Christian Laursen >Release: 4.5-STABLE >Organization: The Border Worlds >Environment: FreeBSD ferengi.borderworlds.dk 4.5-STABLE FreeBSD 4.5-STABLE #5: Sat Apr 13 23:25:44 CEST 2002 root@ferengi.borderworlds.dk:/usr/obj/usr/src/sys/FERENGI i386 >Description: When setting a soft limit on the filesize, any writes to a file seems to result in a SIGXFSZ being delivered, when the filesystem is mounted from a vn device. (This prevents postfix to work) >How-To-Repeat: This C program will trigger the bug: ==============8<==================== #include #include #include #include int main () { struct rlimit rlim; FILE *file; getrlimit (RLIMIT_FSIZE, &rlim); rlim.rlim_cur = 15; setrlimit (RLIMIT_FSIZE, &rlim); if ((file = fopen("testfile", "w")) == NULL) { perror("fopen"); exit(1); } fputs ("Some text", file); fclose (file); return 0; } ==============8<==================== Samle output: ferengi# cd /tmp/ ferengi# ./limit ferengi# cd /mnt/ ferengi# df . Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/vn0c 4870 4 4478 0% /mnt ferengi# /tmp/limit Filesize limit exceeded >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message