Value does not fall within the expected range

Feb 11, 2011 at 9:33 AM

Hi,

I'm using ExposeSnapshot() to mount the snapshot to a network share.

However, if there is any problem with VSS, when I run my backup application it raises the following error while calling ExposeSnapshot()  :
"Value does not fall within the expected range"
The only way to get rid of this error is to reboot the server (Windows 2003).

The first time I've seen this error is after a deletion of VSS snapshots because of too much IO:
Log error VolSnapID 25:
The shadow copies of volume C: were deleted because the shadow copy storage could not grow in time. Consider reducing the IO load on the system or choose a shadow copy storage volume that is not being shadow copied.

Is there a way to get AlphaVSS work again in this cases, without having to restart the server?

Today I've got the problem again. This time, I think it is due to a cancellation while creating a VSS Snapshot.

Can you help me to get a better "recovery process" without having to reboot ?

Is this problem caused by the Microsoft implementation of VSS, or AlphaVSS ?

Thanks!

Coordinator
Feb 11, 2011 at 10:47 AM

Unfortunately I'm not quite sure know what is causing the problem. I've seen the problem where all VSS operations seems to stop working with the above mentioned error though, and usually it is enough to kill the VSSVC.exe process using the task manager, saving you from a reboot. (It is automatically restarted when it is needed usually). So perhaps this would at least save you from the reboots?

Regards,

Peter

Feb 11, 2011 at 12:33 PM

Actually, the process "vssvc.exe" was not running.

I only had "vsnapvss" running, which is the StorageCraft ShadowCopy Provider.
So I stopped this service to be sure, and then started the "Microsoft Software Shadow Copy Provider".

But I still get the same error from alphavss. No luck!

Any other idea?

Feb 11, 2011 at 1:14 PM

Just in case, I've just applied the latest VSS Rollup from Microsoft...
http://support.microsoft.com/kb/940349/en-us

It asks me to reboot... However, If I reboot I won't be able to do any tests (because everything will be ok after rebooting!)
Unless this problem is solved by this update?!

Any idea before I reboot ?

Thank you!

Feb 11, 2011 at 2:12 PM

With VSHADOW, I am able to create and explose a snapshot!

So, It seems to be a problem with AlphaVSS.

Is there any persistent library to reset somewhere?

Coordinator
Feb 11, 2011 at 5:48 PM

It may of course be a problem with AlphaVSS, or there is a problem with your code the way you use it. Is there something you aren't disposing somewhere perhaps? Maybe you could post a minimal code sample that reproduces the issue?

Feb 14, 2011 at 10:21 AM

I finally rebooted the server, but I still get the error "Value does not fall within the expected range"!
Ok decaf, I will try and post a minimal code sample!

