ULE 2.0
Jeff Roberson
jroberson at chesapeake.net
Thu Jan 4 14:02:34 PST 2007
Please test with the attached patch. Your system should boot now and
report two printfs in dmesg:
+ printf("sched_priority: invalid priority
%d",
+ pri);
+ printf("nice %d, ticks %d ftick %d ltick
%d tick pri %d\n",
If you could supply me with the output of those I can surely fix the
problem.
Thanks,
Jeff
On Fri, 5 Jan 2007, Norikatsu Shigemura wrote:
> On Thu, 4 Jan 2007 01:11:59 -0800 (PST)
> Jeff Roberson <jroberson at chesapeake.net> wrote:
>> Any and all feedback is welcome. Please make sure any problem reports are
>> sent to jroberson at chesapeake.net in the to line so I see them more
>> quickly.
>
> How about following panic?
>
> pmtimer0 on isa0
> orm0: <ISA Option ROMs> at iomem 0xc0000-0xccfff,0xd0000-0xd3fff pnpid ORM0000 on isa0
> sc0: <System console> at flags 0x100 on isa0
> sc0: VGA <16 virtual consoles, flags=0x300>
> vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
> Timecounters tick every 1.000 msec
> Fast IPsec: Initialized Security Association Processing.
> (noperiph:sym0:0:-1:-1): SCSI BUS reset delivered.
> (noperiph:sym1:0:-1:-1): SCSI BUS reset delivered.
> panic: sched_priority: invalid priority 225
> cpuid = 0
> KDB: stack backtrace:
> db_trace_self_wrapper(806b9702,f7bf6b5c,804a1776,806d8769,0,...) at db_trace_self_wrapper+0x26
> kdb_backtrace(806d8769,0,806b87f2,f7bf6b68,84685cb0,...) at kdb_backtrace+0x2e
> panic(806b87f2,e1,8072a900,8072a900,ffffffff,...) at panic+0x126
> sched_priority(8072a900,1,806b86d1,570,8072a6c0,...) at sched_priority+0xc6
> sched_wakeup(8072a900,1,806b7618,1cc,8072a900,...) at sched_wakeup+0xe8
> setrunnable(8072a900,1,806ba13f,271) at setrunnable+0xb5
> sleepq_resume_thread(84412980,8072a900,ffffffff,2bd,84d0f064,...) at sleepq_resume_thread+0x2a8
> sleepq_signal(84d0f064,1,ffffffff,0,84d0f04c,...) at sleepq_signal+0x11b
> cv_signal(84d0f064,0,806b6bed,4f,8094c65d,...) at cv_signal+0x3b
> _sema_post(84d0f04c,8094c65d,1e1,84d0f000,84d0f000,...) at _sema_post+0x44
> ata_completed(84d0f000,0,84d0f000,84a11880,f7bf6ca8,...) at ata_completed+0x35d
> ata_finish(84d0f000,2,8094bf73,156,84a1a780,...) at ata_finish+0x36
> ata_interrupt(846aee00,f7bf6cd0,804befb1,8072c070,2,...) at ata_interrupt+0x14f
> ithread_execute_handlers(84684900,844b6680,80495eef,8072c070,84685cb0,...) at ithread_execute_handlers+0x168
> ithread_loop(84a1a680,f7bf6d38,806b3baa,328,84684900,...) at ithread_loop+0x84
> fork_exit(80486cd0,84a1a680,f7bf6d38) at fork_exit+0xd1
> fork_trampoline() at fork_trampoline+0x8
> --- trap 0x1, eip = 0, esp = 0xf7bf6d6c, ebp = 0 ---
> KDB: enter: panic
> [thread pid 33 tid 100032 ]
> Stopped at kdb_enter+0x30: leave
> db> call doadump
> Cannot dump. No dump device defined.
> = 0x25
> db>
> _______________________________________________
> freebsd-current at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"
>
-------------- next part --------------
Index: sched_ule.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/sched_ule.c,v
retrieving revision 1.173
diff -u -r1.173 sched_ule.c
--- sched_ule.c 4 Jan 2007 12:16:19 -0000 1.173
+++ sched_ule.c 4 Jan 2007 21:59:06 -0000
@@ -1037,11 +1037,24 @@
("sched_priority: invalid interactive priority %d", pri));
} else {
pri = SCHED_PRI_MIN;
- if (td->td_sched->ts_ticks)
- pri += SCHED_PRI_TICKS(td->td_sched);
+ pri += SCHED_PRI_TICKS(td->td_sched);
pri += SCHED_PRI_NICE(td->td_proc->p_nice);
- KASSERT(pri >= PRI_MIN_TIMESHARE && pri <= PRI_MAX_TIMESHARE,
- ("sched_priority: invalid priority %d", pri));
+ if (!(pri >= PRI_MIN_TIMESHARE && pri <= PRI_MAX_TIMESHARE)) {
+ static int once = 1;
+ if (once) {
+ printf("sched_priority: invalid priority %d",
+ pri);
+ printf("nice %d, ticks %d ftick %d ltick %d tick pri %d\n",
+ td->td_proc->p_nice,
+ td->td_sched->ts_ticks,
+ td->td_sched->ts_ftick,
+ td->td_sched->ts_ltick,
+ SCHED_PRI_TICKS(td->td_sched));
+ once = 0;
+ }
+ pri = min(max(pri, PRI_MIN_TIMESHARE),
+ PRI_MAX_TIMESHARE);
+ }
}
sched_user_prio(td, pri);
More information about the freebsd-current
mailing list