One reason of open network folder hanging

 

Why does open network folder hang?  2010-08-23

These days, I have used an old XPSP3 OS (I hadn’t used it for a long time) to test an issue.

But When I have opened a network folder, I have always needed to wait for a long time. It’s strange and I had debugged it after I had fixed my work. Below are my analysis and the root cause.

 

When folder was hanging, I had used Windbg.exe attach the Explorer.exe to debug it.

0:014> !analyze –hang

Probably caused by : SHLWAPI.dll ( SHLWAPI!GetFileAttributesWrapW+51 )

0:014>~*kb

0:014> ~5 s

eax=00000000 ebx=000a6ae0 ecx=00e8dbd8 edx=7c92e514 esi=00000000 edi=00000000

eip=7c92e514 esp=00e8d9b8 ebp=00e8da28 iopl=0         nv up ei pl zr na pe nc

cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246

ntdll!KiFastSystemCallRet:

7c92e514 c3              ret

0:005> kbn100

 # ChildEBP RetAddr  Args to Child             

00 00e8d974 7c92d71a 7c80b853 00e8d9bc 00e8d994 ntdll!KiFastSystemCallRet

01 00e8d978 7c80b853 00e8d9bc 00e8d994 00000000 ntdll!NtQueryAttributesFile+0xc

02 00e8d9e8 77f47d88 00e8deb0 000eb220 000eb220 kernel32!GetFileAttributesW+0x79

03 00e8dc0c 77f47f24 00e8deb0 00e8de88 00e8deb0 SHLWAPI!GetFileAttributesWrapW+0x51

04 00e8de54 77f52db4 00e8deb0 00e8de88 00000104 SHLWAPI!PathFileExistsAndAttributesW+0x41

05 00e8de6c 77f531e4 00e8deb0 0000006f 00e8de88 SHLWAPI!PathFileExistsDefExtAndAttributesW+0x48

06 00e8de80 77f53131 ffffffff 00000000 02298868 SHLWAPI!_PathExeExists+0x13

07 00e8e0bc 77f5301b 02298868 00e8e3a4 00000000 SHLWAPI!SHEvaluateSystemCommandTemplate+0xcd

08 00e8e2f0 77f52fc3 02298868 00e8e3a4 00000000 SHLWAPI!_ExeFromCmd+0x46

09 00e8e30c 7d5c527b 000e6d64 02298868 00000000 SHLWAPI!CAssocShellVerbElement::QueryString+0xdc

0a 00e8e324 7d5c6c07 000e6d64 02010007 00000000 SHELL32!_QueryString+0x17

0b 00e8e350 7d5c525b 7d5c5264 0011bb4c 02010007 SHELL32!CAssocArray::_QueryElementAny<unsigned long *>+0x79

0c 00e8e370 7d601754 000eca20 0000ffff 02010007 SHELL32!CAssocArray::QueryString+0x20

0d 00e8e39c 7d5d5975 00000000 00000104 00e8ec2c SHELL32!CFileSysItemString::_QueryIconIndex+0xa4

0e 00e8e3b8 7d5d2b5a 00000000 00000001 022914e8 SHELL32!CFileSysItemString::_ClassFlags+0x89

0f 00e8ea28 7d5d2d60 022914ec 022926c0 00000020 SHELL32!CFSFolder::GetIconOf+0x10c

10 00e8ea48 7d5d2db7 022914e8 022914ec 022926c0 SHELL32!SHGetIconFromPIDL+0x20

11 00e8ea74 7d5d2e79 02292be8 022914e8 022926c0 SHELL32!SHMapIDListToImageListIndexAsync+0x43

12 00e8eaa0 7d5d27e0 022926c0 00e8ec2c 00000001 SHELL32!CDefView::_GetIconAsync+0x39

13 00e8ec50 7d5c3323 022926c0 00e8f2a4 000f7218 SHELL32!CDefView::_GetDisplayInfo+0x221

14 00e8eec8 7d5c3053 00e8f2a4 000f7218 000f7218 SHELL32!CDefView::_OnLVNotify+0x260

15 00e8eee0 7d5c2ec4 00e8f2a4 00000000 000f7218 SHELL32!CDefView::_OnNotify+0x7c

16 00e8f054 7d5c2f38 000701ca 0000004e 00000001 SHELL32!CDefView::WndProc+0x860

17 00e8f098 77d18734 000701ca 0000004e 00000001 SHELL32!CDefView::s_WndProc+0x72

18 00e8f0c4 77d18816 7d5c2ee2 000701ca 0000004e USER32!InternalCallWinProc+0x28

19 00e8f12c 77d2927b 0009cef0 7d5c2ee2 000701ca USER32!UserCallWinProcCheckWow+0x150

