Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PANIC] recent 7.2-STABLE when probing drm

10 views
Skip to first unread message

Guido Falsi

unread,
May 5, 2009, 7:07:22 AM5/5/09
to
Hi!

I'm using FreeBSD/i386 stable on a HP DC7800 PC.

It has an Intel Q35 graphic chip.

After upgrading to a recent stable I experienced a pani on boot, just
after probing drm.

I investigated a little and found out that reverting the file

src/sys/dev/pci/pci.c

to rev. 1.355.2.9 (SVN Rev 190092) solves the crash.

I could not investigatte urther right away, but some regression was
introduced with this rev.

Is any more information needed?

Thank you in advance for any help or information on this.

Here is the dmesg from the working kernel the other one panics just
after the line marked with [*]:

Copyright (c) 1992-2009 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 is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.2-STABLE #16: Tue May 5 12:32:40 CEST 2009
ro...@vwg82.hq.ignesti.it:/usr/obj/usr/src/sys/VWG82
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz (2327.51-MHz
686-class CPU)
Origin = "GenuineIntel" Id = 0x6fb Stepping = 11

Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,C
MOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>

Features2=0xe3fd<SSE3,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM>
AMD Features=0x20100000<NX,LM>
AMD Features2=0x1<LAHF>
Cores per package: 2
real memory = 3740987392 (3567 MB)
avail memory = 3661430784 (3491 MB)
ACPI APIC Table: <COMPAQ BEARLAKE>
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
cpu0 (BSP): APIC ID: 0
cpu1 (AP): APIC ID: 1
ioapic0: Changing APIC ID to 1
ioapic0 <Version 2.0> irqs 0-23 on motherboard
netsmb_dev: loaded
kbd1 at kbdmux0
acpi0: <HPQOEM SLIC-BPC> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
acpi0: reservation of 0, a0000 (3) failed
acpi0: reservation of 100000, dff00000 (3) failed
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0xf808-0xf80b on acpi0
acpi_hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on
acpi0
Timecounter "HPET" frequency 14318180 Hz quality 900
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0x1230-0x1237 mem
0xf0100000-0xf017ffff,0xe0000000-0xefffffff,0xf0000000-0xf00fffff irq 16
at device 2.0 on pci0
agp0: <Intel Q35 SVGA controller> on vgapci0
agp0: detected 6140k stolen memory
agp0: aperture size is 256M
drm0: <Intel Q35> on vgapci0 [*]
vgapci0: child drm0 requested pci_enable_busmaster
info: [drm] AGP at 0xe0000000 256MB
info: [drm] Initialized i915 1.6.0 20080730
pci0: <simple comms> at device 3.0 (no driver attached)
atapci0: <Intel ATA controller> port
0x1238-0x123f,0x1270-0x1273,0x1240-0x1247,0x1274-0x1277,0x11e0-0x11ef
irq 18 at device 3.2 on pci0
atapci0: [ITHREAD]
ata2: <ATA channel 0> on atapci0
ata2: [ITHREAD]
ata3: <ATA channel 1> on atapci0
ata3: [ITHREAD]
pci0: <simple comms, UART> at device 3.3 (no driver attached)
em0: <Intel(R) PRO/1000 Network Connection 6.9.6> port 0x1100-0x111f mem
0xf0180000-0xf019ffff,0xf01a5000-0xf01a5fff irq 19 at device 25.0 on
pci0
em0: Using MSI interrupt
em0: [FILTER]
em0: Ethernet address: 00:1e:0b:ab:e6:a7
uhci0: <UHCI (generic) USB controller> port 0x1120-0x113f irq 20 at
device 26.0 on pci0
uhci0: [GIANT-LOCKED]
uhci0: [ITHREAD]
usb0: <UHCI (generic) USB controller> on uhci0
usb0: USB revision 1.0
uhub0: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb0
uhub0: 2 ports with 2 removable, self powered
uhci1: <UHCI (generic) USB controller> port 0x1140-0x115f irq 21 at
device 26.1 on pci0
uhci1: [GIANT-LOCKED]
uhci1: [ITHREAD]
usb1: <UHCI (generic) USB controller> on uhci1
usb1: USB revision 1.0
uhub1: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb1
uhub1: 2 ports with 2 removable, self powered
uhci2: <UHCI (generic) USB controller> port 0x1160-0x117f irq 22 at
device 26.2 on pci0
uhci2: [GIANT-LOCKED]
uhci2: [ITHREAD]
usb2: <UHCI (generic) USB controller> on uhci2
usb2: USB revision 1.0
uhub2: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb2
uhub2: 2 ports with 2 removable, self powered
ehci0: <EHCI (generic) USB 2.0 controller> mem 0xf01a6000-0xf01a63ff irq
22 at device 26.7 on pci0
ehci0: [GIANT-LOCKED]
ehci0: [ITHREAD]
usb3: EHCI version 1.0
usb3: companion controllers, 2 ports each: usb0 usb1 usb2
usb3: <EHCI (generic) USB 2.0 controller> on ehci0
usb3: USB revision 2.0
uhub3: <Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb3
uhub3: 6 ports with 6 removable, self powered
hdac0: <Intel 82801I High Definition Audio Controller> mem
0xf01a0000-0xf01a3fff irq 21 at device 27.0 on pci0
hdac0: HDA Driver Revision: 20090329_0131
hdac0: [ITHREAD]
pcib1: <ACPI PCI-PCI bridge> at device 28.0 on pci0
pci32: <ACPI PCI bus> on pcib1
pcib2: <ACPI PCI-PCI bridge> irq 21 at device 28.1 on pci0
pci48: <ACPI PCI bus> on pcib2
uhci3: <UHCI (generic) USB controller> port 0x1180-0x119f irq 20 at
device 29.0 on pci0
uhci3: [GIANT-LOCKED]
uhci3: [ITHREAD]
usb4: <UHCI (generic) USB controller> on uhci3
usb4: USB revision 1.0
uhub4: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb4
uhub4: 2 ports with 2 removable, self powered
uhci4: <UHCI (generic) USB controller> port 0x11a0-0x11bf irq 21 at
device 29.1 on pci0
uhci4: [GIANT-LOCKED]
uhci4: [ITHREAD]
usb5: <UHCI (generic) USB controller> on uhci4
usb5: USB revision 1.0
uhub5: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb5
uhub5: 2 ports with 2 removable, self powered
ehci1: <EHCI (generic) USB 2.0 controller> mem 0xf01a6400-0xf01a67ff irq
20 at device 29.7 on pci0
ehci1: [GIANT-LOCKED]
ehci1: [ITHREAD]
usb6: EHCI version 1.0
usb6: companion controllers, 2 ports each: usb4 usb5
usb6: <EHCI (generic) USB 2.0 controller> on ehci1
usb6: USB revision 2.0
uhub6: <Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb6
uhub6: 4 ports with 4 removable, self powered
pcib3: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci7: <ACPI PCI bus> on pcib3
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci1: <Intel ICH9 SATA300 controller> port
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x11f0-0x11ff,0x1200-0x120f irq 18
at device 31.2 on pci0
ata0: <ATA channel 0> on atapci1
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci1
ata1: [ITHREAD]
atapci2: <Intel ICH9 SATA300 controller> port
0x1260-0x1267,0x1280-0x1283,0x1268-0x126f,0x1284-0x1287,0x1210-0x121f,0x1220-0x122f
irq 18 at device 31.5 on pci0
atapci2: [ITHREAD]
ata4: <ATA channel 0> on atapci2
ata4: [ITHREAD]
ata5: <ATA channel 1> on atapci2
ata5: [ITHREAD]
acpi_button0: <Power Button> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
sio0: <Standard PC COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
sio0: [FILTER]
cpu0: <ACPI CPU> on acpi0
est0: <Enhanced SpeedStep Frequency Control> on cpu0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
cpu1: <ACPI CPU> on acpi0
est1: <Enhanced SpeedStep Frequency Control> on cpu1
p4tcc1: <CPU Frequency Thermal Control> on cpu1
pmtimer0 on isa0
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/13 bytes threshold
ppbus0: <Parallel port bus> on ppc0
ppbus0: [ITHREAD]
plip0: <PLIP network interface> on ppbus0
plip0: WARNING: using obsoleted IFF_NEEDSGIANT flag
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
ppc0: [GIANT-LOCKED]
ppc0: [ITHREAD]
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on
isa0
ums0: <Logitech USB Gaming Mouse, class 0/0, rev 2.00/52.00, addr 2> on
uhub2
ums0: 16 buttons and Z dir.
uhid0: <Logitech USB Gaming Mouse, class 0/0, rev 2.00/52.00, addr 2> on
uhub2

