From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.12] helo=sc8-sf-mx2.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp (Exim 4.30) id 1CHp3z-0006Ds-Kl for user-mode-linux-devel@lists.sourceforge.net; Wed, 13 Oct 2004 12:45:31 -0700 Received: from cyphermail.sandelman.ottawa.on.ca ([205.150.200.161] helo=noxmail.sandelman.ottawa.on.ca) by sc8-sf-mx2.sourceforge.net with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.41) id 1CHp3y-0000BJ-5p for user-mode-linux-devel@lists.sourceforge.net; Wed, 13 Oct 2004 12:45:31 -0700 Received: from road.marajade.sandelman.ca (marajade.sandelman.ottawa.on.ca [205.150.200.247]) by noxmail.sandelman.ottawa.on.ca (8.11.6p3/8.11.6) with ESMTP id i9DJjKE16030 (using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified OK) for ; Wed, 13 Oct 2004 15:45:21 -0400 (EDT) Received: from sandelman.ottawa.on.ca (marajade [127.0.0.1]) by road.marajade.sandelman.ca (8.12.11/8.12.3/Debian-6.6) with ESMTP id i9DJjKTQ008070 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 13 Oct 2004 15:45:20 -0400 Received: from marajade.sandelman.ottawa.on.ca (mcr@localhost) by sandelman.ottawa.on.ca (8.12.11/8.12.3/Debian-6.6) with ESMTP id i9DJjJ0b008067 for ; Wed, 13 Oct 2004 15:45:19 -0400 Mime-Version: 1.0 (generated by tm-edit 1.8) Content-Type: text/plain; charset=US-ASCII Message-ID: <8066.1097696719@marajade.sandelman.ottawa.on.ca> From: Michael Richardson Subject: [uml-devel] core dumps and hostfs Sender: user-mode-linux-devel-admin@lists.sourceforge.net Errors-To: user-mode-linux-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: The user-mode Linux development list List-Post: List-Help: List-Subscribe: , List-Archive: Date: Wed, 13 Oct 2004 15:45:19 -0400 To: user-mode-linux-devel@lists.sourceforge.net -----BEGIN PGP SIGNED MESSAGE----- I have a problem with core dumps under UML. It seems that they don't work on hostfs. My guess is that there is something in hostfs that doesn't return the right answer. fs/exec.c, do_coredump(long signr, struct pt_regs * regs) has the following code: file = filp_open(corename, O_CREAT | 2 | O_NOFOLLOW, 0600); if (IS_ERR(file)) goto fail; inode = file->f_dentry->d_inode; % if (inode->i_nlink > 1) % goto close_fail; /* multiple links - don't dump */ if (d_unhashed(file->f_dentry)) goto close_fail; if (!S_ISREG(inode->i_mode)) goto close_fail; if (!file->f_op) goto close_fail; if (!file->f_op->write) goto close_fail; if (do_truncate(file->f_dentry, 0) != 0) goto close_fail; retval = binfmt->core_dump(signr, regs, file); Note that since the file gets created, I looked carefully at what happens, and finally I noticed that the file has multiple hard links! As such that would cause the test at (%) to fail. Look below to EXPERIMENT. Does this make any sense to anyone? I did not have this problem with 2.4.19-47. - --DETAILS-- My guest is: east:/testing/pluto/aggr-pluto-01# uname -a Linux east 2.4.26-3um #1 Fri Oct 8 00:26:17 EDT 2004 i686 unknown I have: east:/testing/pluto/aggr-pluto-01# ulimit -a core file size (blocks) unlimited data seg size (kbytes) unlimited file size (blocks) unlimited max locked memory (kbytes) unlimited max memory size (kbytes) unlimited open files 1024 pipe size (512 bytes) 8 stack size (kbytes) 8192 cpu time (seconds) unlimited max user processes 112 virtual memory (kbytes) unlimited I run: gimli-[aggr/testing/pluto/aggr-pluto-01] mcr 1025 %cc -g -o die die.c gimli-[aggr/testing/pluto/aggr-pluto-01] mcr 1026 %cat die.c #include main() { abort(); } east:/testing/pluto/aggr-pluto-01# ./die Aborted east:/testing/pluto/aggr-pluto-01# ls -l core - -rw------- 3 root root 0 Oct 13 19:32 core east:/tmp# ./die Aborted (core dumped) east:/tmp# ls -l total 68 - -rw------- 1 root root 57344 Oct 13 19:32 core east:/testing/pluto/aggr-pluto-01# mount /dev/root on / type hostfs (rw) proc on /proc type proc (rw) /dev/shm on /tmp type tmpfs (rw) /dev/shm on /var/run type tmpfs (rw) devpts on /dev/pts type devpts (rw,mode=0622) none on /usr/share type hostfs (ro) none on /testing type hostfs (rw,/0i/sandboxes/aggr/testing) none on /usr/src type hostfs (ro,/0i/sandboxes/aggr) none on /var/tmp type hostfs (rw,/0i/sandboxes/aggr/UMLPOOL/east/root/var/tmp) none on /usr/local type hostfs (rw,/0i/sandboxes/aggr/UMLPOOL/east/root/usr/local) EXPERIMENT east:/testing/pluto/aggr-pluto-01# ls -lta total 58 - -rw------- 3 root root 0 Oct 13 19:32 core east:/testing/pluto/aggr-pluto-01# cp /tmp/core . east:/testing/pluto/aggr-pluto-01# ls -lta total 58 - -rw------- 4 root root 57344 Oct 13 19:40 core east:/testing/pluto/aggr-pluto-01# ./die Aborted east:/testing/pluto/aggr-pluto-01# ls -lta total 58 - -rw------- 5 root root 57344 Oct 13 19:40 core east:/testing/pluto/aggr-pluto-01# cp /tmp/core . east:/testing/pluto/aggr-pluto-01# ./die Aborted east:/testing/pluto/aggr-pluto-01# ls -l core - -rw------- 7 root root 57344 Oct 13 19:40 core gimli-[aggr/testing/pluto/aggr-pluto-01] mcr 1029 %ls -l core - -rw------- 1 mcr ixia 57344 Oct 13 15:40 core {Note that on the host, /0i is an NFS mount from another server. (The server is very fast, as fast as local disks, and gets backed up)} - -- ] "Elmo went to the wrong fundraiser" - The Simpson | firewalls [ ] Michael Richardson, Xelerance Corporation, Ottawa, ON |net architect[ ] mcr@xelerance.com http://www.sandelman.ottawa.on.ca/mcr/ |device driver[ ] panic("Just another Debian GNU/Linux using, kernel hacking, security guy"); [ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) Comment: Finger me for keys iQCVAwUBQW2FzYqHRg3pndX9AQFJwgQAvJCXBSJc1kJZf5CnUusNWPyrIh6aIcFE O0F3A/Hyt34LV0HemtTkcx+AyYt73Q+Xx4sZ4McV8n/S2WwTuyABap6WNz/dvsKt QINGyCMVBcIF5ukkHjXno1V4cv1te9LWIbIpWJlsGAbievGTFm+LZXvDcMEeIaJs PRv4CQRxnYY= =U60V -----END PGP SIGNATURE----- ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel