lock order reversal on recent (06/30) CURRENT

2003-07-04 Thread Till Plewe
Is the following a known problem?
(occured while running python2.3 using kse)

lock order reversal
 1st 0xc03c3c40 smp rendezvous (smp rendezvous) @ /usr/src/sys/kern/subr_smp.c:3
13
 2nd 0xc03c00c0 sched lock (sched lock) @ /usr/src/sys/i386/i386/sys_machdep.c:2
92
Stack backtrace:
backtrace(c0343555,c03c00c0,c033fd89,c033fd89,c0357a74) at backtrace+0x17
witness_lock(c03c00c0,8,c0357a74,124,ffc00034) at witness_lock+0x697
_mtx_lock_spin_flags(c03c00c0,0,c0357a74,124,f5ec0c54) at _mtx_lock_spin_flags+0
xd1
set_user_ldt_rv(c7eed390,f5ec0c78,c01d9bbb,9a,0) at set_user_ldt_rv+0x3d
smp_rendezvous_action(9a,0,c0342f33,139,f5ec0d10) at smp_rendezvous_action+0x57
smp_rendezvous(0,c0312a10,0,c7eed390,c7eb97c0) at smp_rendezvous+0xab
i386_set_ldt(c7eed390,bfbff96c,c0357a74,5f,c8228da8) at i386_set_ldt+0x16d
sysarch(c7eed390,f5ec0d10,c0357cf5,3fd,2) at sysarch+0x64
syscall(2f,2f,2f,11,681518e4) at syscall+0x26e
Xint0x80_syscall() at Xint0x80_syscall+0x1d
--- syscall (165), eip = 0x6826dda3, esp = 0xbfbff958, ebp = 0xbfbff984 ---


===output of dmesg -a===
Copyright (c) 1992-2003 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.1-CURRENT #12: Thu Jul  3 13:46:40 JST 2003
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/MYKERNEL
Preloaded elf kernel /boot/kernel/kernel at 0xc04e5000.
Preloaded elf module /boot/kernel/acpi.ko at 0xc04e5294.
Timecounter i8254  frequency 1193182 Hz
Timecounter TSC  frequency 2392048864 Hz
CPU: Intel(R) Xeon(TM) CPU 2.40GHz (2392.05-MHz 686-class CPU)
  Origin = GenuineIntel  Id = 0xf27  Stepping = 7
  
Features=0xbfebfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE
  Hyperthreading: 2 logical CPUs
real memory  = 2146893824 (2047 MB)
avail memory = 2084458496 (1987 MB)
Programming 24 pins in IOAPIC #0
IOAPIC #0 intpin 2 - irq 0
Programming 24 pins in IOAPIC #1
Programming 24 pins in IOAPIC #2
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
 cpu0 (BSP): apic id:  0, version: 0x00050014, at 0xfee0
 cpu1 (AP):  apic id:  1, version: 0x00050014, at 0xfee0
 cpu2 (AP):  apic id:  6, version: 0x00050014, at 0xfee0
 cpu3 (AP):  apic id:  7, version: 0x00050014, at 0xfee0
 io0 (APIC): apic id:  2, version: 0x00178020, at 0xfec0
 io1 (APIC): apic id:  3, version: 0x00178020, at 0xfec8
 io2 (APIC): apic id:  4, version: 0x00178020, at 0xfec80100