--
Guido Falsi <m...@madpilot.net>
_______________________________________________
freebsd...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stabl...@freebsd.org"

Gavin Atkinson

unread,
May 5, 2009, 7:13:31 AM5/5/09
to
On Tue, 2009-05-05 at 13:06 +0200, Guido Falsi wrote:
> Hi!
>
> I'm using FreeBSD/i386 stable on a HP DC7800 PC.
>
> It has an Intel Q35 graphic chip.
>
> After upgrading to a recent stable I experienced a pani on boot, just
> after probing drm.
>
> I investigated a little and found out that reverting the file
>
> src/sys/dev/pci/pci.c
>
> to rev. 1.355.2.9 (SVN Rev 190092) solves the crash.
>
> I could not investigatte urther right away, but some regression was
> introduced with this rev.
>
> Is any more information needed?

When it panics, can you please type "bt" (assuming you have the debugger
compiled in) and show the output?

Gavin

Kostik Belousov

unread,
May 5, 2009, 8:14:50 AM5/5/09
to

--XBg9NAhDNArbJUtw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, May 05, 2009 at 12:12:31PM +0100, Gavin Atkinson wrote:
> On Tue, 2009-05-05 at 13:06 +0200, Guido Falsi wrote:
> > Hi!

> >=20


> > I'm using FreeBSD/i386 stable on a HP DC7800 PC.

> >=20


> > It has an Intel Q35 graphic chip.

> >=20


> > After upgrading to a recent stable I experienced a pani on boot, just
> > after probing drm.

> >=20


> > I investigated a little and found out that reverting the file

> >=20
> > src/sys/dev/pci/pci.c
> >=20


> > to rev. 1.355.2.9 (SVN Rev 190092) solves the crash.

> >=20


> > I could not investigatte urther right away, but some regression was
> > introduced with this rev.

> >=20


