From owner-freebsd-questions Thu Dec 26 23:12:16 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 47A8537B401 for ; Thu, 26 Dec 2002 23:12:14 -0800 (PST) Received: from mail.tele-kom.ru (tele-kom.ru [81.22.2.14]) by mx1.FreeBSD.org (Postfix) with SMTP id F025743ED4 for ; Thu, 26 Dec 2002 23:12:12 -0800 (PST) (envelope-from doublef@tele-kom.ru) Received: (qmail 691 invoked by uid 0); 27 Dec 2002 07:12:05 -0000 Date: 27 Dec 2002 07:12:05 -0000 Message-ID: <20021227071205.690.qmail@mail.tele-kom.ru> Cc: recipient list not shown: ; Received: from (HELO ) (81.22.3.225) by tele-kom.ru with ESMTP id 652-1040973125-10 for freebsd-questions@freebsd.org; Fri Dec 27 07:12:05 2002 0000 From: doublef@tele-kom.ru Subject: Strange panics in mi_switch etc. in 4.4 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello, I am getting (relatively) random panics in the kernel, mostly at boot-time. The kernel is not `factory-made', i recompiled it, but GENERIC shipped with 4.4-RELEASE also seems to be reproducing the bug (I got it there at least once). The most frequent faults are in mi_switch() called from tsleep() and in tsleep() itself. The callers of tsleep() are different disk routines: biowait(), mount() etc. Here is an extract from the dump: -extract begin- <118>Additional daemons: <118> syslogd Fatal trap 12: page fault while in kernel mode fault virtual address = 0x0 fault code = supervisor write, page not present instruction pointer = 0x8:0xc013cb60 stack pointer = 0x10:0xc3c4ee94 frame pointer = 0x10:0xc3c4eeb8 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 119 (syslogd) interrupt mask = net tty bio cam -extract end- In mi_switch(), the place of trouble is:---------\ (kern_synch.c) V if (p->p_stat != SZOMB && p->p_limit->p_cpulimit != RLIM_INFINITY && p->p_runtime > p->p_limit->p_cpulimit) { The != compare fails, p_cpulimit is NULL! They seem to occur when much disk activity is in place, and most frequently appear when i boot the PC the first time a day (?, i rarely manage to boot the first time;). As this can involve HD problems, here's what FreeBSD says about it: ata1-master: DMA limited to UDMA33, non-ATA66 compliant cable ad2: 76319MB [155061/16/63] at ata1-master WDMA2 The numbers are correct. Note that my olden bios can't handle the whole disk, but IMHO that can't be the cause of trouble. By the way, i can't get /boot/loader to load, because it's outside the addressable area;) The cause of trouble might be being low on core (32MB ONLY) or on stack (dunno, seems to be enough of). How do i figure it out? The STRANGE thing about them is when i put splhigh() - splx() `braces' around the offending instructions, the bugs DISAPPEAR _there_, but reappear in other places; i can only fix some of them, and i can't be running ints disabled all the time! Is there a background proc playing fandango on core? What do i do? Any help will be appreciated. Thanks, Sergey Zaharchenko == DoubleF To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message