Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
From: Jeff Dike <jdike@ka...> - 2001-07-28 14:23:16
Hmmm, well I get this:
> Please enter the address of an NTP server, or <enter> to end:
> Congratulations, you now have an /etc/ntp.conf... Starting NTP server:
> Child 2444 exited with signal 11
which explains why nothing pings and gdb doesn't work.
From: Jeff Dike <jdike@ka...> - 2001-07-28 17:03:10
> Hrm, yes, so it does. Anything which can be done about that?
Yeah, it can be fixed. I'm looking at it in my spare moments.
If you want to chase it yourself, get gdb going before running apt-get,
wait for a seg fault on &__errno_location, and figure out what the heck is
From: David Coulson <david@da...> - 2001-07-29 13:22:03
On Sat, 28 Jul 2001, Jeff Dike wrote:
> If you want to chase it yourself, get gdb going before running apt-get,
> wait for a seg fault on &__errno_location, and figure out what the heck is
> happening :-)
Hrm, well, I had a go, but gdb keeps dying when I install ntp... Is there
a nice way to debug this thing?
David Coulson http://davidcoulson.net/
From: Jeff Dike <jdike@ka...> - 2001-07-30 21:13:52
> Hrm, well, I had a go, but gdb keeps dying when I install ntp... Is
> there a nice way to debug this thing?
If you let it go to the point that it dies, then you have to switch over to
attaching gdb to the tracing thread and doing a post-mortem on it.
So far, I've figured out that the first page of the binary
(0x10000000-0x10001000) is somehow being unmapped, and a physical page being
mapped in its place by the fault handler. I think it's happening in do_mlockall
but I haven't verified that yet.
This is pretty bizarre.
From: Jeff Dike <jdike@ka...> - 2001-08-10 03:24:03
> However, I decided to install ntp, which it started to do, then it
> just stopped dead - No kernel panic, no syslog entry, no anything.
> Can't ping it, can't make it do anything at the console, can't Ctrl-C
> in gdb to check what's happening.
I took another look at this and figured out what was happening.
UML maps itself into the middle of each process address space. It gives
each process vmas describing these areas so that mmap knows that they are
taken and that it shouldn't try to use them for anything.
However, these areas don't have ptes. That costs memory, and seemed
unnecessary. So, according to the ptes, those pages aren't present. In
reality, of course, they are. This hasn't caused problems because in order
to come to the attention of the low-level mapping code, ptes need a bit set
saying that they have recently changed. These ptes don't get that bit set,
so they have been safe.
But, ntpd calls mlockall, which walks the vmas, forcing the pages behind
them into memory if they're not already. So, these kernel areas, which
don't have ptes, look like they're not present, and get marked as needing
remapping. So, when the remapping code sees that, it starts unmapping
the kernel text. It only gets to the first page because it needs stuff
there, and goes into an endless segfault loop on it.
The fix is to provide ptes for all the kernel stuff in order to prevent
them from being fooled with. This is somewhat painful because of the
extra memory that needs to be allocated, but it's somewhat necessary until
I rearrange the address spaces to be somewhat more sane.
From: David Coulson <david@da...> - 2001-08-13 15:11:41
On Thu, 9 Aug 2001, Jeff Dike wrote:
> The fix is to provide ptes for all the kernel stuff in order to prevent
> them from being fooled with. This is somewhat painful because of the
> extra memory that needs to be allocated, but it's somewhat necessary until
> I rearrange the address spaces to be somewhat more sane.
Uh, okay - No wonder I couldn't get my head around it :-)
I'm assuming it will be a case of adding in a temp solution until you can
restructure the memory later?
David Coulson http://davidcoulson.net/