> > Is any more information needed?

>=20


> When it panics, can you please type "bt" (assuming you have the debugger
> compiled in) and show the output?

I have this too. I have dump too.

drm0: <Intel i945GM> on vgapci0
panic: resource_list_alloc: resource entry is busy
KDB: stack backtrace:
db_trace_self_wrapper(c07214ff,c2b46764,c04c928f,c071f823,c078b080,...) at =
0xc044df46 =3D db_trace_self_wrapper+0x26
kdb_backtrace(c071f823,c078b080,c07211b1,c2b46770,c2b46770,...) at 0xc04f41=
f9 =3D kdb_backtrace+0x29
panic(c07211b1,3,10,c04e9484,c2e37000,...) at 0xc04c928f =3D panic+0xaf
resource_list_alloc(c2cffb04,c2d00a80,c2d00c80,3,c2d2a1fc,...) at 0xc04f0c0=
6 =3D resource_list_alloc+0xd6
pci_alloc_resource(c2d00a80,c2d00c80,3,c2d2a1fc,0,ffffffff,1,4) at 0xc045a2=
d1 =3D pci_alloc_resource+0x581
bus_alloc_resource(c2d00c80,3,c2d2a1fc,0,ffffffff,...) at 0xc04f0a8c =3D bu=
s_alloc_resource+0x7c
vga_pci_alloc_resource(c2d00c80,c2cfa080,3,c2d2a1fc,0,ffffffff,1,4) at 0xc0=
4600ab =3D vga_pci_alloc_resource+0x3b
bus_alloc_resource(c2cfa080,3,c2d2a1fc,0,ffffffff,...) at 0xc04f0a8c =3D bu=
s_alloc_resource+0x7c
drm_alloc_resource(fffffff4,c2d2a000,c2b468fc,c36a0b9b,c2d2a000,...) at 0xc=
36b7726 =3D drm_alloc_resource+0xf6
drm_get_resource_start(c2d2a000,0,1,4,c04d2010,...) at 0xc36b780c =3D drm_g=
et_resource_start+0x1c
i915_driver_load(c2d2a000,6,c36bfe5c,1c2,ffffffff,...) at 0xc36a0b9b =3D i9=
15_driver_load+0x13b
drm_attach(c2cfa080,c36a59a0,102,c2d00c80,c2cfa0cc,...) at 0xc36bb0e1 =3D d=
rm_attach+0x4b1
i915_attach(c2cfa080,c32a9054,c0748368,c0721002,80000000,...) at 0xc36a0f41=
=3D i915_attach+0x111
device_attach(c2cfa080,c2cfa080,c2d00c80,c2cfa080,c2d00c80,...) at 0xc04ef7=
07 =3D device_attach+0x387
device_probe_and_attach(c2cfa080,c2d00c80,c0748358,c2d00c80,0,...) at 0xc04=
f0702 =3D device_probe_and_attach+0xe2
bus_generic_driver_added(c2d00c80,c36a5b7c,101,0,c36a5b68,...) at 0xc04f07d=
5 =3D bus_generic_driver_added+0x75
devclass_add_driver(c2ca4480,c36a5b7c,c2b46a2c,2d,c36a5b7c,...) at 0xc04ee4=
c8 =3D devclass_add_driver+0xc8
driver_module_handler(c2e420c0,0,c36a5b68,0,0,...) at 0xc04ef2a9 =3D driver=
_module_handler+0x79
module_register_init(c36a5b5c,c071dad9,c2b46c10,c2b46c0c,0,...) at 0xc04b9d=
25 =3D module_register_init+0x105
linker_load_module(0,c2b46c40,2,c2b46c58,c04b7b99,...) at 0xc04b2462 =3D li=
nker_load_module+0xa02
kern_kldload(c2e79af0,c2d12000,c2b46c70,0,0,...) at 0xc04b294c =3D kern_kld=
load+0xec
kldload(c2e79af0,c2b46cfc,4,c2b46d38,c2b46d2c,...) at 0xc04b2ae4 =3D kldloa=
d+0x74
syscall(c2b46d38) at 0xc06f6eb5 =3D syscall+0x3a5
Xint0x80_syscall() at 0xc06de760 =3D Xint0x80_syscall+0x20
--- syscall (304, FreeBSD ELF32, kldload), eip =3D 0x28566d57, esp =3D 0xbf=
bfe89c, ebp =3D 0xbfbfe8a8 ---

--XBg9NAhDNArbJUtw
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEARECAAYFAkoALT4ACgkQC3+MBN1Mb4jv4wCgyLfoS/IgZPoVbaIuAvJM4MGq
J+cAoMgXL3/vzRhSiFxBgiH00lZJk8LG
=PDXt
-----END PGP SIGNATURE-----

--XBg9NAhDNArbJUtw--

Gavin Atkinson

unread,
May 5, 2009, 8:36:17 AM5/5/09
to
On Tue, 2009-05-05 at 15:12 +0300, Kostik Belousov wrote:
> On Tue, May 05, 2009 at 12:12:31PM +0100, Gavin Atkinson wrote:
> > On Tue, 2009-05-05 at 13:06 +0200, Guido Falsi wrote:
> > > Hi!
> > >
> > > I'm using FreeBSD/i386 stable on a HP DC7800 PC.
> > >
> > > It has an Intel Q35 graphic chip.
> > >
> > > After upgrading to a recent stable I experienced a pani on boot, just
> > > after probing drm.
> > >
> > > I investigated a little and found out that reverting the file
> > >
> > > src/sys/dev/pci/pci.c

