MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001668SUMoBugpublic2012-08-08 19:582012-08-23 09:39
Reporterbytehead 
Assigned ToKyle_Katarn 
PriorityhighSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformIntel x64OSWindows 7OS VersionUltimate x64 SP1
Product Version3.4 
Target VersionFixed in Version3.4.4 
Summary0001668: SUMo gets confused by file system redirector under Win x64
DescriptionWhen scanning, SUMo tries to open some files directly from %WinDir%/system32 folder (e.g. components of FFDShow and Adobe Flash). Being a native 32-bit process, actually it gets served with a %WinDir%/SysWOW64 content under Windows x64 OS. That's why it doesn't report those DLLs in the list as being 64-bit, misleadingly showing as if the files it has probed belong to %WinDir%/system32.

Tech details:
1) http://support.microsoft.com/kb/942589 [^]
2) http://msdn.microsoft.com/en-us/library/aa365743.aspx [^]

even more is here:
3) http://msdn.microsoft.com/en-us/library/aa384249%28v=vs.85%29 [^]

Part of solution for Delfi 7 (are we on WOW64?):
http://stackoverflow.com/questions/2863931/problems-reading-registry-from-delphi-7-on-windows-7-64-bit [^]

P.S. Registry parsing code for WOW64 case might also need to be changed.
Steps To ReproduceSee attached screenshots for prove:

Case A:
=======

I have parallel 32/64-bit installations of FFDShow (both of v1.2.4461). Their 32/64-bit flavors of ff_vfw.dll component originally live under %WinDir%/SysWOW64 and %WinDir%/system32 respectively.

Screenshot 1:

SUMo lists only one instance of ff_vfw.dll under c:\windows\systems32 and "fails" to recognize it as 64-bit. The item from c:\windows\syswow64 (really 32-bit this time) is considered a full duplicate and therefore gets dropped (a separate issue);

Screenshot 2:

Then I copied these dlls into c:\program files and renamed them to ff_vfw_x32.exe / ff_vfw_x64.exe for SUMo to be able to scan them and me to easily tell them apart. Rescan --> RESULT: both dlls (albeit shown as .exe here) are properly recognized by SUMo as 32/64 bit ones!

Case B:
=======

I also happen to have parallel 32/64-bit installations of Flash (both of v11.3.300.270) for IE and FF.

Screenshots 3 & 4:

As you can see, again only c:\windows\systems32 components are listed and not "recognized" as 64-bit. As in case A, real 32-bit variants get cancelled out as duplicates.

CONCLUSIONS:
============

1) SUMo is not aware of file system redirection under Win x64 and *always* parses 32-bit components from SysWOW64, *thinking* it is from system32 actually;

2) File paths are not taken into account by duplicate items filter in the list, which effectively hides all other copies of the same app/component (another bug report pending).
TagsNo tags attached.
Attached Filespng file icon scr1_ff32+64_before.png [^] (57,374 bytes) 2012-08-08 19:58


png file icon scr2_ff32+64_after.png [^] (81,659 bytes) 2012-08-08 19:59


png file icon scr3_flash32+64.png [^] (56,990 bytes) 2012-08-08 20:00


png file icon scr4_flash32+64.png [^] (55,595 bytes) 2012-08-08 20:00


zip file icon SUMo_DB+log.zip [^] (129,726 bytes) 2012-08-08 20:14
png file icon loading on start-up.png [^] (43,147 bytes) 2012-08-09 18:30


png file icon scanning.png [^] (46,396 bytes) 2012-08-09 18:31


png file icon loading_after_scan.png [^] (43,370 bytes) 2012-08-09 18:31


png file icon checking.png [^] (44,625 bytes) 2012-08-09 18:33


txt file icon errlst_TEST.txt [^] (62,699 bytes) 2012-08-21 03:53 [Show Content]
png file icon SUMo_test1.png [^] (61,192 bytes) 2012-08-21 03:53


png file icon SUMo_test2.png [^] (50,230 bytes) 2012-08-21 03:53


