Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f8IBIgd28435 for linux-xfs-outgoing; Tue, 18 Sep 2001 04:18:42 -0700 Received: from TYO201.gate.nec.co.jp (TYO201.gate.nec.co.jp [202.32.8.214]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f8IBIWe28416 for ; Tue, 18 Sep 2001 04:18:32 -0700 Received: from mailgate4.nec.co.jp ([10.7.69.197]) by TYO201.gate.nec.co.jp (8.11.6/3.7W01080315) with ESMTP id f8IBIPa28187 for ; Tue, 18 Sep 2001 20:18:25 +0900 (JST) Received: from mailsv.nec.co.jp (mailgate51.nec.co.jp [10.7.69.190]) by mailgate4.nec.co.jp (8.11.6/3.7W-MAILGATE-NEC) with ESMTP id f8IBIPZ03201 for ; Tue, 18 Sep 2001 20:18:25 +0900 (JST) Received: from thktnes98740.tnes.nec.co.jp (THKTNES98740.tnes.nec.co.jp [10.1.101.4]) by mailsv.nec.co.jp (8.11.6/3.7W-MAILSV-NEC) with ESMTP id f8IBIKl09294 for ; Tue, 18 Sep 2001 20:18:23 +0900 (JST) Received: from thktnes98740.tnes.nec.co.jp ([10.1.101.4]) by thktnes98740.tnes.nec.co.jp (Post.Office MTA v3.1.2J release 205-101A-J ID# 0-0U10L2S100) with SMTP id AAA444 for ; Tue, 18 Sep 2001 20:18:19 +0900 Received: FROM tnesgate.tnes.nec.co.jp BY thktnes98740.tnes.nec.co.jp ; Tue Sep 18 20:18:18 2001 +0900 Received: from rifu.bsd.tnes.nec.co.jp (IDENT:root@rifu.bsd.tnes.nec.co.jp [10.1.101.142]) by tnesgate.tnes.nec.co.jp (8.9.3/3.7W00091816) with ESMTP id UAA45432 for ; Tue, 18 Sep 2001 20:18:19 +0900 (JST) Received: from kano.bsd.tnes.nec.co.jp (kano.bsd.tnes.nec.co.jp [10.1.101.150]) by rifu.bsd.tnes.nec.co.jp (8.10.2+3.3W/3.7W/BSD-TNES-MX01) with ESMTP id f8IBIJL29133 for ; Tue, 18 Sep 2001 20:18:19 +0900 Received: (from ism@localhost) by kano.bsd.tnes.nec.co.jp (8.11.1/3.7W-01053010) id f8IBII101812; Tue, 18 Sep 2001 20:18:18 +0900 (JST) Date: Tue, 18 Sep 2001 20:18:18 +0900 (JST) Message-Id: <200109181118.f8IBII101812@kano.bsd.tnes.nec.co.jp> To: linux-xfs@oss.sgi.com Subject: The memory mapped I/O caused the system hung From: ism@bsd.tnes.nec.co.jp (ISHIZUKA Masayuki) X-Mailer: mnews [version 1.22] 1999-12/19(Sun) Sender: owner-linux-xfs@oss.sgi.com Precedence: bulk Hi, I noticed that the system hung up right after the filesystem is full by the memory mapped I/O (no terminal response and no one can enter the KDB). My environment is RedHat 7.1 + linux-2.4.10-pre10-xfs(20010918 XFS CVS Tree) + gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release). The test program attached the end of this mail could reproduce this. ex) filesystem capacity: 128MB % cd /mnt/xfs % testprog 40 /* 40 * 4MB = 160MB */ -> system hangs! [Console Messages] Unable to handle kernel paging request at virtual address cb7a868c printing eip: c012a351 *pde = 00000000 Unable to handle kernel paging request at virtual address 8109e000 printing eip: c0208990 *pde = 00000000 In case of ext2fs, this program was killed by SIGBUS. Is there anything to do for investigation? P.S. Why does disk block is allocated the reverse order by memory mapped I/O as follows? # mkfs -t xfs /dev/sda7 # mount /dev/sda7 /mnt/xfs # cd /mnt/xfs # testprog 1 # xfs_bmap hole hole: 0: [0..7]: 8312..8319 1: [8..15]: 8304..8311 2: [16..23]: 8296..8303 3: [24..31]: 8288..8295 : : 1021: [8168..8175]: 112..119 1022: [8176..8183]: 104..111 1023: [8184..8191]: 96..103 1024: [8192..4194295]: hole 1025: [4194296..4194303]: 8328..8335 % [testprog.c] --------8<--------8<--------8<--------8<--------8<--------8<-------- #include #include #include #include #include #include #define MAPSZ 4*1024*1024 int main(int argc, char *argv[]) { int fd; int count; off_t off = 0; char *cp; if (argc > 1) count = atoi(argv[1]); fd = open("hole", O_RDWR|O_CREAT|O_TRUNC, 0644); if (fd < 0) { perror("open(\"hole\")"); exit(1); } if (lseek(fd, 0x7fffffff-1, SEEK_SET) < 0) { perror("lseek"); exit(1); } if (write(fd, "a", 1) < 0) { perror("write"); exit(1); } if (lseek(fd, 0, SEEK_SET) < 0) { perror("lseek"); exit(1); } while (count--) { cp = mmap(0, MAPSZ, PROT_READ|PROT_WRITE, MAP_SHARED, fd, off); if (cp == MAP_FAILED) { perror("mmap"); exit(1); } memset(cp, '0', MAPSZ); if (msync(cp, MAPSZ, MS_SYNC) < 0) { perror("msync"); exit(1); } if (munmap(cp, MAPSZ) < 0) { perror("munmap"); exit(1); } off += MAPSZ; } } --------8<--------8<--------8<--------8<--------8<--------8<-------- -- ISHIZUKA Masayuki