> > >
> > > to rev. 1.355.2.9 (SVN Rev 190092) solves the crash.
> > >
> > > I could not investigatte urther right away, but some regression was
> > > introduced with this rev.
> > >
> > > Is any more information needed?
> >
> > When it panics, can you please type "bt" (assuming you have the debugger
> > compiled in) and show the output?
>
> I have this too. I have dump too.
>
> drm0: <Intel i945GM> on vgapci0
> panic: resource_list_alloc: resource entry is busy
> KDB: stack backtrace:
> db_trace_self_wrapper(c07214ff,c2b46764,c04c928f,c071f823,c078b080,...) at 0xc044df46 = db_trace_self_wrapper+0x26
> kdb_backtrace(c071f823,c078b080,c07211b1,c2b46770,c2b46770,...) at 0xc04f41f9 = kdb_backtrace+0x29
> panic(c07211b1,3,10,c04e9484,c2e37000,...) at 0xc04c928f = panic+0xaf
> resource_list_alloc(c2cffb04,c2d00a80,c2d00c80,3,c2d2a1fc,...) at 0xc04f0c06 = resource_list_alloc+0xd6
> pci_alloc_resource(c2d00a80,c2d00c80,3,c2d2a1fc,0,ffffffff,1,4) at 0xc045a2d1 = pci_alloc_resource+0x581
> bus_alloc_resource(c2d00c80,3,c2d2a1fc,0,ffffffff,...) at 0xc04f0a8c = bus_alloc_resource+0x7c
> vga_pci_alloc_resource(c2d00c80,c2cfa080,3,c2d2a1fc,0,ffffffff,1,4) at 0xc04600ab = vga_pci_alloc_resource+0x3b
[...]

I wonder if r189373 also needs merging?

Guido Falsi

unread,
May 5, 2009, 9:16:54 AM5/5/09
to
On Tue, May 05, 2009 at 12:12:31PM +0100, Gavin Atkinson wrote:
> > Is any more information needed?
>
> When it panics, can you please type "bt" (assuming you have the debugger
> compiled in) and show the output?

I did not have a kernel with debugger handy.

Here you go (copying by hand...):

drm0: <Intel Q35> on vgapci0
panic: resource_list_alloc: resource entry busy
cpuid = 0
KDB: enter: panic
[thread pid 0 tid 0 ]
Stopped at kdb_enter_why+0x3a: movl $0,kdb_why
db> bt
kdb_enter_why(c07d0374,c07d0374,c07d2cf1,c0c20760,0,...) at kdb_enter_why+0x3a
panic(c07d2cf1,3,10,c086a7b4,c0c20788,...) at panic+0x131
resource_list_alloc(c6d56604,c6d88a80,c6d88a80,3,c6d79dfc,...) at resource_list_alloc+0xee
pci_alloc_resource(c6d88a80,c6d88a80,3,c6d79dfc,0,ffffffff,1,4) at pci_alloc_resource+0x554
bus_alloc_resource(c6d88a80,3,c6d79dfc,0,ffffffff,...) at bus_alloc_resource+0x7e
vga_pci_alloc_resource(c6d88a80,c6d81d80,3,c6d79dfc,0,ffffffff,1,4) at vga_pci_alloc_resource+0x3b
bus_alloc_resource(c6d88a80,3,c6d79dfc,0,ffffffff,...) at bus_alloc_resource+0x7e
drm_alloc_resource(c6d88b80,c6d88b80,c6d79c00,c0c208fc,c04a6946,...) at drm_alloc_resource+0xea
drm_get_resource_start(c6d79c00,0,1,8,c07b652b,...) at drm_get_resource_start0x17
i915_driver_load(c6d79c00,6,c07b652b,1c2,ffffffff,...) at i915_driver_load+0x139
drm_attach(c6d81d80,c08078a0,102) at drm_attach+0x604
i915_attach(c6d81d80,c6d0f858,c0818470,c07d2b42,80000000,...) at i915_attach+0x10a
device_attach(c6d81d80,c6d81d80,c07d2aa0,932,c6d81d80,...) at device+attach+0x36a
device_probe_and_attach(c6d81d80,c6d88b80,c0c209f4,c04dc7f8,c6d88b80,...) at device_probe_and_attach+0xfd
bus_generic_attach(...) at bus_generic_attach+0x19
vga_pci_attach(...) at vga_pci_attach+0x32
device_attach(...) at device_attach+0x36a
device_probe_and_attach(...) at device_probe_and_attach+0xfd
bus_generic_attach(...) at bus_generic_attach+0x19
acpi_pci_attach(...) at acpi_pci_attach+0x171
device_attach(...) at device_attach+0x36a
device_probe_and_attach(...) at device_probe_and_attach+0xfd
bus_generic_attach(...) at bus_generic_attach+0x19
acpi_pcib_attach(...) at acpi_pcib_attach+0x18e
acpi_pcib_acpi_attach(...) at acpi_pcib_acpi_attach+0x1ad
device_attach(...) at device_attach+0x36a
device_probe_and_attach(...) at device_probe_and_attach+0xfd
bus_generic_attach(...) at bus_generic_attach+0x19
acpi_pci_attach(...) at acpi_pci_attach+0x171
device_attach(...) at device_attach+0x36a
device_probe_and_attach(...) at device_probe_and_attach+0xfd
bus_generic_attach(...) at bus_generic_attach+0x19
nexus_attach(...) at nexus_attach+0x1a
device_attach(...) at device_attach+0x36a
device_probe_and_attach(...) at device_probe_and_attach+0xfd
root_bus_configure(...) at root_bus_configure+0x1b
configure(...) at configure0xc
mi_startup() at mi_startup+0x90
begin() at begin+0x2c