Pentium Pro MTRR support enabled
npx0: math processor on motherboard
npx0: INT 16 interface
acpi0: PTLTDRSDT   on motherboard
pcibios: BIOS version 2.10
acpi0: power button is handled as a fixed feature programming model.
Timecounter ACPI-fast  frequency 3579545 Hz
can't fetch resources for \\_SB_.PCI0.LPC0.SIO_.LPT_ - AE_AML_INVALID_RESOURCE_TYPE
acpi_timer0: 24-bit timer at 3.579545MHz port 0x1008-0x100b on acpi0
acpi_cpu0: CPU on acpi0
acpi_cpu1: CPU on acpi0
pcib0: ACPI Host-PCI bridge port 0xcf8-0xcff on acpi0
pci0: ACPI PCI bus on pcib0
IOAPIC #0 intpin 16 - irq 2
IOAPIC #0 intpin 19 - irq 5
IOAPIC #0 intpin 18 - irq 10
IOAPIC #0 intpin 23 - irq 11
agp0: Intel Generic host to PCI bridge mem 0xe000-0xefff at device 0.0 on 
pci0
pci0: unknown at device 0.1 (no driver attached)
pcib1: ACPI PCI-PCI bridge mem 0xd400-0xd7ff at device 1.0 on pci0
pci1: ACPI PCI bus on pcib1
pcib2: ACPI PCI-PCI bridge at device 2.0 on pci0
pcib2: could not get PCI interrupt routing table for \\_SB_.PCI0.HLB_ - AE_NOT_FOUND
pci2: ACPI PCI bus on pcib2
pci2: base peripheral, interrupt controller at device 28.0 (no driver attached)
pcib3: ACPI PCI-PCI bridge at device 29.0 on pci2
pci3: ACPI PCI bus on pcib3
pci2: base peripheral, interrupt controller at device 30.0 (no driver attached)
pcib4: ACPI PCI-PCI bridge at device 31.0 on pci2
pci4: ACPI PCI bus on pcib4
IOAPIC #2 intpin 0 - irq 16
IOAPIC #2 intpin 4 - irq 17
ti0: Netgear GA620 1000baseT Gigabit Ethernet mem 0xd021-0xd0213fff irq 16 at 
device 3.0 on pci4
ti0: Ethernet address: 00:a0:cc:73:49:65
bge0: Broadcom BCM5702X Gigabit Ethernet, ASIC rev. 0x1002 mem 0xd020-0xd020 
irq 17 at device 4.0 on pci4
bge0: Ethernet address: 00:50:45:00:96:f7
miibus0: MII bus on bge0
brgphy0: BCM5703 10/100/1000baseTX PHY on miibus0
brgphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX-FDX, 
auto
pci0: serial bus, USB at device 29.0 (no driver attached)
pci0: serial bus, USB at device 29.1 (no driver attached)
pci0: serial bus, USB at device 29.2 (no driver attached)
pci0: serial bus, USB at device 29.7 (no driver attached)
pcib5: ACPI PCI-PCI bridge at device 30.0 on pci0
pci5: ACPI PCI bus on pcib5
IOAPIC #0 intpin 21 - irq 18
IOAPIC #0 intpin 22 - irq 19
pci5: serial bus, FireWire at device 0.0 (no driver attached)
pci5: display, VGA at device 1.0 (no driver attached)
isab0: PCI-ISA bridge at device 31.0 on 

python2.3 build with kse freezes CURRENT

2003-06-27 Thread Till Plewe

For the last few weeks I have difficulties building python2.3
with threads enabled. 

Building using -lthr leaves python's thread related modules
inoperable. 

Using -lkse builds ok, but in the python test suite test_signal.py
hangs for ever. It seems that a SIGALRM is not caught. Until sometime
last week the machine froze during this test. Today (CURRENT cvsuped
90 min ago) this test hangs but the machine does not freeze. However
running other test programs seems to freeze the machine after a few
minutes.

I appended dmesg output, but right now I am just curious if there is 
anybody who has a working (threads enabled) python2.3 installation 
on CURRENT (SMP). 

- Till
Copyright (c) 1992-2003 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.1-CURRENT #6: Wed Jun 25 11:37:23 JST 2003
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/MYKERNEL
Preloaded elf kernel /boot/kernel/kernel at 0xc04b2000.
Preloaded elf module /boot/kernel/acpi.ko at 0xc04b2294.
Timecounter i8254  frequency 1193182 Hz
Timecounter TSC  frequency 2392040564 Hz
CPU: Intel(R) Xeon(TM) CPU 2.40GHz (2392.04-MHz 686-class CPU)
  Origin = GenuineIntel  Id = 0xf27  Stepping = 7
  
Features=0xbfebfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE
  Hyperthreading: 2 logical CPUs
real memory  = 2146893824 (2047 MB)
avail memory = 2084663296 (1988 MB)
Programming 24 pins in IOAPIC #0
IOAPIC #0 intpin 2 - irq 0
Programming 24 pins in IOAPIC #1
Programming 24 pins in IOAPIC #2
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
 cpu0 (BSP): apic id:  0, version: 0x00050014, at 0xfee0
 cpu1 (AP):  apic id:  1, version: 0x00050014, at 0xfee0
 cpu2 (AP):  apic id:  6, version: 0x00050014, at 0xfee0
 cpu3 (AP):  apic id:  7, version: 0x00050014, at 0xfee0
 io0 (APIC): apic id:  2, version: 0x00178020, at 0xfec0
 io1 (APIC): apic id:  3, version: 0x00178020, at 0xfec8
 io2 (APIC): apic id:  4, version: 0x00178020, at 0xfec80100