png file icon b172_issues.png [^] (19,244 bytes) 2012-08-22 00:24


png file icon b172_crash_scr1.png [^] (114,233 bytes) 2012-08-22 00:44


png file icon b172_crash_scr2.png [^] (126,019 bytes) 2012-08-22 00:45


log file icon SUMo_b172.log [^] (189,787 bytes) 2012-08-22 01:02
log file icon SUMo_b173.log [^] (188,251 bytes) 2012-08-22 01:22
png file icon b173_check_with_blank_profile (no_scan).png [^] (61,038 bytes) 2012-08-22 01:33


log file icon SUMo_b174.log [^] (188,250 bytes) 2012-08-22 15:05

- Relationships
parent of 0001662resolvedKyle_Katarn Adobe Flash Player for IE/FF 64bits not detected 
parent of 0001582resolvedKyle_Katarn SUMO does not detect 64bit Adobe Flash Player plugins 
parent of 0001584resolvedKyle_Katarn SUMO does not detect both 32bit + 64bit java instalation - mutualy excluding items 
parent of 0001607resolvedKyle_Katarn General detection troubles with parallel 32/64bit application, with mutual exclusion 
related to 0001708resolvedKyle_Katarn Ffdshow incomplete detection on 64bits systems 

-  Notes
(0001049)
bytehead (updater)
2012-08-08 20:15

Sorry for big screens ;)
(0001050)
poutnikg (reporter)
2012-08-08 20:38
edited on: 2012-08-08 20:40

I have expressed in the past such a redirection concern,
as author of Autocompress utility ( conditional NTFS file compression )
addressed the issue by a special compilation flag
for 32bit application to access true system32 folder.

But as non programmer, I could not tell any details.

http://www.kcsoftwares.com/forum/viewtopic.php?f=11&t=129 [^]

(0001051)
bytehead (updater)
2012-08-08 20:55

That flag make sense only for modern MS Visual Studio compilers, not ancient 32-bit only Delfi 7 (which SUMo is built on, afaik).
(0001056)
Kyle_Katarn (administrator)
2012-08-08 21:45

You're right.
SUMo already uses
"Wow64EnableWow64FsRedirection" & "Wow64DisaableWow64FsRedirection" API to work on 64Bits OS but it seems to be not so efficient.

I also have some automatic path rewriting procedures (see "fix" lines in log after a scan in verbose mode) but this is an ugly workaround.

I'll probably send you a test build soon.
(0001058)
bytehead (updater)
2012-08-08 22:23

From the MSDN article:

1) about Wow64DisableWow64FsRedirection:

>> The Wow64DisableWow64FsRedirection / Wow64RevertWow64FsRedirection function pairing is a *replacement* for the functionality of the Wow64EnableWow64FsRedirection function.

>> Minimum supported client:
        Windows Vista, *Windows XP Professional x64 Edition*;
>> Minimum supported server:
        Windows Server 2008, Windows Server 2003 with SP1.

2) about Wow64EnableWow64FsRedirection

>> Minimum supported client:
    Windows Vista;
>> Minimum supported server:
    Windows Server 2003.

Does this mean Wow64EnableWow64FsRedirection is not supported under Win XP x64?
(0001060)
Kyle_Katarn (administrator)
2012-08-08 22:39

I should use Wow64DisableWow64FsRedirection & Wow64RevertWow64FsRedirection instead
(0001071)
bytehead (updater)
2012-08-09 18:47
edited on: 2012-08-09 18:49

>> SUMo already uses "Wow64EnableWow64FsRedirection" & "Wow64DisaableWow64FsRedirection" API to work on 64Bits OS but it seems to be not so efficient.

According to MSDN:
"Disabling file system redirection affects only operations made by the current thread. Some functions, such as CreateProcessAsUser, do their work on another thread, which is not affected by the state of file system redirection in the calling thread."