(I cut some parameters, hope they were not important)

Contact me as you wish if any other information or tests are needed.

--
Guido Falsi <m...@madpilot.net>

Gavin Atkinson

unread,
May 5, 2009, 9:52:20 AM5/5/09
to
On Tue, 2009-05-05 at 13:35 +0100, Gavin Atkinson wrote:
> On Tue, 2009-05-05 at 15:12 +0300, Kostik Belousov wrote:
> > On Tue, May 05, 2009 at 12:12:31PM +0100, Gavin Atkinson wrote:
> > > On Tue, 2009-05-05 at 13:06 +0200, Guido Falsi wrote:
> > > > Hi!
> > > >
> > > > I'm using FreeBSD/i386 stable on a HP DC7800 PC.
> > > >
> > > > It has an Intel Q35 graphic chip.
> > > >
> > > > After upgrading to a recent stable I experienced a pani on boot, just
> > > > after probing drm.
> > > >
> > > > I investigated a little and found out that reverting the file
> > > >
> > > > src/sys/dev/pci/pci.c
> > > >
> > > > to rev. 1.355.2.9 (SVN Rev 190092) solves the crash.
> > > >
> > > > I could not investigatte urther right away, but some regression was
> > > > introduced with this rev.
> > > >
> > > > Is any more information needed?
> > >
> > > When it panics, can you please type "bt" (assuming you have the debugger
> > > compiled in) and show the output?
> >
> > I have this too. I have dump too.
> >
> > drm0: <Intel i945GM> on vgapci0
> > panic: resource_list_alloc: resource entry is busy
> > KDB: stack backtrace:
> > db_trace_self_wrapper(c07214ff,c2b46764,c04c928f,c071f823,c078b080,...) at 0xc044df46 = db_trace_self_wrapper+0x26
> > kdb_backtrace(c071f823,c078b080,c07211b1,c2b46770,c2b46770,...) at 0xc04f41f9 = kdb_backtrace+0x29
> > panic(c07211b1,3,10,c04e9484,c2e37000,...) at 0xc04c928f = panic+0xaf
> > resource_list_alloc(c2cffb04,c2d00a80,c2d00c80,3,c2d2a1fc,...) at 0xc04f0c06 = resource_list_alloc+0xd6
> > pci_alloc_resource(c2d00a80,c2d00c80,3,c2d2a1fc,0,ffffffff,1,4) at 0xc045a2d1 = pci_alloc_resource+0x581
> > bus_alloc_resource(c2d00c80,3,c2d2a1fc,0,ffffffff,...) at 0xc04f0a8c = bus_alloc_resource+0x7c
> > vga_pci_alloc_resource(c2d00c80,c2cfa080,3,c2d2a1fc,0,ffffffff,1,4) at 0xc04600ab = vga_pci_alloc_resource+0x3b
> [...]
>
> I wonder if r189373 also needs merging?

Looking at a thread on -current, it looks like this is probably the
case. It's not a straight merge from head as other bits have changed,
but you could test http://people.freebsd.org/~gavin/189373_7.diff
(warning: compile tested only)

Gavin

Kostik Belousov

unread,
May 5, 2009, 9:56:53 AM5/5/09
to

--f0PSjARDFl/vfYT5

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, May 05, 2009 at 01:35:27PM +0100, Gavin Atkinson wrote:
> On Tue, 2009-05-05 at 15:12 +0300, Kostik Belousov wrote:
> > On Tue, May 05, 2009 at 12:12:31PM +0100, Gavin Atkinson wrote:
> > > On Tue, 2009-05-05 at 13:06 +0200, Guido Falsi wrote:
> > > > Hi!

> > > >=20


> > > > I'm using FreeBSD/i386 stable on a HP DC7800 PC.

> > > >=20


> > > > It has an Intel Q35 graphic chip.

> > > >=20
> > > > After upgrading to a recent stable I experienced a pani on boot, ju=
st
> > > > after probing drm.
> > > >=20


> > > > I investigated a little and found out that reverting the file

> > > >=20
> > > > src/sys/dev/pci/pci.c
> > > >=20


> > > > to rev. 1.355.2.9 (SVN Rev 190092) solves the crash.

> > > >=20


> > > > I could not investigatte urther right away, but some regression was
> > > > introduced with this rev.

> > > >=20


> > > > Is any more information needed?

> > >=20
> > > When it panics, can you please type "bt" (assuming you have the debug=


ger
> > > compiled in) and show the output?

> >=20


> > I have this too. I have dump too.

> >=20


> > drm0: <Intel i945GM> on vgapci0
> > panic: resource_list_alloc: resource entry is busy
> > KDB: stack backtrace:

