warvair / peerblock

Automatically exported from code.google.com/p/peerblock
Other
0 stars 1 forks source link

Unable to load driver: CreateService error 1072, "service marked for deletion" #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Rebooted computer, PeerBlock set to auto-start.  While starting, PeerBlock
displayed error window:

/---------------------------------------
PeerBlock is unable to load the packet filtering driver.
This could happen if PeerBlock crashed and didn't have a chance to unload
the driver, or if the file pbfilter.sys can't be found.

class win32_error
CreateService
122
The data area passed to a system call is too small.
\---------------------------------------

Extremely rare error reported via email by Petri.  PeerBlock r65, running
on "Windows Server 2003 64-bit - Build:[3790], SP:[2.0]" according to
peerblock.log.  Same error used to happen every so often with PG2,
apparently seen by others as well.

From looking through the code, it looks like the returned error (122 =
ERROR_INSUFFICIENT_BUFFER) is stale at this point in the program, leftover
from an earlier call to QueryServiceConfig() (for which it's actually not
an error at all).  So what's happening is we're failing to create the
service for some reason, and then returning this stale error as the reason
behind our failure.  Need to update the code to refresh err if we fail to
create the service, prior throwing win32_error("CreateService", err), so
that we can get useful information as to the nature of the failure next
time it hits somebody.

Targetting for 0.9.1, but only to put in the correct error-gathering code.

Original issue reported on code.google.com by peerbloc...@gmail.com on 27 Jul 2009 at 6:10

GoogleCodeExporter commented 9 years ago
Additional instrumentation added to this routine in r66 commit.

Leaving bug open (but not targetted at a specific release) until we get 
additional
data from someone hitting this issue.

Original comment by peerbloc...@gmail.com on 28 Jul 2009 at 3:07

GoogleCodeExporter commented 9 years ago
Got some more info on this one now, after the r66 changes.  Here's the real 
error
we're getting:

/---------------------------------------
class win32_error
CreateService
1072
The specified service has been marked for deletion.
\---------------------------------------

The relevant lines from peerblock.log:

/---------------------------------------
[driver] [load(3)]    driver not currently installed as service
[driver] [load(3)]    Driver-service NOT running!
[driver] [load(3)]    driver not currently installed as service
[driver] [load(3)]    paths don't match, removing and recreating driver-service
[driver] [load(3)]    ERROR re-creating driver-service
\---------------------------------------

Original comment by peerbloc...@gmail.com on 30 Jul 2009 at 6:15

GoogleCodeExporter commented 9 years ago
anybody resolve this problem as im getting the same error.
cheers

Original comment by sku...@gmail.com on 12 Aug 2009 at 7:09

GoogleCodeExporter commented 9 years ago
Not yet, I started looking into it but haven't had a chance to fully debug it 
yet. 
From my initial investigations, it looks as though the Windows Service Control
Manager thinks someone still has a handle open to the service, so that when we 
delete
it as part of the "remove and recreating driver-service" step it doesn't 
actually
finish deleting it.

My understanding is that when this issue is hit, restarting PeerBlock generally
resolves it.  And it only happens during program startup, so it's 
easily-noticeable
and doesn't end up crashing the program and leaving you unprotected in the 
middle of
the night while you're sleeping.  If that's incorrect let me know and I'll up 
the
priority of this.

