[Mono-bugs] [Bug 81140][Wis] Changed - [2.0] Session_end event is raised right after Session_start event

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Apr 16 15:19:53 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by juraj at hotfeet.ch.

http://bugzilla.ximian.com/show_bug.cgi?id=81140

--- shadow/81140	2007-03-20 11:04:21.000000000 -0500
+++ shadow/81140.tmp.3079	2007-04-16 15:19:52.000000000 -0400
@@ -48,6 +48,64 @@
 All test files.
 
 
 ------- Additional Comments From dban at dako.ro  2007-03-20 11:04 -------
 The Session_end event is triggered again and again but the session
 never ends.
+
+------- Additional Comments From juraj at hotfeet.ch  2007-04-16 15:19 -------
+I had a look at the problem and found its source. This is a stack
+trace from inside Session_End:
+
+   at ASP.global_asax.Session_End ()
+   at System.Reflection.MonoMethod.InternalInvoke ()
+   at System.Reflection.MonoMethod.InternalInvoke ()
+   at System.Reflection.MonoMethod.Invoke ()
+   at System.Reflection.MethodBase.Invoke ()
+   at System.Web.HttpApplicationFactory.InvokeSessionEnd ()
+   at System.Web.SessionState.SessionStateUtility.RaiseSessionEnd ()
+   at System.Web.SessionState.SessionStateModule.OnSessionExpired ()
+   at System.MulticastDelegate.invoke_void_string_SessionStateStoreData ()
+   at System.Web.SessionState.SessionInProcHandler.OnSessionRemoved ()
+   at
+System.MulticastDelegate.invoke_void_string_object_CacheItemRemovedReason
+()
+   at System.Web.Caching.Cache.Remove ()
+   at System.Web.Caching.Cache.Remove ()
+   at System.Web.SessionState.SessionInProcHandler.ResetItemTimeout ()
+   at System.Web.SessionState.SessionStateModule.OnReleaseRequestState ()
+   at System.MulticastDelegate.invoke_void_object_EventArgs ()
+   at System.Web.HttpApplication+<>c__CompilerGenerated1.MoveNext ()
+   at System.Web.HttpApplication+<>c__CompilerGenerated2.MoveNext ()
+   at System.Web.HttpApplication.Tick ()
+   at System.Web.HttpApplication.Start ()
+   at
+System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest
+()
+   at System.Web.HttpRuntime.RealProcessRequest ()
+   at System.Web.HttpRuntime.ProcessRequest ()
+   at Mono.WebServer.MonoWorkerRequest.ProcessRequest ()
+   at Mono.WebServer.BaseApplicationHost.ProcessRequest ()
+   at Mono.WebServer.XSPApplicationHost.ProcessRequest ()
+   at Mono.WebServer.XSPWorker.RunInternal ()
+   at System.MulticastDelegate.invoke_void_object ()
+
+
+The invocation of Session_End is triggered in
+SessionInProcHandler.ResetItemTimeout by calling Cache.Remove:
+
+...
+item.rwlock.AcquireWriterLock (lockAcquireTimeout);
+cache.Remove (CacheId);
+InsertSessionItem (item, item.timeout, CacheId);
+...
+
+The removal of the cache item results in the invocation of the
+delegate stored in its "OnRemoveCallback" field.
+
+
+The right thing to do would be to either
+a) update the cache item without removal and re-insertion (perhaps by
+adding an internal Cache.UpdateItem method?)
+or
+b) disable/deinstall the callback for the duration of removal and
+re-insertion


More information about the mono-bugs mailing list