> > db_trace_self_wrapper(c07214ff,c2b46764,c04c928f,c071f823,c078b080,...)=
at 0xc044df46 =3D db_trace_self_wrapper+0x26
> > kdb_backtrace(c071f823,c078b080,c07211b1,c2b46770,c2b46770,...) at 0xc0=
4f41f9 =3D kdb_backtrace+0x29


> > panic(c07211b1,3,10,c04e9484,c2e37000,...) at 0xc04c928f =3D panic+0xaf

> > resource_list_alloc(c2cffb04,c2d00a80,c2d00c80,3,c2d2a1fc,...) at 0xc04=
f0c06 =3D resource_list_alloc+0xd6
> > pci_alloc_resource(c2d00a80,c2d00c80,3,c2d2a1fc,0,ffffffff,1,4) at 0xc0=
45a2d1 =3D pci_alloc_resource+0x581
> > bus_alloc_resource(c2d00c80,3,c2d2a1fc,0,ffffffff,...) at 0xc04f0a8c =
=3D bus_alloc_resource+0x7c
> > vga_pci_alloc_resource(c2d00c80,c2cfa080,3,c2d2a1fc,0,ffffffff,1,4) at =
0xc04600ab =3D vga_pci_alloc_resource+0x3b
> [...]
>=20


> I wonder if r189373 also needs merging?

Thanks for the hint. We need both r183095 and r189373, but the
actual bugfix is r189373, as you rightly pointed out. Below is the patch
that works for me.