Original comment by peerbloc...@gmail.com on 12 Aug 2009 at 3:39

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have a potential fix for this in test, won't be committing anything to
source-control until the problem is repro'ed again though.  If anyone who's hit 
this
bug is willing to help test, please send me an email
(http://tinymailto.com/peerblock) and I'll get it out to you.

Original comment by peerbloc...@gmail.com on 19 Aug 2009 at 1:34

Attachments:

GoogleCodeExporter commented 9 years ago
Committed that potential fix as r116, along with a window that will popup if 
you hit
this, telling you that we're going to try to workaround it, and asking you to 
please
send us your peerblock.log file.  If you see this message during startup, see 
what
happens, and please send us your .log file whether it works or not!

Original comment by peerbloc...@gmail.com on 25 Aug 2009 at 2:49

GoogleCodeExporter commented 9 years ago
Fixed in r122/123, as per test results from forum thread:
(http://forums.peerblock.com/read.php?3,227).

Original comment by peerbloc...@gmail.com on 28 Aug 2009 at 9:19

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
i just now updated to the latest version but i forgot to close my peerblock 
while
doing so, then i closed it and clicked Retry, but now i get the same unable to 
load
driver error as well.

Original comment by gruzergr...@gmail.com on 29 Sep 2009 at 12:57

GoogleCodeExporter commented 9 years ago
Re-opening this issue.  Could you please attach your peerblock.log file, and a
screenshot of the error message if it's reproducible?

Original comment by peerbloc...@gmail.com on 3 Oct 2009 at 6:34

GoogleCodeExporter commented 9 years ago
After following up with gruzergrub5000, it sounds as though his problem was 
caused by
forgetting close PeerBlock prior to upgrading.  After a reinstall everything has
apparently been working well, so I'm re-closing this bug.

If it happens again, please make sure you post your peerblock.log and/or a 
screenshot
of the error, and we will either re-open this bug again or open a new one 
against it.

Original comment by peerbloc...@gmail.com on 15 Oct 2009 at 5:48

GoogleCodeExporter commented 9 years ago
[10/26/2009] [22:49:04.183] [02828]  [driver] [load(2)]   preparing to load 
driver -
name: [pbfilter], file: [\??\C:\Program Files\PeerBlock\pbfilter.sys]
[10/26/2009] [22:49:04.183] [02828]  [driver] [load(3)]   loading driver - name:
[pbfilter], file: [\??\C:\Program Files\PeerBlock\pbfilter.sys], devfile: 
[\\.\pbfilter]
[10/26/2009] [22:49:04.184] [02828]  [driver] [load(3)]    driver not currently
installed as service
[10/26/2009] [22:49:04.186] [02828]  [driver] [load(3)]    service name:
[\??\C:\Program Files\PeerBlock\pbfilter.sys], file name: [\??\C:\Program
Files\PeerBlock\pbfilter.sys]
[10/26/2009] [22:49:04.187] [02828]  [driver] [load(3)]    Driver-service NOT 
running!
[10/26/2009] [22:49:04.187] [02828]  [driver] [load(3)]    - service state: [1]
[10/26/2009] [22:49:04.188] [02828]  [driver] [start]    starting driver
[10/26/2009] [22:49:04.236] [02828]  [driver] [start]   getting handle to 
driver -
devfile: [\\.\pbfilter]
[10/26/2009] [22:49:04.236] [02828]  [driver] [start]    started driver

apparently this error is still active

log attached

Original comment by hill.jay...@live.com on 27 Oct 2009 at 5:52

Attachments:

GoogleCodeExporter commented 9 years ago
It actually looks like PeerBlock is working correctly as per your peerblock.log 
file
- the driver wasn't running, so we started it and continued normally.  From your
logfile it doesn't look like you saw the "unable to load the packet filtering 
driver"
popup (with associated PeerBlock crash), right?

I think what's confusing you is just the poorly-chosen text I've put into the
logfile.  That "Driver-service NOT running!" text makes it look like this is a 
bad
condition, when it's really not.  I'll try to remember to change that next time 
I'm
in that area of code, to something less alarming.

If I've misinterpreted something, though, please correct my understanding of 
your issue!

Original comment by peerbloc...@gmail.com on 30 Oct 2009 at 2:06

GoogleCodeExporter commented 9 years ago
Hello i tried to use peerblocker on a windows 2000 machine with exchange 2000.

look here, pbfilter.sys error!

Logging Started...
[1/27/2010] [11:38:29.800] [05920]  PeerBlock Starting
[1/27/2010] [11:38:29.800] [05920]  PeerBlock 1.0
[1/27/2010] [11:38:29.800] [05920]  Flushed tracelog
[1/27/2010] [11:38:29.800] [05920]  Running on OS: Windows 2000 32-bit -
Build:[2195], SP:[4.0]
[1/27/2010] [11:38:29.800] [05920]  User running as Admin
[1/27/2010] [11:38:29.800] [05920]  Created program mutex
[1/27/2010] [11:38:29.800] [05920]  Initialized common controls
[1/27/2010] [11:38:29.800] [05920]  Registered color picker
[1/27/2010] [11:38:29.800] [05920]  Initialized winsock
[1/27/2010] [11:38:29.800] [05920]  Successfully 
PreventSetUnhandledExceptionFilter()
[1/27/2010] [11:38:29.800] [05920]  [mainproc] [Main_OnInitDialog]  > Entering 
routine.
[1/27/2010] [11:38:29.800] [05920]  [mainproc] [Main_OnInitDialog]    loading 
config
[1/27/2010] [11:38:29.800] [05920]  [Configuration] [Load]  > Entering routine.
[1/27/2010] [11:38:29.800] [05920]  [Configuration] [LoadFile]    loading
file:[C:\Program Files\PeerBlock\peerblock.conf]
[1/27/2010] [11:38:29.800] [05920]  [Configuration] [LoadFile]    Successfully 
loaded
file:[C:\Program Files\PeerBlock\peerblock.conf]
[1/27/2010] [11:38:29.815] [05920]  [Configuration] [Load]    found peerblock
configuration file
[1/27/2010] [11:38:29.815] [05920]  [Configuration] [Load]    parsing config 
root element
[1/27/2010] [11:38:29.815] [05920]  [Configuration] [Load]    parsing config 
settings
element
[1/27/2010] [11:38:29.815] [05920]  [Configuration] [Load]    parsing config 
logging
element
[1/27/2010] [11:38:29.815] [05920]  [Configuration] [Load]    parsing config
tracelogging element
[1/27/2010] [11:38:29.815] [05920]  [Configuration] [Load]    parsing config 
colors
element
[1/27/2010] [11:38:29.815] [05920]  [Configuration] [Load]    parsing config
windowing element
[1/27/2010] [11:38:29.815] [05920]  [Configuration] [Load]    parsing config 
updates
element
[1/27/2010] [11:38:29.815] [05920]  [Configuration] [Load]    parsing config 
messages
element
[1/27/2010] [11:38:29.815] [05920]  [Configuration] [Load]    parsing config 
ports
element
[1/27/2010] [11:38:29.815] [05920]  [Configuration] [Load]    parsing config 
lists
element
[1/27/2010] [11:38:29.815] [05920]  [Configuration] [Load]  < Leaving routine.
[1/27/2010] [11:38:29.815] [05920]  [mainproc] [Main_OnInitDialog]    Config 
loaded.
[1/27/2010] [11:38:29.815] [05920]  [mainproc] [Main_OnInitDialog]    checking 
if
previous-release updates are required
[1/27/2010] [11:38:29.815] [05920]  [mainproc] [PerformPrevRelUpdates]    
Checking
for old peerguardian-hosted lists, and updating any found to 
iblocklist.com-hosted ones
[1/27/2010] [11:38:29.815] [05920]  [mainproc] [Main_OnInitDialog]    resetting 
g_filter
[1/27/2010] [11:38:29.815] [05920]  [driver] [load(2)]   preparing to load 
driver -
name: [IpFilterDriver], file: [System32\Drivers\IpFltDrv.sys]
[1/27/2010] [11:38:29.815] [05920]  [driver] [load(3)]   loading driver - name:
[IpFilterDriver], file: [System32\Drivers\IpFltDrv.sys], devfile: 
[\\.\IpFilterDriver]
[1/27/2010] [11:38:29.815] [05920]  [driver] [load(3)]    driver not currently
installed as service
[1/27/2010] [11:38:29.815] [05920]  [driver] [load(3)]    service name:
[System32\DRIVERS\ipfltdrv.sys], file name: [System32\Drivers\IpFltDrv.sys]
[1/27/2010] [11:38:29.831] [05920]  [driver] [load(3)]    Driver-service NOT 
running!
[1/27/2010] [11:38:29.831] [05920]  [driver] [load(3)]    - service state: [1]
[1/27/2010] [11:38:29.831] [05920]  [driver] [start]    starting driver
[1/27/2010] [11:38:29.847] [05920]  [driver] [start]   getting handle to driver 
-
devfile: [\\.\IpFilterDriver]
[1/27/2010] [11:38:29.847] [05920]  [driver] [start]  * Error:  ERROR: 
CreateFile
[1/27/2010] [11:38:29.847] [05920]  [driver] [start]    - err:[2], desc:[The 
system
cannot find the file specified.

]
[1/27/2010] [11:38:29.862] [05920]  [driver] [close]    closing driver
[1/27/2010] [11:38:29.862] [05920]  [driver] [stop]    Tried to stop driver, 
but it
is not started
[1/27/2010] [11:38:29.862] [05920]  [driver] [close]    unloaded driver
[1/27/2010] [11:38:29.862] [05920]  [driver] [close]    Tried to close driver, 
but it
wasn't loaded.

what now?

Original comment by johan.sn...@gmail.com on 27 Jan 2010 at 10:45