Date: Sun, 14 Apr 2002 04:54:12 -0700 (PDT) From: Christian Laursen <xi@borderworlds.dk> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/37057: Problem with rlimits on filesystem mounted from /dev/vn0c Message-ID: <200204141154.g3EBsCk60135@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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 <sys/time.h> #include <sys/resource.h> #include <unistd.h> #include <stdio.h> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204141154.g3EBsCk60135>