Pentium Pro MTRR support enabled
npx0: math processor on motherboard
npx0: INT 16 interface
acpi0: PTLTDRSDT   on motherboard
pcibios: BIOS version 2.10
acpi0: power button is handled as a fixed feature programming model.
Timecounter ACPI-fast  frequency 3579545 Hz
can't fetch resources for \\_SB_.PCI0.LPC0.SIO_.LPT_ - AE_AML_INVALID_RESOURCE_TYPE
acpi_timer0: 24-bit timer at 3.579545MHz port 0x1008-0x100b on acpi0
acpi_cpu0: CPU on acpi0
acpi_cpu1: CPU on acpi0
pcib0: ACPI Host-PCI bridge port 0xcf8-0xcff on acpi0
pci0: ACPI PCI bus on pcib0
IOAPIC #0 intpin 16 - irq 2
IOAPIC #0 intpin 19 - irq 5
IOAPIC #0 intpin 18 - irq 10
IOAPIC #0 intpin 23 - irq 11
agp0: Intel Generic host to PCI bridge mem 0xe000-0xefff at device 0.0 on 
pci0
pci0: unknown at device 0.1 (no driver attached)
pcib1: ACPI PCI-PCI bridge mem 0xd400-0xd7ff at device 1.0 on pci0
pci1: ACPI PCI bus on pcib1
pcib2: ACPI PCI-PCI bridge at device 2.0 on pci0
pcib2: could not get PCI interrupt routing table for \\_SB_.PCI0.HLB_ - AE_NOT_FOUND
pci2: ACPI PCI bus on pcib2
pci2: base peripheral, interrupt controller at device 28.0 (no driver attached)
pcib3: ACPI PCI-PCI bridge at device 29.0 on pci2
pci3: ACPI PCI bus on pcib3
pci2: base peripheral, interrupt controller at device 30.0 (no driver attached)
pcib4: ACPI PCI-PCI bridge at device 31.0 on pci2
pci4: ACPI PCI bus on pcib4
IOAPIC #2 intpin 0 - irq 16
IOAPIC #2 intpin 4 - irq 17
ti0: Netgear GA620 1000baseT Gigabit Ethernet mem 0xd021-0xd0213fff irq 16 at 
device 3.0 on pci4
ti0: Ethernet address: 00:a0:cc:73:49:65
bge0: Broadcom BCM5702X Gigabit Ethernet, ASIC rev. 0x1002 mem 0xd020-0xd020 
irq 17 at device 4.0 on pci4
bge0: Ethernet address: 00:50:45:00:96:f7
miibus0: MII bus on bge0
brgphy0: BCM5703 10/100/1000baseTX PHY on miibus0
brgphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX-FDX, 
auto
pci0: serial bus, USB at device 29.0 (no driver attached)
pci0: serial bus, USB at device 29.1 (no driver attached)
pci0: serial bus, USB at device 29.2 (no driver attached)
pci0: serial bus, USB at device 29.7 (no driver attached)
pcib5: ACPI PCI-PCI bridge at device 30.0 on pci0
pci5: ACPI PCI bus on pcib5
IOAPIC #0 intpin 21 - irq 18
IOAPIC #0 intpin 22 - irq 19
pci5: serial bus, FireWire at device 0.0 (no driver attached)
pci5: display, VGA at device 1.0 (no driver attached)
isab0: PCI-ISA bridge at device 31.0 on pci0
isa0: ISA bus on isab0
atapci0: Intel ICH4 UDMA100 controller port 0x1460-0x146f,0-0x3,0-0x7,0-0x3,0-0x7 
irq 0 at device 31.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
pci0: serial bus, SMBus at device 31.3 (no driver attached)
acpi_button0: Power Button on acpi0
fdc0: Enhanced floppy controller (i82077, NE72065 or clone) port 0x3f7,0x3f0-0x3f5 
irq 6 drq 2 on acpi0
fdc0: FIFO enabled, 8 

curses header conflict (wchar_t,wint_t)

2003-06-02 Thread Till Plewe
When trying to install python2.3 on either stable or current the python 
curses module doesn't build. I get the following compiler complaints:

STABLE (line numbers in brackets are from CURRENT)

/usr/include/ncurses.h:236(289): conflicting types for `wchar_t'
/usr/include/stdlib.h:58(57): previous declaration of `wchar_t'
/usr/include/ncurses.h:239(292): conflicting types for `wint_t'
/usr/include/wchar.h:89(96): previous declaration of `wint_t'

Can somebody tell me the story of _WCHAR_T and _BSD_WCHAR_T, or tell me
where I can find some hints?

I found several long threads on seemingly related problems but
haven't been enlightened yet. 

(One drastic fix is to remove the relevant lines from ncurses.h 
while building python.)

- Till
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


smp-kernel panics while booting