Feb 14, 2011 at 7:38 PM

        Dim globalvssImplement As IVssImplementation
        Dim globalVSS As IVssBackupComponents
        Dim globalSnapshotSet As Guid
        Dim snapshot As Gui

        globalvssImplement = VssUtils.LoadImplementation()
        globalVSS = globalvssImplement.CreateVssBackupComponents
        globalVSS.InitializeForBackup(Nothing)
        globalVSS.SetBackupState(False, True, VssBackupType.Full, False)
        globalVSS.SetContext(VssSnapshotContext.NasRollback)

        Try
            globalSnapshotSet = globalVSS.StartSnapshotSet()
            snapshot = globalVSS.AddToSnapshotSet("C:\", Guid.Empty)
            Using async As Alphaleonis.Win32.Vss.IVssAsync = globalVSS.DoSnapshotSet
                async.Wait()
            End Using

        Catch e As Exception
            Console.WriteLine("VSS error (createSnapshot) : " & e.Message)
            globalVSS.DeleteSnapshotSet(globalSnapshotSet, True)
            globalVSS.Dispose()
            Environment.Exit(1)
        End Try

        'Mount Snapshot
        ' -------------------------
        Dim volumeMountPoint, exposedShadow As String
       
        Try

            volumeMountPoint = "testShadowC$"
            exposedShadow = "\\127.0.0.1\" & globalVSS.ExposeSnapshot(snapshot, "\", VssVolumeSnapshotAttributes.ExposedRemotely, volumeMountPoint)

        Catch e As Exception
            Console.WriteLine("VSS error (mountSnapshot) : " & e.Message)
            globalVSS.DeleteSnapshotSet(globalSnapshotSet, True)
            globalVSS.Dispose()
            Environment.Exit(1)
        End Try

Feb 14, 2011 at 7:39 PM

No problem exposing D:\
There is only a problem exposing C:\

Very strange!

Coordinator
Feb 14, 2011 at 7:57 PM

I would suggest putting your globalVSS in a "using" statement to ensure proper disposal of it.

Although I don't think this should cause these problems either.

There may be more to it that I'm not seeing right now, some steps that perhaps VSHADOW does that your code doesn't do?

I'm working on providing a sample for the final version of AlphaVSS which will provide a subset of the VSHADOW operation but unfortunately my time is limited and progress is quite slow...

I will try to reproduce your problem using the above code in a Win2003 environment when I get the time, but it may take a while unfortunately :(

Please keep me posted on any progress regarding this issue.

 

Regards,

Peter.

Feb 15, 2011 at 6:02 PM

> I would suggest putting your globalVSS in a "using" statement to ensure proper disposal of it.
Ok. Can you give me an example about using this statement on my code?

> There may be more to it that I'm not seeing right now, some steps that perhaps VSHADOW does that your code doesn't do?
With Vshadow, I'm only doing:
cd "C:\Program Files\Microsoft\VSSSDK72\TestApps\vshadow\bin\debug-server"
vshadow -p -nw c:
vshadow -p -er={snapshot_id},vshadowC$

> I will try to reproduce your problem using the above code in a Win2003 environment when I get the time, but it may take a while unfortunately :(
I don't think you will be able to reproduce this problem on your system... because it was working fine most of the time!
Now, the chance we have is that the problem is reproductible (at least on my system)!

Feb 15, 2011 at 6:05 PM

I tried to test with the alphavss debug dlls, but I get this error message when I replace the standard dlls :

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembl
y 'AlphaVSS.Win2003.Debug.x86, Version=1.0.9156.0, Culture=neutral, PublicKeyTok
en=3033cf2dbd31cad3' or one of its dependencies. Cette application n'a pas pu dé
marrer car la configuration de l'application est incorrecte. Réinstaller l'appli
cation pourrait résoudre ce problème. (Exception from HRESULT: 0x800736B1)
File name: 'AlphaVSS.Win2003.Debug.x86, Version=1.0.9156.0, Culture=neutral, Pub
licKeyToken=3033cf2dbd31cad3' ---> System.Runtime.InteropServices.COMException (
0x800736B1): Cette application n'a pas pu démarrer car la configuration de l'app
lication est incorrecte. Réinstaller l'application pourrait résoudre ce problème
. (Exception from HRESULT: 0x800736B1)
   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boo
lean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, E
vidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Bool
ean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence
 assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at Alphaleonis.Win32.Vss.VssUtils.LoadImplementation()
   at testvss.Module1.Main()

Feb 17, 2011 at 12:43 PM

Decaf, any idea ?
Thank you!

Coordinator
Feb 20, 2011 at 8:45 AM

No, sorry. Seems some dll on which something depends is missing, but I've got no idea what that may be unfortunately.

Sep 2, 2011 at 5:10 PM

Hi Peter,

How are you?

I’m back with the same problem, even with the new libraries (v1.2-beta) with .NET 4.0!

However, I’ve now managed to run my program with your “debug” dlls!

But I don’t see anything more than the standard dlls…

Is there a way to produce a debug output from the alphavss dlls?

Best regards,

Philippe Ferreira


De : decaf [email removed]
Envoyé : dimanche 20 février 2011 09:46
À : pf@bcsys.fr
Objet : Re: Value does not fall within the expected range [alphavss:245589]

From: decaf

No, sorry. Seems some dll on which something depends is missing, but I've got no idea what that may be unfortunately.



__________ Information provenant d'ESET NOD32 Antivirus, version de la base des signatures de virus 6430 (20110902) __________

Le message a été vérifié par ESET NOD32 Antivirus.

http://www.eset.com
Coordinator
Sep 7, 2011 at 8:24 PM

There is no particular debug output produced by AlphaVSS if that's what you're asking. Your best bet is to run them with the debugger and see if you can figure something out I think.

Sep 9, 2011 at 2:04 PM

How can I run the debugger against the AlphaVSS DLLs?

Do I have to get the source?


De : decaf [email removed]
Envoyé : mercredi 7 septembre 2011 21:24
À : pf@bcsys.fr
Objet : Re: Value does not fall within the expected range [alphavss:245589]

From: decaf

There is no particular debug output produced by AlphaVSS if that's what you're asking. Your best bet is to run them with the debugger and see if you can figure something out I think.



__________ Information provenant d'ESET NOD32 Antivirus, version de la base des signatures de virus 6449 (20110909) __________

Le message a été vérifié par ESET NOD32 Antivirus.

http://www.eset.com
Sep 23, 2011 at 7:34 PM

Do you now what? I just solved this very old problem!!

I expose my persistent snapshots via a network share.

However, this network share was still bound to an old snapshot!

The snapshot was deleted several months ago, but not the network share. Very strange!

So, when VSS says “Value does not fall within the expected range”, chances are that the network share already exist!

Best regards,

Philippe


De : decaf [email removed]
Envoyé : mercredi 7 septembre 2011 21:24
À : pf@bcsys.fr
Objet : Re: Value does not fall within the expected range [alphavss:245589]

From: decaf

There is no particular debug output produced by AlphaVSS if that's what you're asking. Your best bet is to run them with the debugger and see if you can figure something out I think.



__________ Information provenant d'ESET NOD32 Antivirus, version de la base des signatures de virus 6488 (20110923) __________

Le message a été vérifié par ESET NOD32 Antivirus.

http://www.eset.com