I noticed SUMo uses an extra thread (its own, apart from attached system dlls) when scanning or loading (checking uses only 1 own thread). Could it be that redirection API is used on the wrong one which makes it "inefficient"?

P.S. added screenshots from Process Hacker.

(0001072)
bytehead (updater)
2012-08-09 19:10

AFAII, one can simply use %windir%\Sysnative instead of %windir%\System32 under WOW64 on Vista and later. So, redirection API is needed only on Windows Server 2003 x64 and Windows XP x64. Am I correct?
(0001076)
Kyle_Katarn (administrator)
2012-08-09 23:55

You're right. To be tested.
(0001116)
bytehead (updater)
2012-08-15 14:11

any news?
(0001117)
Kyle_Katarn (administrator)
2012-08-15 14:33

Not tested so far (i was focused on 3.4.2 issues)
(0001158)
Kyle_Katarn (administrator)
2012-08-20 23:23

Would you please download test build 171 ( http://www.kcsoftwares.com/beta/sumo_sysnative.exe [^] ) and tell me if it improved the situation ?
(0001160)
bytehead (updater)
2012-08-21 03:50
edited on: 2012-08-21 03:58

Yes, it did improve, but there's a mess with usage of sysnative / system32 /sysWOW64 strings in the proper context (see my test screenshots and error log).

"Sysnative" should not be exposed to end user as a real folder.

Flash 32/64 is shown as 3 diff. items instead of 2.

(0001161)
Kyle_Katarn (administrator)
2012-08-21 09:22

That's a good news. I'll post a news test build after fixing these glitches
(0001162)
Kyle_Katarn (administrator)
2012-08-21 23:12

Would you please download it again (build 172) and tell me if it is now better ?
(0001163)
bytehead (updater)
2012-08-21 23:21

Beta download link doesn't seem to work for me.
(0001164)
Kyle_Katarn (administrator)
2012-08-21 23:25

Problem with uploading... please retry in 5 minutes.
(0001165)
Kyle_Katarn (administrator)
2012-08-21 23:31

Try this one : ftp://ftp2.kcsoftwares.com/kcsoftwa/beta/sumo_test.exe [^]
(0001166)
bytehead (updater)
2012-08-21 23:36

Got it! Testing...
(0001167)
Kyle_Katarn (administrator)
2012-08-21 23:44

Great!
(0001168)
bytehead (updater)
2012-08-22 00:44

1) There's still an issues with SysNative strings being exposed and as a consequence double entries for Flash 64. Same problem for FFDShow.

All SysNative paths meant to be exposed (in GUI and logs) should be substituted with their System32 equivalents. I think internally there should be 2 parallel objects for storing paths, one for actual parsing, another one for presentation purposes, if that make sense.

2) Build 172 now always crashes after scan ("List index out of bounds"?) -- see screenshot.
(0001169)
Kyle_Katarn (administrator)
2012-08-22 00:46

Thanks !

Duplcate probably come from build 171.
Please delete (but NO ignore) the sysnative lines and re-scan.

Is everything OK after that ?
(0001170)
bytehead (updater)
2012-08-22 00:52

Nope, it crashes immediately after scan is over. I deleted all 3 entries with sysnative (only from the list).
(0001171)
Kyle_Katarn (administrator)
2012-08-22 00:56

Please attach SUMo log after crash
(0001172)
bytehead (updater)
2012-08-22 01:03

Here you go.
(0001173)
Kyle_Katarn (administrator)
2012-08-22 01:04

Thanks
(0001174)
Kyle_Katarn (administrator)
2012-08-22 01:15

Please post log with b173 : http://www.kcsoftwares.com/beta/sumo_test.exe [^]

Won't fix bug but will give me clues.
(0001175)
bytehead (updater)
2012-08-22 01:22
edited on: 2012-08-22 01:28

done.

P.S. I started out with an almost empty profile this time -- renamed "SUMo.skipped", "SUMo.cache" and "db.sumo" so that wizard came up. Still crashes on rescan.

(0001176)
bytehead (updater)
2012-08-22 01:39

