Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#1729 closed defect (fixed)

RSS reader causes Trac to crash

Reported by: PBruin Owned by: Christopher Lenz
Priority: highest Milestone: 0.9
Component: general Version: devel
Severity: critical Keywords:
Cc: peter.bruin@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

My Trac web site crashes 9 out of 10 times when starting my RSS Reader

  • Using RSS Owl as rss reader
  • Apache 2.0.52 mod_python 3.1.4 python 2.3.5 on Windows XP
  • Other websites on the same server will still work as per normal
  • Using Trac [1864]
  • When restarting Apache Windows XP comes with a crash message in libhttpd.dll or ntdll.dll
  • Apache log file does not contain much usefull info
    • [notice] Child 6708: Terminating 5 threads that failed to exit.

Is anybody else experiencing the same problem?

Attachments (0)

Change History (9)

comment:1 by PBruin, 19 years ago

Priority: highhighest
Severity: criticalblocker

Some more info. I am actually getting three RSS streams:
https://trac.myserver.com/trac/timeline?changeset=on&ticket=on&milestone=on&max=50&daysback=90&format=rss
https://trac.myserver.com/trac/timeline?changeset=on&ticket=on&ticket_details=on&milestone=on&wiki=on&max=100&daysback=7&format=rss
https://trac.myserver.com/trac/report/9?format=rss&USER=PBruin
It will cause trac to stop responding, the only way to continue is to restart Apache. Is there maybe some additional info that you would like me to provide?

comment:2 by Christian Boos, 19 years ago

You should also enable logging for Trac (see TracLogging) and look there for a stack trace.

Your problem is likely related to multithreaded issues… (see #1721)

In the meantime, you can setup a tracd server (with rev ≥ r1875, which has the multithreading disabled) and see if this still happens, with your RSS reader starting 3 simultaneous requests.

comment:3 by PBruin, 19 years ago

I used this configuration for logging

[logging]
log_file = trac.log
log_level = DEBUG
log_type = file

All I got was this debug info.

10:16:41 Trac[formatter] DEBUG: Executing Wiki macro TOC by provider <trac.wiki.macros.UserMacroProvider object at 0x04A0B3F0>
10:16:48 Trac[svn_fs] DEBUG: Opening subversion file-system at /repos/sw with scope /
10:16:48 Trac[cache] DEBUG: Checking whether sync with repository is needed
10:16:48 Trac[svn_fs] DEBUG: Closing subversion file-system at /repos/sw
10:16:52 Trac[svn_fs] DEBUG: Opening subversion file-system at /repos/sw with scope /
10:16:52 Trac[cache] DEBUG: Checking whether sync with repository is needed
10:16:52 Trac[svn_fs] DEBUG: Closing subversion file-system at /repos/sw
10:17:00 Trac[svn_fs] DEBUG: Opening subversion file-system at /repos/sw with scope /
10:17:00 Trac[cache] DEBUG: Checking whether sync with repository is needed
10:17:00 Trac[svn_fs] DEBUG: Opening subversion file-system at /repos/sw with scope /

What I did:

  • 10:16:41 Restart Apache
  • 10:16:48 Reload rss feed 1
  • 10:16:52 Reload rss feed 2
  • 10:17:00 Reload both feeds at the same time

comment:4 by Christian Boos, 19 years ago

This problem is related to #1401 for the cause (crash in SVN bindings) and to #1811 for the context (Apache server (2.0.54, worker)).

From your log:

...
10:17:00 Trac[svn_fs] DEBUG: Opening subversion file-system at /repos/sw with scope /
10:17:00 Trac[cache] DEBUG: Checking whether sync with repository is needed
10:17:00 Trac[svn_fs] DEBUG: Opening subversion file-system at /repos/sw with scope /

it seems that two subversion filesystem objects are opened at the same time, therefore by two different threads.

While theoretically this shouldn't be a problem since each call to the SVN API should be done with the GIL held, I suspect that this is not implemented in a very robust way in the bindings…

In the meantime, you should try to setup a server which doesn't make use of threads. As I don't use apache myself, I'm not sure the prefork model is available on Windows, but if so, you could try to use this model instead of mpm_winnt one, as it is probably the case.

comment:5 by PBruin, 19 years ago

Thanks for the tip. I have not used the prefork module as I cann't find much on it for Windows but after your tip have reduced the number of Threads per child from 250 to 1. This prevents the crashes and I will stick with this for the moment.

<IfModule mpm_winnt.c>
ThreadsPerChild 1
MaxRequestsPerChild  0
</IfModule>

comment:6 by Christian Boos, 19 years ago

Can you please try out the patch cmlenz wrote for #1811? (with ThreadsPerChild set higher than 1, of course)

comment:7 by PBruin, 19 years ago

Severity: blockernormal

Bingo,

Tried the patch with the ThreadsPerChild set back to 250 and it seems to work fine. I can hit the reload favarites button many times without a problem.

Thanks

comment:8 by Christopher Lenz, 19 years ago

Owner: changed from Jonas Borgström to Christopher Lenz
Severity: normalcritical
Status: newassigned

Thanks for testing the patch.

comment:9 by Christopher Lenz, 19 years ago

Resolution: fixed
Status: assignedclosed

This has hopefully been fixed in [2013]. Please reopen if you still encounter an error related to this.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.