From: Michael Richardson <mcr@sandelman.ottawa.on.ca>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] core dumps and hostfs
Date: Wed, 13 Oct 2004 15:45:19 -0400 [thread overview]
Message-ID: <8066.1097696719@marajade.sandelman.ottawa.on.ca> (raw)
-----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 <assert.h>
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
next reply other threads:[~2004-10-13 19:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-13 19:45 Michael Richardson [this message]
2004-10-17 13:34 ` [uml-devel] core dumps and hostfs BlaisorBlade
2004-10-18 16:25 ` Michael Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8066.1097696719@marajade.sandelman.ottawa.on.ca \
--to=mcr@sandelman.ottawa.on.ca \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox