[Mono-bugs] [Bug 648193] xsp2 stops responding if application files are touched more than once (while busy)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Oct 22 08:55:09 EDT 2010


https://bugzilla.novell.com/show_bug.cgi?id=648193

https://bugzilla.novell.com/show_bug.cgi?id=648193#c4


--- Comment #4 from Marek Habersack <mhabersack at novell.com> 2010-10-22 14:55:08 CEST ---
Created an attachment (id=396549)
 --> (http://bugzilla.novell.com/attachment.cgi?id=396549)
An ASP.NET app to help repro the issue

The attached application is configured to restart its AppDomain after 2
recompiles of any files inside it and, using the scenario described by Tom, it
exits after an AppDomain unload because it fails to bind the listening socket
on XSP worker process restart, because the original listening socket is never
freed on AppDomain unload. In order to have everything in one place, here's how
to repro the issue:

- unpack the attachement above
- run xsp2 in the bug648193_repro directory
- open another terminal and run the following command in it:

  while true; do wget http://localhost:8080/default.aspx -O- ; done

- open one more terminal and run the following command in it:

  while true; do touch default.aspx ; sleep 1; done

- switch back to the terminal in which xsp2 is running and after a while you
will see output similar to:

----------- CUT ------------
Adding applications '/:.'...
Registering application:
    Host:          any
    Port:          any
    Virtual path:  /
    Physical path: /home/src/tmp/tests/Bugs/Bug648193/
Unloading AppDomain 1
System.Threading.ThreadAbortException: Thread was being aborted

Server stack trace: 
  at Mono.WebServer.XSP.Server.RealMain (System.String[] args, Boolean root,
IApplicationHost ext_apphost, Boolean quiet) [0x0082a] in
/home/src/build/mono/xsp/src/Mono.WebServer.XSP/main.cs:507 
  at (wrapper remoting-invoke-with-check) Mono.WebServer.XSP.Server:RealMain
(string[],bool,Mono.WebServer.IApplicationHost,bool)
  at (wrapper xdomain-dispatch) Mono.WebServer.XSP.Server:RealMain
(object,byte[]&,byte[]&,string[],bool,bool)

Exception rethrown at [0]: 

  at (wrapper xdomain-invoke) Mono.WebServer.XSP.Server:RealMain
(string[],bool,Mono.WebServer.IApplicationHost,bool)
  at (wrapper remoting-invoke-with-check) Mono.WebServer.XSP.Server:RealMain
(string[],bool,Mono.WebServer.IApplicationHost,bool)
  at Mono.WebServer.XSP.Server.RealMain (System.String[] args, Boolean root,
IApplicationHost ext_apphost, Boolean quiet) [0x006e1] in
/home/src/build/mono/xsp/src/Mono.WebServer.XSP/main.cs:458 
  at Mono.WebServer.XSP.Server.Main (System.String[] args) [0x00018] in
/home/src/build/mono/xsp/src/Mono.WebServer.XSP/main.cs:258 
Domain unloaded, restarting after sleep for 5s
Adding applications '/:.'...
Registering application:
    Host:          any
    Port:          any
    Virtual path:  /
    Physical path: /home/src/tmp/tests/Bugs/Bug648193/
System.Threading.ThreadAbortException: Thread was being aborted

Server stack trace: 
  at Mono.WebServer.XSP.Server.RealMain (System.String[] args, Boolean root,
IApplicationHost ext_apphost, Boolean quiet) [0x0082a] in
/home/src/build/mono/xsp/src/Mono.WebServer.XSP/main.cs:507 
  at (wrapper remoting-invoke-with-check) Mono.WebServer.XSP.Server:RealMain
(string[],bool,Mono.WebServer.IApplicationHost,bool)
  at (wrapper xdomain-dispatch) Mono.WebServer.XSP.Server:RealMain
(object,byte[]&,byte[]&,string[],bool,bool)

Exception rethrown at [0]: 

  at (wrapper xdomain-invoke) Mono.WebServer.XSP.Server:RealMain
(string[],bool,Mono.WebServer.IApplicationHost,bool)
  at (wrapper remoting-invoke-with-check) Mono.WebServer.XSP.Server:RealMain
(string[],bool,Mono.WebServer.IApplicationHost,bool)
  at Mono.WebServer.XSP.Server.RealMain (System.String[] args, Boolean root,
IApplicationHost ext_apphost, Boolean quiet) [0x006e1] in
/home/src/build/mono/xsp/src/Mono.WebServer.XSP/main.cs:458 
  at Mono.WebServer.XSP.Server.Main (System.String[] args) [0x00018] in
/home/src/build/mono/xsp/src/Mono.WebServer.XSP/main.cs:258 
Adding applications '/:.'...
Registering application:
    Host:          any
    Port:          any
    Virtual path:  /
    Physical path: /home/src/tmp/tests/Bugs/Bug648193/
Error: System.Net.Sockets.SocketException: Address already in use
  at System.Net.Sockets.Socket.Bind (System.Net.EndPoint local_end) [0x0006c]
in /home/src/build/mono/mono/mcs/class/System/System.Net.Sockets/Socket.cs:1196 
  at Mono.WebServer.XSPWebSource.CreateSocket () [0x00013] in
/home/src/build/mono/xsp/src/Mono.WebServer.XSP/XSPWebSource.cs:107 
  at Mono.WebServer.ApplicationServer.Start (Boolean bgThread) [0x00077] in
/home/src/build/mono/xsp/src/Mono.WebServer/ApplicationServer.cs:326 
  at Mono.WebServer.ApplicationServer.Start (Boolean bgThread, System.Exception
initialException) [0x00007] in
/home/src/build/mono/xsp/src/Mono.WebServer/ApplicationServer.cs:306 
  at (wrapper remoting-invoke-with-check)
Mono.WebServer.ApplicationServer:Start (bool,System.Exception)
  at Mono.WebServer.XSP.Server.RealMain (System.String[] args, Boolean root,
IApplicationHost ext_apphost, Boolean quiet) [0x00737] in
/home/src/build/mono/xsp/src/Mono.WebServer.XSP/main.cs:469 
----------- CUT ------------

Since the issue is timing-related, it may sometimes take a few AppDomain
reloads for this to happen, but it eventually does happen.

It appears that under some conditions, the finalizers aren't run and the socket
resources aren't freed.

Running the app with sgen causes it to work properly - finalizers are ran, but
after a while sgen segfaults (see the next attachment)

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list