From owner-freebsd-hackers Thu Sep 12 13:22:17 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 911EA37B400 for ; Thu, 12 Sep 2002 13:22:14 -0700 (PDT) Received: from nd250009.gab.xdsl.ne.jp (nd250009.gab.xdsl.ne.jp [61.202.250.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C36043E42 for ; Thu, 12 Sep 2002 13:22:12 -0700 (PDT) (envelope-from nork@FreeBSD.org) Received: from cl-server.enusure-tech.co.jp (cl-server.ensure-tech.co.jp [211.18.249.19]) (authenticated bits=0) by nd250009.gab.xdsl.ne.jp (8.12.5/8.12.5/NinthNine) with ESMTP id g8CKM004040532 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Fri, 13 Sep 2002 05:22:02 +0900 (JST) (envelope-from nork@FreeBSD.org) Message-Id: <200209122022.g8CKM004040532@nd250009.gab.xdsl.ne.jp> Date: Fri, 13 Sep 2002 05:22:00 +0900 From: Norikatsu Shigemura To: freebsd-hackers@FreeBSD.org Subject: filesytem bsize=64k causes libc/db hash crash X-Mailer: Sylpheed version 0.8.2 (GTK+ 1.2.10; i386-portbld-freebsd4.6) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-milter (http://amavis.org/) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I found a problem on 4-STABLE(maybe 5-CURRENT, too) with libc/db (BerkeleyDB 1). It that when block size on fs is 65536 bytes, many programs which use BerkeleyDB(dev_mkdb, cap_mkdb, etc..) are crash. [REPLICATE THE TEST] # dd if=/dev/zero of=/dev/test.image bs=1m count=32 # vnconfig -s labels -c /dev/vn0c /tmp/test.image # newfs -b 65536 -f 8192 /dev/vn0c # mount /dev/vn0c /mnt # dev_mkdb -f /mnt/dev.db /dev zsh: segmentation fault (core dumped) dev_mkdb -f /mnt/dev.db /dev # umount /mnt # newfs -b 32768 -f 8192 /dev/vn0c # mount /dev/vn0c /mnt # dev_mkdb -f /mnt/dev.db /dev # ls -alF dev.db -rw-r--r-- 1 root wheel 32768 Sep 13 05:06 dev.db [ANALYSIS REPORT] Because of optimaization for fs, db/hash looks block size on specified file in src/lib/libc/db/hash/hash.c. db/hash's block size limit is MAX_BSIZE(=65536) in if (hashp->BSIZE > MAX_BSIZE) ..... But, I can't understand others:-). I think db1 has boundary condition problems. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message