Index: dev/pci/vga_pci.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- dev/pci/vga_pci.c (revision 191816)
+++ dev/pci/vga_pci.c (working copy)
@@ -42,10 +42,22 @@
#include <sys/bus.h>
#include <sys/kernel.h>
#include <sys/module.h>
+#include <sys/rman.h>
+#include <sys/systm.h>
=20
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
=20
+struct vga_resource {
+ struct resource *vr_res;
+ int vr_refs;
+};
+
+struct vga_pci_softc {
+ device_t vga_msi_child; /* Child driver using MSI. */
+ struct vga_resource vga_res[PCIR_MAX_BAR_0 + 1];
+};
+
static int
vga_pci_probe(device_t dev)
{
@@ -110,7 +122,27 @@
vga_pci_alloc_resource(device_t dev, device_t child, int type, int *rid,
u_long start, u_long end, u_long count, u_int flags)
{
+ struct vga_pci_softc *sc;
+ int bar;
=20
+ switch (type) {
+ case SYS_RES_MEMORY:
+ case SYS_RES_IOPORT:
+ /*
+ * For BARs, we cache the resource so that we only allocate it
+ * from the PCI bus once.
+ */
+ bar =3D PCI_RID2BAR(*rid);
+ if (bar < 0 || bar > PCIR_MAX_BAR_0)
+ return (NULL);
+ sc =3D device_get_softc(dev);
+ if (sc->vga_res[bar].vr_res =3D=3D NULL)
+ sc->vga_res[bar].vr_res =3D bus_alloc_resource(dev, type,
+ rid, start, end, count, flags);
+ if (sc->vga_res[bar].vr_res !=3D NULL)
+ sc->vga_res[bar].vr_refs++;
+ return (sc->vga_res[bar].vr_res);
+ }
return (bus_alloc_resource(dev, type, rid, start, end, count, flags));
}
=20
@@ -118,7 +150,38 @@
vga_pci_release_resource(device_t dev, device_t child, int type, int rid,
struct resource *r)
{
+ struct vga_pci_softc *sc;
+ int bar, error;
=20
+ switch (type) {
+ case SYS_RES_MEMORY:
+ case SYS_RES_IOPORT:
+ /*
+ * For BARs, we release the resource from the PCI bus
+ * when the last child reference goes away.
+ */
+ bar =3D PCI_RID2BAR(rid);
+ if (bar < 0 || bar > PCIR_MAX_BAR_0)
+ return (EINVAL);
+ sc =3D device_get_softc(dev);
+ if (sc->vga_res[bar].vr_res =3D=3D NULL)
+ return (EINVAL);
+ KASSERT(sc->vga_res[bar].vr_res =3D=3D r,
+ ("vga_pci resource mismatch"));
+ if (sc->vga_res[bar].vr_refs > 1) {
+ sc->vga_res[bar].vr_refs--;
+ return (0);
+ }
+ KASSERT(sc->vga_res[bar].vr_refs > 0,
+ ("vga_pci resource reference count underflow"));
+ error =3D bus_release_resource(dev, type, rid, r);
+ if (error =3D=3D 0) {
+ sc->vga_res[bar].vr_res =3D NULL;
+ sc->vga_res[bar].vr_refs =3D 0;
+ }
+ return (error);
+ }
+
return (bus_release_resource(dev, type, rid, r));
}
=20
@@ -176,6 +239,21 @@
}
=20
static int
+vga_pci_get_vpd_ident(device_t dev, device_t child, const char **identptr)
+{
+
+ return (pci_get_vpd_ident(dev, identptr));
+}
+
+static int
+vga_pci_get_vpd_readonly(device_t dev, device_t child, const char *kw,
+ const char **vptr)
+{
+
+ return (pci_get_vpd_readonly(dev, kw, vptr));
+}
+
+static int
vga_pci_set_powerstate(device_t dev, device_t child, int state)
{
=20
@@ -210,6 +288,77 @@
return (pci_find_extcap(dev, capability, capreg));
}
=20
+static int
+vga_pci_alloc_msi(device_t dev, device_t child, int *count)
+{
+ struct vga_pci_softc *sc;
+ int error;
+
+ sc =3D device_get_softc(dev);
+ if (sc->vga_msi_child !=3D NULL)
+ return (EBUSY);
+ error =3D pci_alloc_msi(dev, count);
+ if (error =3D=3D 0)
+ sc->vga_msi_child =3D child;
+ return (error);
+}
+
+static int
+vga_pci_alloc_msix(device_t dev, device_t child, int *count)
+{
+ struct vga_pci_softc *sc;
+ int error;
+
+ sc =3D device_get_softc(dev);
+ if (sc->vga_msi_child !=3D NULL)
+ return (EBUSY);
+ error =3D pci_alloc_msix(dev, count);
+ if (error =3D=3D 0)
+ sc->vga_msi_child =3D child;
+ return (error);
+}
+
+static int
+vga_pci_remap_msix(device_t dev, device_t child, int count,
+ const u_int *vectors)
+{
+ struct vga_pci_softc *sc;
+
+ sc =3D device_get_softc(dev);
+ if (sc->vga_msi_child !=3D child)
+ return (ENXIO);
+ return (pci_remap_msix(dev, count, vectors));
+}
+
+static int
+vga_pci_release_msi(device_t dev, device_t child)
+{
+ struct vga_pci_softc *sc;
+ int error;
+
+ sc =3D device_get_softc(dev);
+ if (sc->vga_msi_child !=3D child)
+ return (ENXIO);
+ error =3D pci_release_msi(dev);
+ if (error =3D=3D 0)
+ sc->vga_msi_child =3D NULL;
+ return (error);
+}
+
+static int
+vga_pci_msi_count(device_t dev, device_t child)
+{
+
+ return (pci_msi_count(dev));
+}
+
+static int
+vga_pci_msix_count(device_t dev, device_t child)
+{
+
+ return (pci_msix_count(dev));
+}
+
static device_method_t vga_pci_methods[] =3D {
/* Device interface */
DEVMETHOD(device_probe, vga_pci_probe),
@@ -236,10 +385,18 @@
DEVMETHOD(pci_disable_busmaster, vga_pci_disable_busmaster),
DEVMETHOD(pci_enable_io, vga_pci_enable_io),
DEVMETHOD(pci_disable_io, vga_pci_disable_io),
+ DEVMETHOD(pci_get_vpd_ident, vga_pci_get_vpd_ident),
+ DEVMETHOD(pci_get_vpd_readonly, vga_pci_get_vpd_readonly),
DEVMETHOD(pci_get_powerstate, vga_pci_get_powerstate),
DEVMETHOD(pci_set_powerstate, vga_pci_set_powerstate),
DEVMETHOD(pci_assign_interrupt, vga_pci_assign_interrupt),
DEVMETHOD(pci_find_extcap, vga_pci_find_extcap),
+ DEVMETHOD(pci_alloc_msi, vga_pci_alloc_msi),
+ DEVMETHOD(pci_alloc_msix, vga_pci_alloc_msix),
+ DEVMETHOD(pci_remap_msix, vga_pci_remap_msix),
+ DEVMETHOD(pci_release_msi, vga_pci_release_msi),
+ DEVMETHOD(pci_msi_count, vga_pci_msi_count),
+ DEVMETHOD(pci_msix_count, vga_pci_msix_count),
=20
{ 0, 0 }
};
@@ -247,7 +404,7 @@
static driver_t vga_pci_driver =3D {
"vgapci",
vga_pci_methods,
- 1,
+ sizeof(struct vga_pci_softc),
};
=20
static devclass_t vga_devclass;

--f0PSjARDFl/vfYT5
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEARECAAYFAkoARXIACgkQC3+MBN1Mb4hGdgCg4cQHGq+ELgmVnhAv4DjmVaO/
kxYAn0g4ylHxrZPIlBmScl8Q8tKzxw7z
=g7aU
-----END PGP SIGNATURE-----

--f0PSjARDFl/vfYT5--

Jimmie James

unread,
May 5, 2009, 9:59:39 AM5/5/09
to
On Tue, 2009-05-05 at 13:06 +0200, Guido Falsi wrote:
> Hi!
>
> I'm using FreeBSD/i386 stable on a HP DC7800 PC.
>
> It has an Intel Q35 graphic chip.
>
> After upgrading to a recent stable I experienced a pani on boot, just
> after probing drm.

>
> I investigated a little and found out that reverting the file
>
> src/sys/dev/pci/pci.c

>
> to rev. 1.355.2.9 (SVN Rev 190092) solves the crash.
>
> I could not investigatte urther right away, but some regression was
> introduced with this rev.
>
> Is any more information needed?

I want to add a "me too". I can't compile in a debugger as my sources
are updated to 7.2, and any kernel built panics with the same message.
I did find this on the CURRENT mailing list, but it wont apply cleanly:
http://www.mailinglistarchive.com/freebsd...@freebsd.org/msg26975.html


vgapci0@pci0:0:2:0: class=0x030000 card=0x25821043 chip=0x25828086
rev=0x04 hdr=0x00
vendor = 'Intel Corporation'
device = '82915G/GV/GL, 82910GL Integrated Graphics Device'
class = display
subclass = VGA
vgapci1@pci0:0:2:1: class=0x038000 card=0x25821043 chip=0x27828086
rev=0x04 hdr=0x00
vendor = 'Intel Corporation'
device = '82915G Graphics device: 82915G/GV/910GL Express
Chipset Family'
class = display

From a 7.2-PRERELEASE kernel.

vgapci0: <VGA-compatible display> port 0x6800-0x6807 mem
0xcfd80000-0xcfdfffff,0xd0000000-0xdfffffff,0xcfe80000-0xcfebffff at
device 2.0 on pci0
agp0: <Intel 82915G (915G GMCH) SVGA controller> on vgapci0
drm0: <Intel i915G> on vgapci0


vgapci0: child drm0 requested pci_enable_busmaster

vgapci1: <VGA-compatible display> mem 0xcfe00000-0xcfe7ffff at device
2.1 on pci0


vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0

drm0: <Intel i915G> on vgapci0


vgapci0: child drm0 requested pci_enable_busmaster

info: [drm] AGP at 0xd0000000 256MB


info: [drm] Initialized i915 1.6.0 20080730

drm0: [ITHREAD]
drm0: [ITHREAD]

--
Over the years I've come to regard you as people I've met.

Guido Falsi

unread,
May 5, 2009, 10:13:39 AM5/5/09
to
On Tue, May 05, 2009 at 02:51:16PM +0100, Gavin Atkinson wrote:
> On Tue, 2009-05-05 at 13:35 +0100, Gavin Atkinson wrote:
> > [...]

> >
> > I wonder if r189373 also needs merging?
>
> Looking at a thread on -current, it looks like this is probably the
> case. It's not a straight merge from head as other bits have changed,
> but you could test http://people.freebsd.org/~gavin/189373_7.diff
> (warning: compile tested only)

Tested the patch, it solves the problem. The system now boots cleanly.

Im using the PC as normal with no ill effects with this new kernel.

--
Guido Falsi <m...@madpilot.net>

Robert Noland

unread,
May 5, 2009, 1:50:18 PM5/5/09
to

--=-PI4EXWfZF4wvDUhYAaEh
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Tue, 2009-05-05 at 13:35 +0100, Gavin Atkinson wrote:

> On Tue, 2009-05-05 at 15:12 +0300, Kostik Belousov wrote:

> > On Tue, May 05, 2009 at 12:12:31PM +0100, Gavin Atkinson wrote:
> > > On Tue, 2009-05-05 at 13:06 +0200, Guido Falsi wrote:
> > > > Hi!

> > > >=20


> > > > I'm using FreeBSD/i386 stable on a HP DC7800 PC.

> > > >=20


> > > > It has an Intel Q35 graphic chip.

> > > >=20
> > > > After upgrading to a recent stable I experienced a pani on boot, ju=
st
> > > > after probing drm.
> > > >=20

> > > > I investigated a little and found out that reverting the file

> > > >=20
> > > > src/sys/dev/pci/pci.c
> > > >=20


> > > > to rev. 1.355.2.9 (SVN Rev 190092) solves the crash.

> > > >=20


> > > > I could not investigatte urther right away, but some regression was
> > > > introduced with this rev.

> > > >=20


> > > > Is any more information needed?

> I wonder if r189373 also needs merging?

Yes, that looks right, resources are owned by both agp and drm on Intel.

robert.

>=20
> Gavin


> _______________________________________________
> freebsd...@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stabl...@freebsd.org"

--=20
Robert Noland <rno...@FreeBSD.org>
FreeBSD

--=-PI4EXWfZF4wvDUhYAaEh
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (FreeBSD)

iEYEABECAAYFAkoAe+kACgkQM4TrQ4qfROP2CACaAp5TfqbQHGTEsMyEyixzT8tT
xLcAnRQqsawYE/z7AuU8ahKPC7AEjNJt
=glmd
-----END PGP SIGNATURE-----

--=-PI4EXWfZF4wvDUhYAaEh--

John Baldwin

unread,
May 5, 2009, 4:26:16 PM5/5/09
to
Kostik Belousov wrote:
> On Tue, May 05, 2009 at 12:12:31PM +0100, Gavin Atkinson wrote:
>> On Tue, 2009-05-05 at 13:06 +0200, Guido Falsi wrote:
>>> Hi!
>>>
>>> I'm using FreeBSD/i386 stable on a HP DC7800 PC.
>>>
>>> It has an Intel Q35 graphic chip.
>>>
>>> After upgrading to a recent stable I experienced a pani on boot, just
>>> after probing drm.

>>>
>>> I investigated a little and found out that reverting the file
>>>
>>> src/sys/dev/pci/pci.c

>>>
>>> to rev. 1.355.2.9 (SVN Rev 190092) solves the crash.
>>>
>>> I could not investigatte urther right away, but some regression was
>>> introduced with this rev.
>>>
>>> Is any more information needed?
>> When it panics, can you please type "bt" (assuming you have the debugger

>> compiled in) and show the output?
>
> I have this too. I have dump too.

Sorry about that. I merged the fixes to vgapci this morning so this
should be fixed now.

--
John Baldwin

0 new messages