# Kernel Panic, hard freeze (ndiswrapper)

## ksool

My computer's been freezing hard every now and again, and I couldn't figure out why, until I ran an emerge -e world in the console. The output is below. Useful info, I'm using distcc, a shared portage over shfs, and ndiswrapper for my wireless. Also, I'm using gentoo-sources-2.6.18-r2 on i686.

Any help deciphering this mess would be great

(hand typed so forgive me if I screw up)

```

------------[ cut here ]-------------

invalid opcode: 0000 [#1]

Modules lined in: radeon drm ndiswrapper shfs sha1 arc4 ppp-mppe ppp-generic CPU:    0

CPU:      0

EIP:       0060:[<c014c0ab>]      Tainted: P      VL

EIP is at kmem_cache_free+0x36/0x6d

esi: c9f4d0c0     edi: c0c8289c    ebp:    d09b002c    esp: c91f3f18

ds: 007b    es: 007b    ss: 0068

Proces ssh (pid: 9101, ti=c91f2000 task=d7c61550 task.ti=c91f2000)

Stack: c9f4d10b c94fd0c0 c9f4d0c0 d98fa2b6 d10fe400 d09b0000 d98efb7d d09b2288

         d09b0000 d9940918 d10fe800 c9f4d0c0 00000000 d09b2290 d98f132b c91f3f6c

          d9940c55 0000000a d236ce8c d10fe400 011f2000 00000000 d98ef114 d09b2288

Call Trace:

[<d98fa2b6>] free_tx_packet+0x36/0x3f [ndiswrapper]

[<d98efb7d>] NdisMSendComplete+0x24/0x8d [ndiswrapper]

[<d98f132d>] NdisAcquireSpinLock+0x0/0x59 [ndiswrapper]

[<d98ef114>] ndis_irq_handler+0x3a/0x5d [ndiswrapper]

[<c0120d60>] tasklet_action+0x55/0xaf

[<c0120974>] __do_softirq+0x5a/0xbb

[<c0120a0b>] do_softirq+0x36/0x3a

[<c0103602>] do_IRQ+0x48/0x52

[<c0103602>] common_interupt+0x1a/0x20

Code: 00 40 c1 ea 0c c1 e2 05 03 15 9c cb 4f c0 8b 02 f6 c4 40 74 03 8b 52 0c 8b 02 84 c0 78 08 0f 0b 53 02 a7 5e 3c c0 39 4a 18 74 08 <0f> 0b 6a 0d a7 5e 3c c0 9c 5e fa 89 e0 25 00 e0 ff ff 8b 40 10

EIP: [<c014c0ab>] kmem_cache_free+0x36/0x6d SS:ESP 0068:c91f318

mv -f .deps/fbtile.Tpo .deps/fbtile.Plo

<0>Kernel panic - not syncing: Fatal exception in interrupt

```

Last edited by ksool on Tue Jan 23, 2007 5:20 pm; edited 1 time in total

----------

## blu3bird

Blame ndiswrapper!

Did you try other versions of ndiswrapper? If there is a native driver for your wireless you should use it.

----------

## NeddySeagoon

krs1ars,

Your call trace shows that ndiswrapper and the Windows drivers are both implicated in the issue.

If your kernel is built with 4kstacks, go back to 8kstacks as some Windows wireless drivers won't work with 4kstacks.

----------

## ksool

I do think my kernel is built with 4kstacks, but thats only b/c I googled 4kstacks and saw an article about how the devs switched from 8k to 4kstacks in kernel 2.6.

Thanks for the input, but can anybody explain to me exactly what this is? And maybe where to find it in menuconfig? I would take a guess, but I dont want to sound like an idiot.

----------

## NeddySeagoon

krs1ars,

Get into make menuconfig, press / for search and type stack

----------

## ksool

Just took a look and it looks like 4kb stacks are disabled (so its using 8kb), any other ideas what it could be?

I'll try rebuilding the ndiswrapper module

----------

## NeddySeagoon

krs1ars,

It might be the windows driver.

As as already been said, try other versions of ndiswrapper and look for native drivers for your wireless

----------

## ksool

Correction: I had though I had 4k stacks disabled b/c I didn't see it in my .config, and in menuconfig when I added kernel debugging, it was unchecked. However, when I tried to re-emerge ndiswrapper, it threw a warning about 4kstacks. I re-compiled my kernel with kernel debugging in an attempt to force 8k stacks, and it looks like that may have worked. Will give an update if it still causes crashes.

----------

## ksool

Update.... still crashing.

Even with kernel debugging enabled (which I had hoped would force 8k stacks) ndiswrapper still locks up my kernel when under substantial network load.

I gave the bcm43xx kernel driver a try, but didn't get very far (couldn't authenticate with WPA). I'd like to stay with ndiswrapper (until the native driver stabilizes a bit further), but this kernel lock up has got to go.

Any other ideas?

----------

## NeddySeagoon

krs1ars,

kernel debugging is a menu, it does nothing on its own. What does 

```
grep STACKS /usr/src/linux/.config
```

return for you ?

----------

## ksool

The reason I though enabling kernel debugging (or whatever the main option under that menu is) would help is that only with that enabled did the option to choose 4k stacks show (it was unchecked). 

grep STACKS /usr/src/linux/.config shows nothing.

----------

## NeddySeagoon

krs1ars,

Thats ok if the file /usr/src/linux/.config exists. It means that 4kstacks are off.

If /usr/src/linux/.config is missing, it tells that you have a kernel update waiting for you and the /usr/src/linux symlink has been updated to point to it.

You need to run 

```
grep STACK
```

in the kernel try for your running kernel

----------

## ksool

.config exists and is for my current kernel.

I guess I'll search elsewhere for ndiswrapper bugs.

----------

## facorread

Hello there,

I have several months working with ndiswrapper and although it warns me about the same 4K stack size, ndiswrapper runs smoothly. Conclusion: Maybe it is not a problem with ndiswrapper at all.

Basic/trivial suggestions:

Take ndiswrapper out of /etc/modules.autoload.d/ndiswrapper

In fact, try to boot with the smallest possible number of modules

emerge --update --deep world

Remember to mention the versions of the involved programs in your posts.

Use modprobe with each module to see which one crashes the kernel.

I will try to help you as possible.

----------

