Re: Stack panic with em driver unload

2007-04-06 Thread Tai-hwa Liang

On Thu, 5 Apr 2007, Jack Vogel wrote:

Our test group uses a script that does 100 iterations of
a module load, then bring up all interfaces, and then
unload driver.

Depending on the system in anything from just a few
iterations to 20 or more, the system will panic.


  Just a me too here. :p


Its doing an em_detach() which calls ether_ifdetach()
which goes to if_detach, in_delmulti_ifp, in_delmulti_locked,
and finally if_delmulti().

The panic is always happening on a cmpxchgq instruction
so I assume its the LOCK macro, whats odd is that its
not always the same reason, sometimes one register is
0 so its a page fault trap, but on other iterations its a
general protection fault because the register is some
big invalid number :)


  I run into this panic regularly.  Apparently the result and condition
to trigger the panic are the same as yours: running while true; do
ifconfig xxx up; kldunload if_xxx; done and ending up with panicking
at the cmpxchgq instruction.


I am hardpressed to see this as a driver problem, but
I'm willing to be proven wrong, does someone who
knows the stack code better than me have any insights
or ideas?

It also appears system dependent, I have a couple
machines I've tried to reproduce in on and have been
unable. I also am told it happens on both amd64 and
i386, but it seems easier to reproduce on the former.


  Dunno about amd64 since I only have i386 around; however, I'm sure
the panic I observed is reproducible on my -CURRENT driver development box.


Lastly, from evidence so far I think this doesnt happen
on CURRENT, but the test group hasnt checked that
only I have and I dont have as much hardware :)


  FWIW, I usually run into this panic after upgrading to a newer HEAD.
Sometimes I can make the aforementioned ifconfig/kldunload script to
survive longer by doing a clean rebuild on my driver.

--
Cheers,

Tai-hwa Liang
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


4.2-RELEASE ata0-master probe failed(solved)

2000-11-26 Thread Tai-hwa Liang
evice configuration finished.
bpf: lo0 attached
ata0-master: success setting UDMA2 on PIIX4 chip
Creating DISK ad0
Creating DISK wd0
ad0: HITACHI_DK237A-32/00U0A0D0 ATA-3 disk at ata0-master
ad0: 3102MB (6354432 sectors), 6304 cyls, 16 heads, 63 S/T, 512 B/S
ad0: 16 secs/int, 1 depth queue, UDMA33
ad0: piomode=4 dmamode=2 udmamode=2 cblid=0
ad0: 3102MB HITACHI_DK237A-32 [6304/16/63] at ata0-master UDMA33
ata0-slave: piomode=4 dmamode=2 udmamode=-1 dmaflag=1
ata0-slave: success setting PIO4 on generic chip
acd0: UJDA150/1.50 CDROM drive at ata0 as slave
acd0: read 4134KB/s (4134KB/s), 128KB buffer, PIO4
acd0: Reads: CD-R, CD-RW, CD-DA
acd0: Audio: play, 256 volume levels
acd0: Mechanism: ejectable tray
acd0: Medium: CD-ROM 120mm photo disc loaded, unlocked
Mounting root from ufs:ad0s2a
ad0s1: type 0x83, start 63, end = 2096639, size 2096577 : OK
ad0s2: type 0xa5, start 2096640, end = 4193279, size 2096640 : OK
ad0s3: type 0x6, start 4193280, end = 6072191, size 1878912 : OK
ad0s4: type 0xa0, start 6072192, end = 6346367, size 274176 : OK
start_init: trying /sbin/init
splash: image decoder found: blank_saver
Linux-ELF exec handler installed


The original 4.2-RELEASE ata-related booting message:

atapci0: Intel PIIX4 ATA33 controller port 0xfcd0-0xfcdf at device 3.1 on pci0
ata0: iobase=0x01f0 altiobase=0x03f6 bmaddr=0xfcd0
ata0: mask=03 status0=50 status1=50
ata0: mask=03 ostat0=50 ostat2=50
ata0-master: ATAPI probe a=00 b=00
ata0-slave: ATAPI probe a=14 b=eb
ata0: mask=03 status0=50 status1=00
ata0-master: ATAPI probe a=01 b=a5
ata0: devices=09
ata0: at 0x1f0 irq 14 on atapci0
ata1: iobase=0x0170 altiobase=0x0376 bmaddr=0xfcd8
ata1: mask=00 status0=ff status1=ff
ata1: probe allocation failed
.
.
.
ata0-master: ata_comand: timeout waiting for intr
ata0-master: identify failed
ata0-slave: piomode=4 dmamode=2 udmamode=-1 dmaflag=1
ata0-slave: success setting WDMA2 on PIIX4 chip
acd0: UJDA150/1.50 CDROM drive at ata0 as slave
acd0: read 4134KB/s (4134KB/s), 128KB buffer, WDMA2
acd0: Reads: CD-R, CD-RW, CD-DA
acd0: Audio: play, 256 volume levels
acd0: Mechanism: ejectable tray
acd0: Medium: CD-ROM 120mm photo disc loaded, unlocked
no devsw (majdev=30 bootdev=0xa0300001e)
Mount root from ufs:ad0s2a
no such device 'ad'
setrootbyname failed
ffs_mountroot: can't find rootvp
Root mount failed: 6
.
.
.

-- 
Regards,

Tai-hwa Liang [EMAIL PROTECTED]
Multimedia Laboratory, Dept. of Computer Science  Engineering
Yuan Ze University
Taiwan, Republic of China



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message