2003-03-03 Thread Till Plewe
I have 2 Xeon processors on a PDPEA (Rioworks) motherboard 
(http://www.rioworks.co.jp/products/pdpea.html).

The generic kernel boots without problems (see output of dmesg below).

When I use the SMP kernel I invariably (5.0 release, various CURRENTs,
the latest cvsuped yesterday, various BIOS settings) get:

CPU ...
real memory ...
avail memory ...

Programming 24 pins in IOAPIC #0
IOAPIC #0 intpin 2 - irq 0
Programming 24 pins in IOAPIC #1
Programming 24 pins in IOAPIC #2
AP #1 (PHY# 1) failed!
panic y/n [y] Uptime: 1s
panic: Assertion mtx_unowned(m)  failed at /usr/src/sys/kern/kern_mutex.c:966
cpuid = 0; lapic.id = 
Debugger(panic)
Stopped at  Debugger+0x4f:  xchgl   %ebx,in_Debugger.0

I would be grateful for any suggestions.

- Till

PS Linux 2.4.18-14smp seems to work.


OUTPUT OF DMESG
===
Copyright (c) 1992-2003 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.0-CURRENT #3: Mon Mar  3 20:51:39 JST 2003
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC
Preloaded elf kernel /boot/kernel.gen/kernel at 0xc069f000.
Preloaded elf module /boot/kernel.gen/acpi.ko at 0xc069f0ac.
Timecounter i8254  frequency 1193182 Hz
Timecounter TSC  frequency 2392042856 Hz
CPU: Intel(R) Xeon(TM) CPU 2.40GHz (2392.04-MHz 686-class CPU)
  Origin = GenuineIntel  Id = 0xf27  Stepping = 7
  
Features=0xbfebfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE
  Hyperthreading: 2 logical CPUs
real memory  = 2146893824 (2047 MB)
avail memory = 2082635776 (1986 MB)
Allocating major#253 to net
Allocating major#252 to pci
Pentium Pro MTRR support enabled
npx0: math processor on motherboard
npx0: INT 16 interface
acpi0: PTLTDRSDT   on motherboard
ACPI-0625: *** Info: GPE Block0 defined as GPE0 to GPE15
pcibios: BIOS version 2.10
acpi0: power button is handled as a fixed feature programming model.
Timecounter ACPI-fast  frequency 3579545 Hz
can't fetch resources for \\_SB_.PCI0.LPC0.SIO_.LPT_ - AE_AML_INVALID_RESOURCE_TYPE
acpi_timer0: 24-bit timer at 3.579545MHz port 0x1008-0x100b on acpi0
acpi_cpu0: CPU on acpi0
acpi_cpu1: CPU on acpi0
pcib0: ACPI Host-PCI bridge port 0xcf8-0xcff on acpi0
pci0: ACPI PCI bus on pcib0
agp0: Intel Generic host to PCI bridge mem 0xf400-0xf7ff at device 0.0 on 
pci0
pci0: unknown at device 0.1 (no driver attached)
pcib1: ACPI PCI-PCI bridge mem 0xf800-0xfbff at device 1.0 on pci0
pci1: ACPI PCI bus on pcib1
pcib2: ACPI PCI-PCI bridge at device 2.0 on pci0
pcib2: could not get PCI interrupt routing table for \\_SB_.PCI0.HLB_ - AE_NOT_FOUND
pci2: ACPI PCI bus on pcib2
pci2: base peripheral, interrupt controller at device 28.0 (no driver attached)
pcib3: ACPI PCI-PCI bridge at device 29.0 on pci2
pci3: ACPI PCI bus on pcib3
pci2: base peripheral, interrupt controller at device 30.0 (no driver attached)
pcib4: ACPI PCI-PCI bridge at device 31.0 on pci2
pci4: ACPI PCI bus on pcib4
bge0: Broadcom BCM5702X Gigabit Ethernet, ASIC rev. 0x1002 mem 0xf020-0xf020 
irq 5 at device 4.0 on pci4
bge0: Ethernet address: 00:50:45:00:96:f7
miibus0: MII bus on bge0
brgphy0: BCM5703 10/100/1000baseTX PHY on miibus0
brgphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX-FDX, 
auto
uhci0: Intel 82801DB (ICH4) USB controller USB-A port 0x1400-0x141f irq 11 at device 
29.0 on pci0
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 0x1420-0x143f irq 10 at device 
29.1 on pci0
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 0x1440-0x145f irq 5 at device 
29.2 on pci0
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)
pcib5: ACPI PCI-PCI bridge at device 30.0 on pci0
pci5: ACPI PCI bus on pcib5
pci5: serial bus, FireWire at device 0.0 (no driver attached)
pci5: display, VGA at device 1.0 (no driver attached)
isab0: PCI-ISA bridge at device 31.0 on pci0
isa0: ISA bus on isab0
atapci0: Intel ICH4 UDMA100 controller port 0x1460-0x146f,0-0x3,0-0x7,0-0x3,0-0x7 at 
device 31.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
pci0: serial bus, SMBus at device 31.3 (no driver attached)
acpi_button0: Power Button on acpi0
fdc0: Enhanced floppy controller (i82077, NE72065 or clone) port 0x3f7,0x3f0-0x3f5 
irq 6 drq 2 on acpi0
fdc0: FIFO enabled, 8