To go around this crash I've tried to check on a blank profile (without scanning at all) -- see attachment. How come only 64-bit variant of FFDshow is listed now? I would rather expect a SysWOW64 line there if only for a single entry.
(0001177)
Kyle_Katarn (administrator)
2012-08-22 10:02

IT is now cristal clear ! I'm "internal" changing system32 to sysnative and then i look for the "new" name in the table of "old" names with the assumption that it is listed (no out of bound protection).

Concerning FFDShow 64bits only with blank profile : Please open a NEW issue for that (nice catch)
(0001178)
Kyle_Katarn (administrator)
2012-08-22 10:52

Build 174 is ready : http://www.kcsoftwares.com/beta/sumo_test.exe [^]

Please tell me if crash is fixed (if not, post log again)

Thank you !
(0001179)
bytehead (updater)
2012-08-22 15:07

Still crashes on a blank profile :( Exactly the same error. Log attached.
(0001180)
Kyle_Katarn (administrator)
2012-08-22 16:05

Sorry, my mistake, fix was coded the bad way.

build 175 uploaded, fix and additionnal instrumentation.
Ready for test.
http://www.kcsoftwares.com/beta/sumo_test.exe [^]
(0001181)
bytehead (updater)
2012-08-22 17:14

Seems OK to me -- no crashes, no sysnative strings, no doubled Flash components, JRE 32/64 is fine, too. Well, except for missing FFDShow 32 bit. Will open another bug report later.

Looks like the issue is resolved now. Was really a bitchy one! ;)
(0001182)
Kyle_Katarn (administrator)
2012-08-22 17:42

Woohoo ! So happy to tag it "resolved".
Thank you for you help !
(0001183)
Kyle_Katarn (administrator)
2012-08-23 09:39

Issue 1708 opened (FFDShow)

- Issue History
Date Modified Username Field Change
2012-08-08 19:58 bytehead New Issue
2012-08-08 19:58 bytehead File Added: scr1_ff32+64_before.png
2012-08-08 19:59 bytehead File Added: scr2_ff32+64_after.png
2012-08-08 20:00 bytehead File Added: scr3_flash32+64.png
2012-08-08 20:00 bytehead File Added: scr4_flash32+64.png
2012-08-08 20:02 bytehead Steps to Reproduce Updated View Revisions
2012-08-08 20:03 bytehead Relationship added parent of 0001662
2012-08-08 20:04 bytehead Relationship added parent of 0001582
2012-08-08 20:05 bytehead Relationship added parent of 0001584
2012-08-08 20:14 bytehead File Added: SUMo_DB+log.zip
2012-08-08 20:15 bytehead Note Added: 0001049
2012-08-08 20:16 bytehead Steps to Reproduce Updated View Revisions
2012-08-08 20:38 poutnikg Note Added: 0001050
2012-08-08 20:40 poutnikg Note Edited: 0001050 View Revisions
2012-08-08 20:55 bytehead Note Added: 0001051
2012-08-08 20:57 bytehead Steps to Reproduce Updated View Revisions
2012-08-08 20:57 bytehead Steps to Reproduce Updated View Revisions
2012-08-08 20:58 bytehead Description Updated View Revisions
2012-08-08 21:45 Kyle_Katarn Note Added: 0001056
2012-08-08 21:45 Kyle_Katarn Assigned To => Kyle_Katarn
2012-08-08 21:45 Kyle_Katarn Status new => acknowledged
2012-08-08 22:23 bytehead Note Added: 0001058
2012-08-08 22:39 Kyle_Katarn Note Added: 0001060
2012-08-08 23:49 bytehead Relationship added parent of 0001650
2012-08-08 23:49 bytehead Relationship added parent of 0001607
2012-08-09 14:36 bytehead Relationship deleted parent of 0001650
2012-08-09 18:30 bytehead File Added: loading on start-up.png
2012-08-09 18:31 bytehead File Added: scanning.png
2012-08-09 18:31 bytehead File Added: loading_after_scan.png
2012-08-09 18:33 bytehead File Added: checking.png
2012-08-09 18:41 bytehead Description Updated View Revisions
2012-08-09 18:41 bytehead Steps to Reproduce Updated View Revisions
2012-08-09 18:47 bytehead Note Added: 0001071
2012-08-09 18:49 bytehead Note Edited: 0001071 View Revisions
2012-08-09 19:10 bytehead Note Added: 0001072
2012-08-09 23:55 Kyle_Katarn Note Added: 0001076
2012-08-15 14:11 bytehead Note Added: 0001116
2012-08-15 14:33 Kyle_Katarn Note Added: 0001117
2012-08-20 23:23 Kyle_Katarn Note Added: 0001158
2012-08-21 03:50 bytehead Note Added: 0001160
2012-08-21 03:53 bytehead File Added: errlst_TEST.txt
2012-08-21 03:53 bytehead File Added: SUMo_test1.png
2012-08-21 03:53 bytehead File Added: SUMo_test2.png
2012-08-21 03:56 bytehead Note Edited: 0001160 View Revisions
2012-08-21 03:58 bytehead Note Edited: 0001160 View Revisions
2012-08-21 09:22 Kyle_Katarn Note Added: 0001161
2012-08-21 23:12 Kyle_Katarn Note Added: 0001162
2012-08-21 23:21 bytehead Note Added: 0001163
2012-08-21 23:25 Kyle_Katarn Note Added: 0001164
2012-08-21 23:31 Kyle_Katarn Note Added: 0001165
2012-08-21 23:36 bytehead Note Added: 0001166
2012-08-21 23:44 Kyle_Katarn Note Added: 0001167
2012-08-22 00:24 bytehead File Added: b172_issues.png
2012-08-22 00:44 bytehead Note Added: 0001168
2012-08-22 00:44 bytehead File Added: b172_crash_scr1.png
2012-08-22 00:45 bytehead File Added: b172_crash_scr2.png
2012-08-22 00:46 Kyle_Katarn Note Added: 0001169
2012-08-22 00:52 bytehead Note Added: 0001170
2012-08-22 00:56 Kyle_Katarn Note Added: 0001171
2012-08-22 01:02 bytehead File Added: SUMo_b172.log
2012-08-22 01:03 bytehead Note Added: 0001172
2012-08-22 01:04 Kyle_Katarn Note Added: 0001173
2012-08-22 01:15 Kyle_Katarn Note Added: 0001174
2012-08-22 01:22 bytehead File Added: SUMo_b173.log
2012-08-22 01:22 bytehead Note Added: 0001175
2012-08-22 01:27 bytehead Note Edited: 0001175 View Revisions
2012-08-22 01:28 bytehead Note Edited: 0001175 View Revisions
2012-08-22 01:33 bytehead File Added: b173_check_with_blank_profile (no_scan).png
2012-08-22 01:39 bytehead Note Added: 0001176
2012-08-22 10:02 Kyle_Katarn Note Added: 0001177
2012-08-22 10:52 Kyle_Katarn Note Added: 0001178
2012-08-22 15:05 bytehead File Added: SUMo_b174.log
2012-08-22 15:07 bytehead Note Added: 0001179
2012-08-22 16:05 Kyle_Katarn Note Added: 0001180
2012-08-22 17:14 bytehead Note Added: 0001181
2012-08-22 17:42 Kyle_Katarn Note Added: 0001182
2012-08-22 17:42 Kyle_Katarn Status acknowledged => resolved
2012-08-22 17:42 Kyle_Katarn Fixed in Version => 3.4.4
2012-08-22 17:42 Kyle_Katarn Resolution open => fixed
2012-08-23 09:38 Kyle_Katarn Relationship added related to 0001708
2012-08-23 09:39 Kyle_Katarn Note Added: 0001183


MantisBT 1.2.15 [^]
Copyright © 2000 - 2013 MantisBT Team
Powered by Mantis Bugtracker