Serious VM issues in 4.7, 4.8

Terry Lambert tlambert2 at mindspring.com
Wed Apr 9 03:05:21 PDT 2003


In FreeBSD 4.7 and 4.8, the code for vm_object_allocate() in the
file /usr/src/sys/vm/vm_object.c looks like:

> 232     vm_object_t
> 233     vm_object_allocate(type, size)
> 234             objtype_t type;
> 235             vm_size_t size;
> 236     {
> 237             vm_object_t result;
> 238
> 239             result = (vm_object_t) zalloc(obj_zone);
> 240
> 241             _vm_object_allocate(type, size, result);
> 242
> 243             return (result);
> 244     }

A number of users appear to be encountering an error in which the
zalloc() appears to be returning NULL, instead of hanging until
the sun goes nova like it should.

The resulting NULL is passed down to _vm_object_allocate(), and
causes a trap 12 in the TAILQ_INIT() there, where "object" ("result")
is dereferenced.

This appears to be a result of some of the zone allocator changes
which were back-ported after 4.6, and/or the result of the KVA
space moving from 1G to 2G on small memory machines.

I don't know what to do about this, and I can't personally repeat
it, but I'm reporting the problem to the -STABLE list, which I
don't usually follow, except via the archives (Cc: me directly, if
you want to ask a question on the list and have me see it before a
week or two goes by).

One of the people having this problem is:

	Christopher Smith <csmith at its.uq.edu.au>

He is seeing it on 4.7-RELEASE.  I've told him to look at moving to
4.8-RELEASE to allow him to convince this list to look at trying to
fix it, but the code is the same in both releases, so I expect his
problem will persist.  He has a copy of my analysis, so far.

-- Terry


More information about the freebsd-stable mailing list