Re: Kext Unload getting called automatically after waking Machine from sleep
Re: Kext Unload getting called automatically after waking Machine from sleep
- Subject: Re: Kext Unload getting called automatically after waking Machine from sleep
- From: Andreas Fink <email@hidden>
- Date: Sun, 23 Dec 2007 17:26:21 +0100
On 22.12.2007, at 12:30, JanakiRam wrote: Hi All,
I'm experiencing some weird behavior with my kext only on Intel Mac. My kext is getting unloaded automatically after waking it from sleep.
My App has kernel extension as well as user space apps. Once i configured one time taking activity from my user app , which involve user space to kernel space interaction , then putting my machine into sleep mode - when i wake it from sleep , My machine is getting panicked. I've used 2 machine debugging and got some clue that kext is getting unloaded automatically on a separate thread. Here is the Panic log and thread info. There seems to race condition scenario , kext is releasing memory and and trying to access it.
---- One of Thread Calls-- #11 0x3463debc in cleanup_module () at /Users/janakiram/Desktop/MyApp/trunk/platforms/darwin/host/fp.c:1687 #12 0x3463df57 in genericDriver_stop (ki=0x4bb4d00, d=0x0) at /Users/janakiram/Desktop/MyApp/trunk/platforms/darwin/host/fp.c:1951 #13 0x0041918c in IOCatalogue::unloadModule (this=0x3d6c1e0, moduleName=0x4bda020) at /SourceCache/xnu/xnu- 1228.0.2/iokit/Kernel/IOCatalogue.cpp:1254 #14 0x00419705 in IOCatalogue::terminateDriversForModule (this=0x1743f78, moduleName=0x4bda020, unload=true) at /SourceCache/xnu/xnu-1228.0.2/iokit/Kernel/IOCatalogue.cpp:1392 #15 0x00419769 in IOCatalogue::terminateDriversForModule (this=0x3d6c1e0, moduleName=0x1 <Address 0x1 out of bounds>, unload=false) at /SourceCache/xnu/xnu-1228.0.2/iokit/Kernel/IOCatalogue.cpp:1413 #16 0x0018a38a in _Xio_catalog_terminate (InHeadP=0xe00002c2, OutHeadP=0x0) at device/device_server.c:7313 #17 0x0012d165 in ipc_kobject_server (request=0x5166800) at /SourceCache/xnu/xnu-1228.0.2/osfmk/kern/ipc_kobject.c:331 #18 0x00126247 in mach_msg_overwrite_trap (args=0x1) at /SourceCache/xnu/xnu- 1228.0.2/osfmk/ipc/mach_msg.c:1623 #19 0x00196afc in mach_call_munger (state=0x485dee0) at /SourceCache/xnu/xnu-1228.0.2/osfmk/i386/bsd_i386.c:709
#20 0x0019eb34 in lo_mach_scall () at pmap.h:176
When does a kext will be unloaded automatically ? What could be the reasons ?
What is your kext doing? What does it make it load initially?
My pure guess is that MacOS X wakes up and doesn't see the physical device anymore and thus IOKit unloads the driver. Maybe your hardware device takes more time to wake up than the kernel so a unload/reload scenario would be happening.
Andreas Fink
Fink Consulting GmbH Global Networks Schweiz AG BebbiCell AG
--------------------------------------------------------------- Tel: +41-61-6666330 Fax: +41-61-6666331 Mobile: +41-79-2457333 Address: Clarastrasse 3, 4058 Basel, Switzerland --------------------------------------------------------------- ICQ: 8239353 MSN: email@hidden AIM: smsrelay Skype: andreasfink Yahoo: finkconsulting SMS: +41792457333
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden