mcxxx / cassia

Automatically exported from code.google.com/p/cassia
0 stars 0 forks source link

Not a valid FileTime exception under load #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Run some programs that put the Terminal Server service under load, like a 
loop that constantly prints the number of sessions on the server. You 
eventually get an exception like this (v1 stack trace; v2 is similar):

Not a valid Win32 FileTime.
Parameter name: fileTime
   at System.DateTime.FromFileTimeUtc(Int64 fileTime)
   at System.DateTime.FromFileTime(Int64 fileTime)
   at Cassia.TerminalServicesManager.FileTimeToDateTime(FILETIME ft) in 
c:\Projects\Cassia\Source\Cassia\TerminalServicesManager.cs:line 87
   at Cassia.TerminalServicesManager.GetSessionInfo(IntPtr server, UInt32 
sessionId) in 
c:\Projects\Cassia\Source\Cassia\TerminalServicesManager.cs:line 152
   at Cassia.TerminalServicesManager.GetSessions(String serverName) in 
c:\Projects\Cassia\Source\Cassia\TerminalServicesManager.cs:line 60

The error is reported while fetching session 2 of 3 (either the listening 
session or the console session, probably).

Original issue reported on code.google.com by danports on 4 Aug 2009 at 1:00

GoogleCodeExporter commented 9 years ago
Not sure if this is still relevant since we are avoiding usage of 
DateTime.FromFileTime.

Original comment by danports on 28 Oct 2009 at 11:37

GoogleCodeExporter commented 9 years ago
I have just started using Cassia and have run into this issue myself. When this
happens should I retry the operation or remove the static readonly from my
ITerminalServicesManager instance and dispose of the current one and create a 
new
one? Or is there a fix for this?

Original comment by bitma...@gmail.com on 26 Dec 2009 at 3:28

GoogleCodeExporter commented 9 years ago
Under what version of Windows are you seeing this problem appear? Is the 
machine 
under load at the time?

I have made some changes on the trunk that should avoid this problem on Windows 
Server 2003, and the trunk is quite stable, so if you'd like, you can grab the 
latest 
build from the build server (http://teamcity.codebetter.com/project.html?
projectId=project51 -- use the artifacts link) and give it a shot.

If you do get the exception, retrying the operation should not cause a problem.

Original comment by danports on 29 Dec 2009 at 1:16

GoogleCodeExporter commented 9 years ago
hi
for the domain admin Windows 2003 is good. the user with the privilege have 
error

Original comment by tomaszpa...@gmail.com on 31 May 2010 at 10:38

GoogleCodeExporter commented 9 years ago
now from teamcity last project: 
"Year, Month and day parameters deribe an un-representable DateTime"

Original comment by tomaszpa...@gmail.com on 31 May 2010 at 10:45

GoogleCodeExporter commented 9 years ago
Tomasz, a few questions:
- What property are you trying to access when this exception is thrown?
- What is the full version number of the Cassia assembly you are using (e.g. 
2.0.0.60)?
- What OS are you running your code on?
- If you are using GetRemoteServer(), what OS is the remote machine running?
- Are you running the code as an administrator or as a limited user?

Original comment by danports on 31 May 2010 at 2:19

GoogleCodeExporter commented 9 years ago
 For Each sesja As Cassia.ITerminalServicesSession In X.GetSessions()

I can't capture this error. Error comes from your library.
This error occurs when some disconnected sessions. I guess some date in the 
strange
mode. 
I used different versions of cassia (last 2.0.0.60). I use only windows 2003 
serwer
Polish edition.
code as an administrator=OK, limited user(only sometimes)=Error

Original comment by tomaszpa...@gmail.com on 7 Jun 2010 at 9:55

GoogleCodeExporter commented 9 years ago
Tomasz: Have you tried the latest build from the build server (currently 
2.1.0.108; see 
http://teamcity.codebetter.com/project.html?projectId=project51 and click the 
artifacts 
link)?

Do you have the full stack trace for the exception? (The GetSessions() call 
cannot 
throw this exception if you are using the latest build.)

I'll try reproducing this problem as a limited user on Server 2003.

Original comment by danports on 7 Jun 2010 at 1:18

GoogleCodeExporter commented 9 years ago
Hello,

older threat, but i het same error on windows 2003 terminalserver (german). 
Are there any news? I am using latest build from build server 2.1.0.119

Regards

Marc

Original comment by m.moenni...@kkrn.de on 6 Feb 2012 at 11:34

GoogleCodeExporter commented 9 years ago
Marc: Can you provide a stack trace?

Original comment by danports on 6 Feb 2012 at 2:05

GoogleCodeExporter commented 9 years ago
I'm fairly certain this was already fixed on trunk. I'll check once more before 
closing the issue.

Original comment by danports on 15 Feb 2012 at 4:33