Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#6437 closed defect (fixed)

Memory Errors

Reported by: alexbcoles@… Owned by: Alec Thomas
Priority: normal Milestone: 0.11
Component: general Version: devel
Severity: normal Keywords: stability, memory
Cc: ilias@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

After a period of use, I am getting Memory Errors running TRAC as tracd. This is tough to reproduce, because it only seems to happen sporadically. It seems though (anecdotally) that extensive browsing through the SVN repository seems to cause this to happen more often.

Traceback (most recent call last):
  File "/users/home/alexbcoles/python/lib/python2.4/site-packages/Trac-0.11dev_r6265-py2.4.egg/trac/web/api.py", line 341, in send_error
    'text/html')
  File "/users/home/alexbcoles/python/lib/python2.4/site-packages/Trac-0.11dev_r6265-py2.4.egg/trac/web/chrome.py", line 590, in render_template
    data = self.populate_data(req, data)
  File "/users/home/alexbcoles/python/lib/python2.4/site-packages/Trac-0.11dev_r6265-py2.4.egg/trac/web/chrome.py", line 498, in populate_data
    d['chrome'].update(req.chrome)
  File "/users/home/alexbcoles/python/lib/python2.4/site-packages/Trac-0.11dev_r6265-py2.4.egg/trac/web/api.py", line 170, in __getattr__
    value = self.callbacks[name](self)
  File "/users/home/alexbcoles/python/lib/python2.4/site-packages/Trac-0.11dev_r6265-py2.4.egg/trac/util/compat.py", line 129, in newfunc
    return func_(*(args + fargs), **dict(kwargs, **fkwargs))
  File "/users/home/alexbcoles/python/lib/python2.4/site-packages/Trac-0.11dev_r6265-py2.4.egg/trac/web/chrome.py", line 377, in prepare_request
    for category, name, text in contributor.get_navigation_items(req):
  File "/users/home/alexbcoles/python/lib/python2.4/site-packages/Trac-0.11dev_r6265-py2.4.egg/trac/wiki/web_ui.py", line 78, in get_navigation_items
    if 'WIKI_VIEW' in req.perm('wiki'):
  File "/users/home/alexbcoles/python/lib/python2.4/site-packages/Trac-0.11dev_r6265-py2.4.egg/trac/perm.py", line 519, in has_permission
    return self._has_permission(action, resource)
  File "/users/home/alexbcoles/python/lib/python2.4/site-packages/Trac-0.11dev_r6265-py2.4.egg/trac/perm.py", line 532, in _has_permission
    self._cache[key] = decision
MemoryError

Attachments (0)

Change History (11)

comment:1 by alexbcoles@…, 16 years ago

I forgot to attribute this bug to myself.

comment:2 by Alec Thomas, 16 years ago

Reporter: changed from anonymous to alexbcoles@…

This is strange, as the permission cache (that is triggering this) is a transient object with a lifetime of a single request. Also, the new permission system isn't currently being used for the repository subsystem. It's possible that there's a leak somewhere that's causing this.

Can you give us some more information? How much memory does your system have? What SVN bindings are you using?

comment:3 by Alec Thomas, 16 years ago

Keywords: needinfo added
Owner: changed from Jonas Borgström to Alec Thomas

comment:4 by alexbcoles@…, 16 years ago

I am running this on a shared host, rather than my own box. As such, its difficult to give you a figure on the available memory - only the memory I am using for a user process.

The server is running Solaris 10. Version of Python is 2.4.4.

As I don't have root access, I am using my own Python and PYTHONPATH, created with the aid of virtual-python.py. Although I am not root user, I am using my own Python copied over with virtual-python.py.

Which version of the SVN bindings? I am using my host's libsvn and svn (symbollically linked from /usr/local to my home directory) in place, built for my host's version of Subversion - 1.4.4.

comment:5 by Christian Boos, 16 years ago

Are you using a scoped repository? If so, it may be related to #5213.

comment:6 by alexbcoles@…, 16 years ago

No, I am using one repository - the whole repository (i.e. the scope is /, the root of the repository) - per Trac project.

comment:7 by Christian Boos, 16 years ago

See #G166 - for now try to remove the _speedups.so C extension and see if that improves your memory usage.

comment:8 by Christian Boos, 16 years ago

Milestone: 0.110.11.1

#G166 fix helped and after that, I've also tested intensive "log" and browsing queries… the memory usage, while big, stabilizes.

So I think it's safe to say that at least in the general case, there's no leak. The occasional memory error could be trapped more cleanly and presented as such instead of showing a random backtrace.

in reply to:  8 comment:9 by Christian Boos, 16 years ago

Keywords: needinfo removed
Milestone: 0.11.10.11
Resolution: fixed
Status: newclosed

Follow-up to cboos:

The occasional memory error could be trapped more cleanly and presented as such instead of showing a random backtrace.

Fixed in r6327.

comment:10 by ilias@…, 16 years ago

Cc: ilias@… added

comment:11 by ilias@…, 16 years ago

can you provide a piece of code which can be used to detect if there's a leak?

I am not sure if I can use the code mentioned in genshi:#166

see #6549

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Alec Thomas.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Alec Thomas 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.