Again about APC PowerChute Personal Edition v 2.0.0 for Windows XP, now in english

Mar 26, 2009 09:04

Ранее я писал на русском языке, о том как можно исправить эту проблему. (http://sha-lun.livejournal.com/2739.html)
Я сообщал о проблеме в APC, и более того, указывал им метод решения этой проблемы. В ответ - тишина, на официальном сайте APC последняя версия по прежнему 2.0.0 и ее дата - 12/20/2005
Поэтому я собираюсь написать на английском языке описание этой проблемы и ее решение. Мой английский слабоват, поэтому если найдете ошибки, помогайте, я исправлю.
Немного ключевых слов для поисковиков (keywords for search engines): APC PowerChute Personal Edition XP CPU mainserv.exe

Sometime people with APC UPS have a problem - very high level of CPU utilization for mainserv.exe - near 100% if CPU have single core, near 50% if CPU is dual-core etc.
Citation: "cpu usage of mainserv.exe increases to %100 after every battery intervention and powerchute fails to shutdown the computer"
This is very rare condition, and they solved this bug only in v2.1.1 for Windows Vista, but not for XP.
When I've got this problem, I started to debug this program and later found this:


Here they are calling GetAdaptersInfo and later checking type of the first adapter in the list.

cmp dword ptr [eax+1A0h], 6 ;(6=MIB_IF_TYPE_ETHERNET)
and if it's not an ethernet adapter, in principle they must check next one. (there is a place reserved for 16 adapters but that's not THAT error)
But they forgot increment in the loop, so they are checking first adapter again and again (infinite loop)
So, people, who don't have a network card, or if TCP/IP protocol is disabled for this card, or if for some reason it's not the first in list, they got that glitch.

So, I patched only one byte here, and it's working fine.
My mainserv.exe have size 176193 bytes, version 2.0.0

MD5 before patch:
DC45AB27932447B598848B10650313C5
MD5 after patch:
B9818B15F00F252514F77C0F8B6066AD
Physical Address: 00008608, Before:8F, After:9C

If you have the same problem with different version of mainserv.exe, please contact me, and I'll try to help you.

I sent solution to APC, but they did nothing.
But you can fix it yourself by using a hex-editor: http://en.wikipedia.org/wiki/Comparison_of_hex_editors

Sorry for my bad English.
Previous post Next post
Up