| Summary: | RELENG_4 (4.2, 4.3) Panics when system has 2GB of memory (SWAP) | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Simon Shapiro <shimon> |
| Component: | kern | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
State Changed From-To: open->feedback Does this still occur with a recent -stable? I seem to remember seeing some fixes in this area committed. > Does this still occur with a recent -stable? I seem to remember > seeing some fixes in this area committed. This issue has been discussed in the FreeBSD -hackers, -stable, and -current mailing lists, at great lengths, and there are various patches for -current and -stable submitted by Matt Dillon regarding this issue. I personally also have followed-up to PRs regarding this issue. Solution(s) to this problem can be found in the mailing lists pointed above. This PR can be successfully closed if there are no more issues regarding this matter. thanks, regards, Hiten Pandya <hiten@uk.FreeBSD.org> <hitmaster@mysun.com> Security Fingerprint: 45 a5 9c f2 fb 07 da 70 18 02 0b f3 63 f1 7a a6 hitenp@hpdi.ath.cx State Changed From-To: feedback->closed Feedback timeout. |
/usr/src/sys/vm/swap_pager.c, line 310 or thereabout calls zinit. zinit returns NULL because it calls zinita with too large a number. I tried to force the value down but that only helps in SMP. A UP kernel still crashes. I forced the value down like this: if ((swap_zone = zinit( "SWAPMETA", sizeof(struct swblock), n, ZONE_INTERRUPT, 1 )) == NULL) { int m = 127332; /* This number is from 256MB system */ printf("%s.%s(%d) ERROR: swap_zone is NULL\n" " Reducing n from %d to %d\n", __FILE__, __FUNCTION__, __LINE__, n, m); if ((swap_zone = zinit( "SWAPMETA", sizeof(struct swblock), m, ZONE_INTERRUPT, 1 )) == NULL) { panic("swap_pager_swap_init: swap_zone == NULL"); } n = m; /* Prevents failure and panic */ } NOTE: The above snippet is _not_ a fix. Fix: Not sure. The code needs to be re-written to examine how much memory is really there. I did not have this problem, in the identical machine, in RELENG_3. How-To-Repeat: Boot on a Pentium III with 2 or 4 GB of RAM.