1a 00e8f168 77d292e3 0061ef98 0063b770 00000001 USER32!SendMessageWorker+0x4a5

1b 00e8f188 7719b001 000701ca 0000004e 00000001 USER32!SendMessageW+0x7f

1c 00e8f220 771c6eb5 00120868 ffffff4f 00e8f2a4 comctl32!CCSendNotify+0xc20

1d 00e8f2e4 771ecad8 00120868 0000001b 00e8f6e4 comctl32!ListView_OnGetItem+0x364

1e 00e8f644 771c7f14 00e8f6cc 00000000 00e8f868 comctl32!ListView_RDrawItem+0x196

1f 00e8f664 771cdd14 00e8f6cc 00010000 00120868 comctl32!ListView_DrawItem+0x225

20 00e8f7ec 771cecba 00000019 5f010d6a 00e8f868 comctl32!ListView_Redraw+0x51e

21 00e8f8a4 771d15ce 00120868 00000000 00e8fa70 comctl32!ListView_OnPaint+0x1cb

22 00e8fa08 77d18734 00080220 0000000f 00000000 comctl32!ListView_WndProc+0x93c

23 00e8fa34 77d18816 771d0c92 00080220 0000000f USER32!InternalCallWinProc+0x28

24 00e8fa9c 77d2a013 0009cef0 771d0c92 00080220 USER32!UserCallWinProcCheckWow+0x150

25 00e8facc 77d2a039 771d0c92 00080220 0000000f USER32!CallWindowProcAorW+0x98

26 00e8faec 6c556093 771d0c92 00080220 0000000f USER32!CallWindowProcW+0x1b

27 00e8fb1c 77d18734 00000000 0000000f 00000000 DUSER!WndBridge::RawWndProc+0xa2

28 00e8fb48 77d18816 02090fc0 00080220 0000000f USER32!InternalCallWinProc+0x28

29 00e8fbb0 77d28ea0 0009cef0 02090fc0 00080220 USER32!UserCallWinProcCheckWow+0x150

2a 00e8fc04 77d28eec 00624b88 0000000f 00000000 USER32!DispatchClientMessage+0xa3

2b 00e8fc2c 7c92e473 00e8fc3c 00000018 00624b88 USER32!__fnDWORD+0x24

2c 00e8fc50 77d194d2 77d28f10 00e8fcd8 00000000 ntdll!KiUserCallbackDispatcher+0x13

2d 00e8fc98 77d18a10 00e8fcd8 00000000 00e8fcc0 USER32!NtUserDispatchMessage+0xc

2e 00e8fca8 75f0d875 00e8fcd8 00000000 000bd220 USER32!DispatchMessageW+0xf

2f 00e8fcc0 75f15218 00e8fcd8 00000000 00000000 BROWSEUI!TimedDispatchMessage+0x33

30 00e8ff20 75f15389 000a0530 00000000 00000000 BROWSEUI!BrowserThreadProc+0x336

31 00e8ffb4 7c80b729 000a0530 00000000 00000000 BROWSEUI!BrowserProtectedThreadProc+0x50

32 00e8ffec 00000000 75f15339 000a0530 00000000 kernel32!BaseThreadStart+0x37

0:005> du 02298868

02298868  ""\\NetComputerName\Share\Temp\UserName\AppExe.exe" "%1""

0:005> du 00e8deb0

00e8deb0  "\\NetComputerName\Share\Temp\UserName\ AppExe.exe"

Here, NetComputerName is a network computer name used long time again by company, and it doesn’t exist in current network. So Explorer is hanged when it calls kernel32!GetFileAttributesW interface to get this files’s attribute.

 

But why explorer process needed to get AppExe.exe’s attribute when I had opened this special folder. From string ""\\NetComputerName\Share\Temp\UserName\AppExe.exe" "%1””, I think this exe should be registered in register to open the special file-name extension.

I had searched register and had got below information.

 

[HKEY_CLASSES_ROOT\.log]

@="AppExeView"

 

[HKEY_CLASSES_ROOT\AppExeView\Shell\Open\Command]

@="\"\\\\NetComputerName\\Share\\Temp\\UserName\\AppExe.exe\" \"%1\""

 

From above, we know OS defines .log file opened by AppExeView application  and application path is \\NetComputerName\Share\Temp\UserName\AppExe.exe,  but \\NetComputerName computer already doesn’t exist.

 

Others:

  1. If I open local folder (It includes .log file) this hang issue doesn’t happen.
  2. If I set default icon for file-name extension of .log in register this hang doesn’t happen.
  3. Which file does trigger this action?  We can find it in thread stack.

 

                                                    Written By opqit(opqit@hotmail.com) 08/23/2010

This entry was posted in Computers and Internet. Bookmark the permalink.

Leave a comment