On Fri, Apr 17, 2009 at 04:18:23PM +0800, Am??rico Wang wrote:
> On Tue, Apr 14, 2009 at 12:36:03AM +0800, Américo Wang wrote:
> >Anyway, I will test your patch tomorrow, and will send you more
> >feedbacks soon.
> Sorry for the delay.
UML on UML stopped working long time ago, I wrote a note on it
on March 8. See:
Here I am having the same behavior with and without my patches, thus
(in my opinion) the bug is not related with the new tags.
It seems that there are some problems on the virtual memory
when UML runs UML.
With older kernels (<126.96.36.199) the error is:
Eeek! page_mapcount(page) went negative! (-1)
the error is still there now but the message I get is different:
BUG: Bad page map in process linux.umlv2 pte:00164045 pmd:07b5e1e1
page:08905c80 flags:00000400 count:-2 mapcount:-4 mapping:(null) index:0
addr:00100000 vm_flags:00060055 anon_vma:(null) mapping:(null) index:100
0fc01d64: [<081a9c5a>] dump_stack+0x1c/0x20
0fc01d7c: [<080a233f>] print_bad_pte+0x16d/0x17d
0fc01dac: [<080a2c20>] unmap_vmas+0x273/0x46f
0fc01e04: [<080a5c69>] unmap_region+0x82/0xfe
0fc01e3c: [<080a68b1>] do_munmap+0x1f6/0x245
0fc01e6c: [<080a7118>] mmap_region+0xc4/0x3fd
0fc01eb8: [<080a765b>] do_mmap_pgoff+0x20a/0x253
0fc01ef0: [<08059b2f>] sys_mmap2+0x60/0x8e
0fc01f28: [<0805b0df>] handle_syscall+0x7f/0x9c
0fc01f78: [<0806a27a>] userspace+0x2d0/0x377
0fc01fe0: [<08058e38>] fork_handler+0x53/0x5b
0fc01ffc: [<00000000>] 0x0
(and then many others)
It seems that the page table of the UML process inside UML gets garbled:
I think that neither "count" should never reach -2 nor "mapcount" -4.
The numbers of count and mapcount decrease at each faulty UML execution
(the following are outputs of tests without my patch)
$ ./linux ....
0> page:08905d00 flags:00000400 count:1 mapcount:-1 mapping:(null) index:0
$ ./linux ....
1> page:08905d00 flags:00000400 count:0 mapcount:-2 mapping:(null) index:0
2> page:08905d00 flags:00000400 count:-1 mapcount:-3 mapping:(null) index:0
3> page:08905d00 flags:00000400 count:-2 mapcount:-4 mapping:(null) index:0
It seems that a page gets released twice.
I have successfully tested my paches in various configurations:
- patched-kernel running patched-UML
- patched-kernel running unpatched-UML
- patched-kernel running umview
- patched-UML running umview
- UML on UML fails in the same way with and without the patch.
I am currently running the patched kernel on my laptop.
In my spare time (does it exist? ;-) I'll try to track the UML bug
(hoping that Jeff can do it before me, Jeff are you online? ;-)