From fireball@zerouptime.ch  Thu Sep  2 20:28:40 2004
Return-Path: <fireball@zerouptime.ch>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 582C216A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  2 Sep 2004 20:28:40 +0000 (GMT)
Received: from mail.zerouptime.ch (mail.zerouptime.ch [81.6.6.91])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C2D0D43D1D
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  2 Sep 2004 20:28:39 +0000 (GMT)
	(envelope-from fireball@zerouptime.ch)
Received: by mail.zerouptime.ch (Postfix, from userid 1000)
	id 2D073344; Thu,  2 Sep 2004 22:28:39 +0200 (CEST)
Message-Id: <20040902202839.2D073344@mail.zerouptime.ch>
Date: Thu,  2 Sep 2004 22:28:39 +0200 (CEST)
From: Jonas Nagel <fireball@zerouptime.ch>
Reply-To: Jonas Nagel <fireball@zerouptime.ch>
To: FreeBSD-gnats-submit@freebsd.org
Cc: fireball@zerouptime.ch
Subject: kernel crash on rtprio pid priority change
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         71310
>Category:       kern
>Synopsis:       [panic] kernel crash on rtprio pid priority change
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jeff
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 02 20:30:28 GMT 2004
>Closed-Date:    Wed Mar 14 22:30:40 GMT 2007
>Last-Modified:  Wed Mar 14 22:30:40 GMT 2007
>Originator:     Jonas Nagel
>Release:        FreeBSD 5.3-BETA2 i386
>Organization:
-
>Environment:
System: FreeBSD hirtnb03.hirt.ch 5.3-BETA2 FreeBSD 5.3-BETA2 #0: Wed Sep  1 04:00:51 CES
T 2004     root@hirtnb03.hirt.ch:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
	Changing the rtprio of a process id to 0 always leads to a kernel panic! (see below)

>How-To-Repeat:
	root@hirtnb03:~# cvsup -L0 -h cvsup11.freebsd.org /usr/share/examples/cvsup/ports-supfile &
	[1] 480
	root@hirtnb03:~# rtprio 0 -480

>Fix:

	no idea, but it seems to be quite a showstopper!

>Release-Note:
>Audit-Trail:

From: Jonas Nagel <fireball@zerouptime.ch>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc: fireball@zerouptime.ch
Subject: Re: kern/71310: kernel crash on rtprio pid priority change
Date: Thu, 02 Sep 2004 22:50:09 +0200

 I forgot to attach the trace I typed down:
 
 panic: Negative nice count.
 cpuid = 0;
 KDB: enter: panic
 [thread 100100]
 Stopped at kbd_enter+0x2b: nop
 kbd_enter(c07f074b) at kbd_enter+0x2b
 panic(c07f1c88,c19853c0,c08b32c0,da8d2c80,c060e583) at panic+0x131
 kseq_nice_rem(c08b32c0,0) at kseq_nice_rem+0x44
 kseq_load_rem(c08b32c0,c19853c0,1ca1d55,c200ab2c,c2010160) at kseq_load_rem+0x7b
 sched_switch(c2010160,0) at sched_switch+0x90
 mi_switch(2,0,c2010160,de,c08b1440,0,c07f35ae,f5) at mi_switch+0x24d
 ast(da8d2d48) at ast+0x2dd
 doreti_ast() at doreti_ast+0x17
 
 
 -- 
 Jonas Nagel <fireball@zerouptime.ch>
 

From: Jonas Nagel <fireball@zerouptime.ch>
To: freebsd-gnats-submit@FreeBSD.org, fireball@zerouptime.ch
Cc:  
Subject: Re: kern/71310: kernel crash on rtprio pid priority change
Date: Mon, 06 Sep 2004 00:22:36 +0200

 I just reproduced this successfully after upgrading my OS to BETA3 :/
 
 But not everyone else seems to be able to reproduce that problem.
 
 Could it have something to do with my Hardware (IBM ThinkPad R40)? Maybe
 someone else with a ThinkPad can reproduce this too?
 
 -- 
 Jonas Nagel <fireball@zerouptime.ch>
 

