Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Sep 2002 05:22:00 +0900
From:      Norikatsu Shigemura <nork@FreeBSD.org>
To:        freebsd-hackers@FreeBSD.org
Subject:   filesytem bsize=64k causes libc/db hash crash
Message-ID:  <200209122022.g8CKM004040532@nd250009.gab.xdsl.ne.jp>

next in thread | raw e-mail | index | archive | help
	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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209122022.g8CKM004040532>