From: "Tom Spink" <tspink@gmail.com>
To: "Jeff Dike" <jdike@addtoit.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: UML fails to locate address space
Date: Tue, 20 May 2008 14:59:14 +0100 [thread overview]
Message-ID: <7b9198260805200659p6ed28403t9b0b0ea995f158d5@mail.gmail.com> (raw)
In-Reply-To: <20080520135238.GB6990@c2.user-mode-linux.org>
[-- Attachment #1: Type: text/plain, Size: 1146 bytes --]
2008/5/20 Jeff Dike <jdike@addtoit.com>:
> On Tue, May 20, 2008 at 12:08:24PM +0100, Tom Spink wrote:
>> I've just recently pulled the latest GIT and compiled UML, however,
>> when I run it a message appears saying "Locating the top of the
>> address space... Address 0x0 no good?" and the program exits.
>
> Can you strace it and send me the output?
Attached. I guess the line of interest is:
mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = -1 EACCES (Permission
denied)
>
>> After some digging, it appears that page_ok is returning false when
>> checking 'bottom', in os_get_task_size
>> (arch/um/os-Linux/sys-i386/task_size.c:96). After running through
>> GDB, it seems that in line 31 of that file is where the segfault
>> occurs:
>>
>> n = *address;
>>
>> i.e. when trying to read from the address space (at address zero).
>
> The segfaults are on purpose - it will trap SIGSEGV and longjmp out of
> the handler and mark the affected address as not-usable.
I gathered that much - I was just letting you know which test it was
that was failing.
>
> Jeff
>
Thanks!
--
Tom Spink
[-- Attachment #2: uml-strace --]
[-- Type: application/octet-stream, Size: 2978 bytes --]
execve("linux-2.6/vmlinux", ["linux-2.6/vmlinux", "ubd0=./rootfs"], [/* 33 vars */]) = 0
brk(0) = 0x834d000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f93000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/sse2/cmov/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/i686/sse2/cmov", 0xbfe577a0) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/sse2/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/i686/sse2", 0xbfe577a0) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libutil.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\n\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9696, ...}) = 0
mmap2(NULL, 12432, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f8f000
mmap2(0xb7f91000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7f91000
close(3) = 0
open("/lib/tls/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260e\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1364388, ...}) = 0
mmap2(NULL, 1369712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e40000
mmap2(0xb7f89000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x149) = 0xb7f89000
mmap2(0xb7f8c000, 9840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f8c000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e3f000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e3fad0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7f89000, 4096, PROT_READ) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
brk(0) = 0x834d000
brk(0x836e000) = 0x836e000
rt_sigaction(SIGINT, {0x806a770, [], SA_NOMASK|SA_ONESHOT}, NULL, 8) = 0
rt_sigaction(SIGTERM, {0x806a770, [], SA_NOMASK|SA_ONESHOT}, NULL, 8) = 0
rt_sigaction(SIGHUP, {0x806a770, [], SA_NOMASK|SA_ONESHOT}, NULL, 8) = 0
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e3e000
write(1, "Locating the top of the address "..., 42) = 42
rt_sigaction(SIGSEGV, {0x806d950, [], SA_NOMASK}, {SIG_DFL}, 8) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = -1 EACCES (Permission denied)
write(2, "Address 0x0 no good?\n", 21Address 0x0 no good?
) = 21
exit_group(1) = ?
Process 10371 detached
next prev parent reply other threads:[~2008-05-20 13:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-20 11:08 Tom Spink
2008-05-20 13:52 ` Jeff Dike
2008-05-20 13:59 ` Tom Spink [this message]
2008-05-20 16:10 ` Jeff Dike
2008-05-20 16:43 ` Tom Spink
2008-05-20 17:56 ` Jeff Dike
2008-05-20 18:01 ` Tom Spink
2008-05-20 19:24 ` Jeff Dike
2008-05-20 19:42 ` Tom Spink
2008-05-20 21:27 ` Jeff Dike
2008-05-20 22:03 ` Tom Spink
2008-05-20 23:57 ` Tom Spink
2008-05-21 1:58 ` Jeff Dike
2008-05-20 15:22 ` linux-os (Dick Johnson)
2008-05-20 17:35 ` Jeff Dike
2008-05-20 21:54 ` linux-os (Dick Johnson)
2008-05-21 2:15 ` Jeff Dike
2008-05-21 12:02 ` Tom Spink
2008-05-21 12:04 ` Tom Spink
2008-05-21 17:58 ` Jeff Dike
2008-05-21 19:01 ` Tom Spink
2008-05-20 21:58 ` linux-os (Dick Johnson)
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=7b9198260805200659p6ed28403t9b0b0ea995f158d5@mail.gmail.com \
--to=tspink@gmail.com \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®