From nobody@FreeBSD.org  Fri Sep  9 11:50:57 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A0846106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  9 Sep 2011 11:50:57 +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 902C38FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  9 Sep 2011 11:50:57 +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 p89Bovqw070941
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 9 Sep 2011 11:50:57 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p89BouuR070940;
	Fri, 9 Sep 2011 11:50:56 GMT
	(envelope-from nobody)
Message-Id: <201109091150.p89BouuR070940@red.freebsd.org>
Date: Fri, 9 Sep 2011 11:50:56 GMT
From: Leonid Evdokimov <leon@darkk.net.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: newsyslog can't properly rotate log files when there are no enough inodes
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         160586
>Category:       bin
>Synopsis:       newsyslog(8) can't properly rotate log files when there are no enough inodes
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 09 12:00:18 UTC 2011
>Closed-Date:    
>Last-Modified:  Fri Sep 09 23:54:30 UTC 2011
>Originator:     Leonid Evdokimov
>Release:        FreeBSD 8.2-STABLE #0 r221983M
>Organization:
Yandex
>Environment:
FreeBSD daisy2.yandex.ru 8.2-STABLE FreeBSD 8.2-STABLE #0 r221983M: Mon Jul 11 18:02:06 MSD 2011     root@distillatory.yandex.ru:/place/mkdump_workdir/obj/place/GIT-repos/FreeBSD-8-stable/sys/stable8-amd64-dtrace  amd64
>Description:
All rotated files were collapsed into one inode. That's a bug. A serious one.

[darkk@daisy2 /var/log]$ ls -li /var/log/messages*
5822 -rw-r--r--  7 root  wheel  8839522 Sep  9 15:49 /var/log/messages
5822 -rw-r--r--  7 root  wheel  8839522 Sep  9 15:49 /var/log/messages.0
5822 -rw-r--r--  7 root  wheel  8839522 Sep  9 15:49 /var/log/messages.1
5822 -rw-r--r--  7 root  wheel  8839522 Sep  9 15:49 /var/log/messages.2
5822 -rw-r--r--  7 root  wheel  8839522 Sep  9 15:49 /var/log/messages.3
5822 -rw-r--r--  7 root  wheel  8839522 Sep  9 15:49 /var/log/messages.4
5822 -rw-r--r--  7 root  wheel  8839522 Sep  9 15:49 /var/log/messages.5
[darkk@daisy2 /var/log]$ head -1 /var/log/messages
Sep  8 16:00:00 daisy2 newsyslog[41658]: logfile turned over due to size>500K
>How-To-Repeat:
Fill /var partition with small files to use all inodes and try to rotate logs afterwards.
>Fix:


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