Abend 1 on P01: Server-5.70.06-4346: Kernel detected an attempted context switch while holding a spinlock

  • 3834173
  • 22-Apr-2007
  • 27-Apr-2012

Environment


Novell NetWare 6.5 Support Pack 6
winsock6k.exe

Situation

After upgrading to NetWare 6.5 SP6 customer is experiencing "Abend: Kernel detected an attempted context switch while holding a spinlock".

Analyzing coredumps we found the cause of the problem to be coming through the following winsock related code:
WS2_32.NLM|map_functions+70
WS2_32.NLM|MP_WSAStartup+43C
WS2_32.NLM|MP_WSACleanupNLMStartups+0


Resolution

The root cause of the problem was a 'timing issue' caused the server to abend in this particular piece of code.

The problem has been resolved and a fix for this issue can be found in Winsock Suite Update 6.23.02 (wsock6L.exe) or later.


Additional Information

The abend always shows as "Abend 1 on Pxx: Server-5.70.06-4346: Kernel detected an attempted context switch while holding a spinlock"

The running process however differed :
Novell Open Enterprise Server, NetWare 6.5
PVER: 6.50.06

Server CL-MHP-01B halted Thursday, 1 March 2007 17:26:53,958
Abend 1 on P01: Server-5.70.06-4346: Kernel detected an attempted context switch while holding a spinlock


Registers:
CS = 0060 DS = 007B ES = 007B FS = 007B GS = 007B SS = 0068
EAX = 00000000 EBX = FBF24D88 ECX = 00000000 EDX = 00000000
ESI = 8C1A616C EDI = 00000002 EBP = 00000246 ESP = BD2B7B04
EIP = 00225017 FLAGS = 00000002
00225017 83C404 ADD ESP, 00000004
EIP in SERVER.NLM at code start +00019297h

The violation occurred while processing the following instruction:
00225017 83C404 ADD ESP, 00000004
0022501A 5D POP EBP
0022501B 5E POP ESI
0022501C 5B POP EBX
0022501D C3 RET
0022501E 8B15DC43F0FB MOV EDX, [FBF043DC]=FBF24CBE
00225024 52 PUSH EDX
00225025 E96AFFFFFF JMP 00224F94
0022502A 8B2DE443F0FB MOV EBP, [FBF043E4]=FBF24D40
00225030 55 PUSH EBP



Running process: Interrupt service routine (nested count 0)
Interrupted process: GWTCP-MEDP-Handler_12 Process
Thread Owned by NLM: GWPOA.NLM
Stack pointer: BD2B7B28
OS Stack limit: BD2A8000
CPU 1 (Thread 5BC26220) is in a NO SLEEP state
Scheduling priority: 67371008
Wait state: 3030070 Yielded CPU
Stack: --FBF24D88 ?
--00000246 (LOADER.NLM|KernelAddressSpace+246)
-8C1A616C (WS2_32.NLM|map_functions+70)
--00000001 (LOADER.NLM|KernelAddressSpace+1)
0022293B (SERVER.NLM|SchedThreadYield+63)
--00000001 (LOADER.NLM|KernelAddressSpace+1)
--00000246 (LOADER.NLM|KernelAddressSpace+246)
--0004ED4E (LOADER.NLM|PSD_LibraryErrno+5D3E)
-8C1A616C (WS2_32.NLM|map_functions+70)
--00000001 (LOADER.NLM|KernelAddressSpace+1)
00212153 (SERVER.NLM|kEnterNetWare+93)
--00000000 (LOADER.NLM|KernelAddressSpace+0)
--BEB6FD98 ?
0036AD60 (SERVER.NLM|CNBFunneler+60)
--8C976C00 ?
--BEB6FD98 ?
--00000093 (LOADER.NLM|KernelAddressSpace+93)
--BEB6FDA0 ?
0030C3B0 (SERVER.NLM|RegisterMarshallingResource+0)
8C185814 (WS2_32.NLM|MP_WSAStartup+43C)

- or for example -

Novell Open Enterprise Server, NetWare 6.5
PVER: 6.50.06

Server CL-MHP-01B halted Friday, 2 March 2007 15:45:15,537
Abend 1 on P01: Server-5.70.06-4346: Kernel detected an attempted context switch while holding a spinlock


Registers:
CS = 0060 DS = 007B ES = 007B FS = 007B GS = 007B SS = 0068
EAX = 00000000 EBX = FBF24D88 ECX = 00000000 EDX = 00000000
ESI = 8BF6016C EDI = 00000002 EBP = 00000246 ESP = B6F1DD18
EIP = 002287B7 FLAGS = 00000002
002287B7 83C404 ADD ESP, 00000004
EIP in SERVER.NLM at code start +00019297h

The violation occurred while processing the following instruction:
002287B7 83C404 ADD ESP, 00000004
002287BA 5D POP EBP
002287BB 5E POP ESI
002287BC 5B POP EBX
002287BD C3 RET
002287BE 8B15DC43F0FB MOV EDX, [FBF043DC]=FBF24CBE
002287C4 52 PUSH EDX
002287C5 E96AFFFFFF JMP 00228734
002287CA 8B2DE443F0FB MOV EBP, [FBF043E4]=FBF24D40
002287D0 55 PUSH EBP



Running process: Interrupt service routine (nested count 0)
Interrupted process: APACHE2.NLM's main thread Process
Thread Owned by NLM: APACHE2.NLM
Stack pointer: B6F1DD3C
OS Stack limit: B6F1A000
CPU 1 (Thread 5C57A0C0) is in a NO SLEEP state
Scheduling priority: 67371008
Wait state: 3030070 Yielded CPU
Stack: --FBF24D88 ?
--00000246 (LOADER.NLM|KernelAddressSpace+246)
-8BF6016C (WS2_32.NLM|map_functions+70)
--00000001 (LOADER.NLM|KernelAddressSpace+1)
002260DB (SERVER.NLM|SchedThreadYield+63)
--00000001 (LOADER.NLM|KernelAddressSpace+1)
--00000246 (LOADER.NLM|KernelAddressSpace+246)
--0000E095 (LOADER.NLM|KernelAddressSpace+E095)
-8BF6016C (WS2_32.NLM|map_functions+70)
--00000001 (LOADER.NLM|KernelAddressSpace+1)
00213F93 (SERVER.NLM|kEnterNetWare+93)
--00000000 (LOADER.NLM|KernelAddressSpace+0)
--B6F1DF0C ?
0036CBA0 (SERVER.NLM|CNBFunneler+60)
--8C728020 ?
--B6F1DF0C ?
--00000097 (LOADER.NLM|KernelAddressSpace+97)
--B6F1DF14 ?
0030E1F0 (SERVER.NLM|RegisterMarshallingResource+0)
8BF45814 (WS2_32.NLM|MP_WSAStartup+43C)
--8C728020 ?
--00000000 (LOADER.NLM|KernelAddressSpace+0)
--00000000 (LOADER.NLM|KernelAddressSpace+0)
8BF43650 (WS2_32.NLM|MP_WSACleanupNLMStartups+0)