From: Jonas Nagel <fireball@zerouptime.ch>
To: freebsd-gnats-submit@FreeBSD.org, fireball@zerouptime.ch
Cc:  
Subject: Re: kern/71310: kernel crash on rtprio pid priority change
Date: Tue, 07 Sep 2004 02:08:24 +0200

 This might be helpful too:
 
 root@hirtnb03:~# cat /var/run/dmesg.boot 
 Copyright (c) 1992-2004 The FreeBSD Project.
 Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
         The Regents of the University of California. All rights reserved.
 FreeBSD 5.3-BETA3 #0: Sun Sep  5 18:19:18 CEST 2004
     root@hirtnb03.hirt.ch:/usr/obj/usr/src/sys/GENERIC
 WARNING: WITNESS option enabled, expect reduced performance.
 Timecounter "i8254" frequency 1193182 Hz quality 0
 CPU: Mobile Intel(R) Pentium(R) 4 - M CPU 1.90GHz (1893.87-MHz 686-class CPU)
   Origin = "GenuineIntel"  Id = 0xf27  Stepping = 7
   Features=0xbfebf9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
 real memory  = 536215552 (511 MB)
 avail memory = 515026944 (491 MB)
 netsmb_dev: loaded
 npx0: [FAST]
 npx0: <math processor> on motherboard
 npx0: INT 16 interface
 acpi0: <IBM TP-1O> on motherboard
 acpi_ec_ecdt_probe: can't get handle
     ACPI-0358: *** Error: Region EmbeddedControl(3) has no handler
     ACPI-1303: *** Error: Method execution failed [\\_SB_.PCI0.LPC_.EC__._INI] (Node 0xc1a73420), AE_NOT_EXIST
     ACPI-0358: *** Error: Region EmbeddedControl(3) has no handler
     ACPI-1303: *** Error: Method execution failed [\\_SB_.PCI0.LPC_.EC__.BAT0._STA] (Node 0xc1a77d80), AE_NOT_EXIST
     ACPI-0239: *** Error: Method execution failed [\\_SB_.PCI0.LPC_.EC__.BAT0._STA] (Node 0xc1a77d80), AE_NOT_EXIST
     ACPI-0358: *** Error: Region EmbeddedControl(3) has no handler
     ACPI-1303: *** Error: Method execution failed [\\_SB_.PCI0.LPC_.EC__.BAT1._STA] (Node 0xc1a77c00), AE_NOT_EXIST
     ACPI-0239: *** Error: Method execution failed [\\_SB_.PCI0.LPC_.EC__.BAT1._STA] (Node 0xc1a77c00), AE_NOT_EXIST
     ACPI-0358: *** Error: Region EmbeddedControl(3) has no handler
     ACPI-1303: *** Error: Method execution failed [\\_SB_.PCI0.LPC_.EC__.BGID] (Node 0xc1a7b9a0), AE_NOT_EXIST
     ACPI-1303: *** Error: Method execution failed [\\_SB_.PCI0.LPC_.EC__.BINI] (Node 0xc1a7b9c0), AE_NOT_EXIST
     ACPI-1303: *** Error: Method execution failed [\\_SB_.PCI0.LPC_.EC__.BSTA] (Node 0xc1a7ba00), AE_NOT_EXIST
     ACPI-1303: *** Error: Method execution failed [\\_SB_.PCI0.IDE0.SCND.MSTR._STA] (Node 0xc1a7b8c0), AE_NOT_EXIST
     ACPI-0239: *** Error: Method execution failed [\\_SB_.PCI0.IDE0.SCND.MSTR._STA] (Node 0xc1a7b8c0), AE_NOT_EXIST
     ACPI-0358: *** Error: Region EmbeddedControl(3) has no handler
     ACPI-1303: *** Error: Method execution failed [\\_SB_.PCI0.LPC_.EC__.BGID] (Node 0xc1a7b9a0), AE_NOT_EXIST
     ACPI-1303: *** Error: Method execution failed [\\_SB_.PCI0.LPC_.EC__.BINI] (Node 0xc1a7b9c0), AE_NOT_EXIST
     ACPI-1303: *** Error: Method execution failed [\\_SB_.PCI0.LPC_.EC__.BSTA] (Node 0xc1a7ba00), AE_NOT_EXIST
     ACPI-1303: *** Error: Method execution failed [\\_SB_.PCI0.USB0.URTH.UNST._STA] (Node 0xc1a7c2c0), AE_NOT_EXIST
     ACPI-0239: *** Error: Method execution failed [\\_SB_.PCI0.USB0.URTH.UNST._STA] (Node 0xc1a7c2c0), AE_NOT_EXIST
     ACPI-0358: *** Error: Region EmbeddedControl(3) has no handler
     ACPI-1303: *** Error: Method execution failed [\\_SB_.PCI0.LPC_.EC__.BGID] (Node 0xc1a7b9a0), AE_NOT_EXIST
     ACPI-1303: *** Error: Method execution failed [\\_SB_.PCI0.LPC_.EC__.BINI] (Node 0xc1a7b9c0), AE_NOT_EXIST
     ACPI-1303: *** Error: Method execution failed [\\_SB_.PCI0.LPC_.EC__.BSTA] (Node 0xc1a7ba00), AE_NOT_EXIST
     ACPI-1303: *** Error: Method execution failed [\\_SB_.PCI0.USB7.URTH.UNST._STA] (Node 0xc1a7bcc0), AE_NOT_EXIST
     ACPI-0239: *** Error: Method execution failed [\\_SB_.PCI0.USB7.URTH.UNST._STA] (Node 0xc1a7bcc0), AE_NOT_EXIST
     ACPI-0358: *** Error: Region EmbeddedControl(3) has no handler
     ACPI-1303: *** Error: Method execution failed [\\_SB_.PCI0.LPC_.EC__.BGID] (Node 0xc1a7b9a0), AE_NOT_EXIST
     ACPI-1303: *** Error: Method execution failed [\\_SB_.PCI0.LPC_.EC__.BINI] (Node 0xc1a7b9c0), AE_NOT_EXIST
     ACPI-1303: *** Error: Method execution failed [\\_SB_.PCI0.LPC_.EC__.BSTA] (Node 0xc1a7ba00), AE_NOT_EXIST
     ACPI-1303: *** Error: Method execution failed [\\_SB_.NEST._STA] (Node 0xc1a7b720), AE_NOT_EXIST
     ACPI-0239: *** Error: Method execution failed [\\_SB_.NEST._STA] (Node 0xc1a7b720), AE_NOT_EXIST
 acpi0: Power Button (fixed)
 acpi_ec0: <Embedded Controller: GPE 0x1c> port 0x66,0x62 on acpi0
 Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0
 cpu0: <ACPI CPU (3 Cx states)> on acpi0
 acpi_tz0: <Thermal Zone> on acpi0
 acpi_lid0: <Control Method Lid Switch> on acpi0
 acpi_button0: <Sleep Button> on acpi0
 pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
 pci0: <ACPI PCI bus> on pcib0
 agp0: <Intel 82845 host to AGP bridge> mem 0xe0000000-0xe3ffffff at device 0.0 on pci0
 pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
 pci1: <ACPI PCI bus> on pcib1
 pci1: <display, VGA> at device 0.0 (no driver attached)
 uhci0: <Intel 82801DB (ICH4) USB controller USB-A> port 0x1800-0x181f irq 11 at device 29.0 on pci0
 uhci0: [GIANT-LOCKED]
 usb0: <Intel 82801DB (ICH4) USB controller USB-A> on uhci0
 usb0: USB revision 1.0
 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub0: 2 ports with 2 removable, self powered
 uhci1: <Intel 82801DB (ICH4) USB controller USB-B> port 0x1820-0x183f irq 11 at device 29.1 on pci0
 uhci1: [GIANT-LOCKED]
 usb1: <Intel 82801DB (ICH4) USB controller USB-B> on uhci1
 usb1: USB revision 1.0
 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub1: 2 ports with 2 removable, self powered
 uhci2: <Intel 82801DB (ICH4) USB controller USB-C> port 0x1840-0x185f irq 11 at device 29.2 on pci0
 uhci2: [GIANT-LOCKED]
 usb2: <Intel 82801DB (ICH4) USB controller USB-C> on uhci2
 usb2: USB revision 1.0
 uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub2: 2 ports with 2 removable, self powered
 pci0: <serial bus, USB> at device 29.7 (no driver attached)
 pcib2: <ACPI PCI-PCI bridge> at device 30.0 on pci0
 pci2: <ACPI PCI bus> on pcib2
 cbb0: <TI1510 PCI-CardBus Bridge> mem 0x50000000-0x50000fff irq 11 at device 0.0 on pci2
 cardbus0: <CardBus bus> on cbb0
 pccard0: <16-bit PCCard bus> on cbb0
 fwohci0: <Texas Instruments TSB43AB21/A/AI/A-EP> mem 0xd0200000-0xd0203fff,0xd0205000-0xd02057ff irq 11 at device 7.0 on pci2
 fwohci0: OHCI version 1.10 (ROM=0)
 fwohci0: No. of Isochronous channels is 4.
 fwohci0: EUI64 00:06:1b:00:20:04:c7:04
 fwohci0: Phy 1394a available S400, 1 ports.
 fwohci0: Link S400, max_rec 2048 bytes.
 firewire0: <IEEE1394(FireWire) bus> on fwohci0
 fwe0: <Ethernet over FireWire> on firewire0
 if_fwe0: Fake Ethernet address: 02:06:1b:04:c7:04
 fwe0: Ethernet address: 02:06:1b:04:c7:04
 fwe0: if_start running deferred for Giant
 sbp0: <SBP-2/SCSI over FireWire> on firewire0
 fwohci0: Initiate bus reset
 fwohci0: node_id=0xc000ffc0, gen=1, CYCLEMASTER mode
 firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
 firewire0: bus manager 0 (me)
 fxp0: <Intel 82801DB (ICH4) Pro/100 VE Ethernet> port 0x8000-0x803f mem 0xd0204000-0xd0204fff irq 11 at device 8.0 on pci2
 miibus0: <MII bus> on fxp0
 inphy0: <i82562ET 10/100 media interface> on miibus0
 inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 fxp0: Ethernet address: 00:06:1b:c0:d9:f4
 isab0: <PCI-ISA bridge> at device 31.0 on pci0
 isa0: <ISA bus> on isab0
 atapci0: <Intel ICH4 UDMA100 controller> port 0x1860-0x186f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 31.1 on pci0
 ata0: channel #0 on atapci0
 ata1: channel #1 on atapci0
 pci0: <serial bus, SMBus> at device 31.3 (no driver attached)
 pcm0: <Intel ICH4 (82801DB)> port 0x18c0-0x18ff,0x1c00-0x1cff mem 0xd0000800-0xd00008ff,0xd0000c00-0xd0000dff irq 11 at device 31.5 on pci0
 pcm0: [GIANT-LOCKED]
 pcm0: <Analog Devices AD1981B AC97 Codec>
 pci0: <simple comms> at device 31.6 (no driver attached)
 atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
 atkbd0: <AT Keyboard> irq 1 on atkbdc0
 kbd0 at atkbd0
 atkbd0: [GIANT-LOCKED]
 psm0: <PS/2 Mouse> irq 12 on atkbdc0
 psm0: [GIANT-LOCKED]
 psm0: model Synaptics Touchpad, device ID 0
 sio0: configured irq 4 not in bitmap of probed irqs 0
 sio0: port may not be enabled
 sio0 port 0x3f8-0x3ff irq 4 on acpi0
 sio0: type 8250 or not responding
 ppc0 port 0x3bc-0x3be irq 7 on acpi0
 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
 ppbus0: <Parallel port bus> on ppc0
 plip0: <PLIP network interface> on ppbus0
 lpt0: <Printer> on ppbus0
 lpt0: Interrupt-driven port
 ppi0: <Parallel I/O> on ppbus0
 sio1 port 0x2f8-0x2ff irq 3 drq 3 on acpi0
 sio1: type 16550A
 acpi_cmbat0: <Control Method Battery> on acpi0
 acpi_acad0: <AC Adapter> on acpi0
 orm0: <ISA Option ROMs> at iomem 0xdc000-0xdffff,0xd1000-0xd1fff,0xd0000-0xd0fff on isa0
 pmtimer0 on isa0
 fdc0: ready for input in output
 fdc0: cmd 3 failed at out byte 1 of 3
 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
 Timecounter "TSC" frequency 1893868664 Hz quality 800
 Timecounters tick every 10.000 msec
 acpi_cpu: throttling enabled, 8 steps (100% to 12.5%), currently 100.0%
 cardbus0: Resource not specified in CIS: id=10, size=20
 cardbus0: Resource not specified in CIS: id=18, size=10000
 acx0: <Texas Instruments (TI) 802.11b+ 22Mbps Wireless Adapter> port 0x4000-0x401f mem 0xd0220000-0xd022ffff,0xd0230000-0xd0230fff irq 11 at device 0.0 on cardbus0
 acx0: Ethernet address: 00:80:c8:ad:7a:ec
 acx0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
 acx0: 802.11 address: 00:80:c8:ad:7a:ec
 acx0: Eeprom Rev 4 Domain ETSI Europe (1-13), Firmware Rev 1.9.8.b
 acx0: Radio Type 0x11, Antenna 0x00, CCA Mode 0x0d, ED Threshold 0x70
 acx0: (c) http://wlan.kewl.org/ 2003-2004
 ad0: 35345MB <FUJITSU MHS2040AT D/8205> [71813/16/63] at ata0-master UDMA100
 ATAPI_RESET time = 140us
 acd0: CDRW <HL-DT-STCD-RW/DVD DRIVE GCC-4240N/0211> at ata1-master UDMA33
 Mounting root from ufs:/dev/ad0s2a
 
 Btw. the custom module if_acx.ko was added after reproduction of the
 issue.
 -- 
 Jonas Nagel <fireball@zerouptime.ch>
 

From: Jonas Nagel <fireball@zerouptime.ch>
To: freebsd-gnats-submit@FreeBSD.org, fireball@zerouptime.ch
Cc:  
Subject: Re: kern/71310: [panic] kernel crash on rtprio pid priority change
Date: Mon, 13 Sep 2004 02:21:28 +0200

 Ok, I have good news!
 
 The problem seems to be fixed from what I can tell as of PREBETA4, compile/cvsup date as follows:
 
 FreeBSD hirtnb03.hirt.ch 5.3-BETA4 FreeBSD 5.3-BETA4 #1: Mon Sep 13 01:33:15 CEST 2004     root@hirtnb03.hirt.ch:/usr/obj/usr/src/sys/GENERIC  i386
 
 
 Thank you and hope to have helped.
 
 - Jonas
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Mon Sep 13 07:34:08 GMT 2004 
State-Changed-Why:  
The submitter reports the issue was fixed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71310 
State-Changed-From-To: closed->open 
State-Changed-By: maxim 
State-Changed-When: Sat Sep 18 10:13:54 GMT 2004 
State-Changed-Why:  
Still the issue with RELENG_5 and SCHED_ULE. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71310 
Responsible-Changed-From-To: freebsd-bugs->jeff 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Fri Nov 19 18:37:28 GMT 2004 
Responsible-Changed-Why:  
This seems to be ULE specific. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71310 
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Wed Mar 14 22:27:08 UTC 2007 
State-Changed-Why:  
The original submitter noted that the problem had been worked around 
for him.  With bugmeister's hat on, go ahead and close this one with the 
notation that ULE 1.0 in RELENG_5 is not going to be fixed; the fix, for 
those interested in ULE 2.0, is to upgrade to 7-CURRENT. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71310 
>Unformatted:
