
miroslav.sulc at startnet
Sep 16, 2009, 2:24 PM
Post #4 of 5
(403 views)
Permalink
|
i tried to debug the code through logging statements (while reloading page /browser) and found out, that the problem is in web/chrome.py in method def render_template(self, req, filename, data, content_type=None, fragment=False): on these lines (logging statements were added by me): try: buffer = cStringIO() self.log.debug('stream.render') stream.render(method, doctype=doctype, out=buffer) self.log.debug('stream.render.done') return buffer.getvalue().translate(_translate_nop, _invalid_control_chars) except Exception, e: self.log.debug('here') # restore what may be needed by the error template req.chrome['links'] = links req.chrome['scripts'] = scripts log output is this (i added some other log statements to trac the path): Trac[main] DEBUG: genshi Trac[main] DEBUG: other Trac[chrome] DEBUG: filename: browser.html method: xhtml Trac[chrome] DEBUG: <MarkupTemplate "browser.html"> (this is output of self.log.debug(template)) Trac[chrome] DEBUG: stream.render string 'stream.render' is logged but 'stream.render.done' is not logged nor string 'here' so i guess it crashes on stream.render() call. also, from other logging attempts, it seems to me that even just access to stream variable causes the seg fault (attempt to perform self.log.debug(stream) ended log output). stream seems to be instance of MarkupTemplate which seems to be part of genshi package, so i guess this call: stream = template.generate(**data) creates stream that crashes the app. any ideas what could be the cause that access to stream causes app crash? just to summarize: www-apps/trac-0.11.5 dev-python/genshi-0.5.1 dev-lang/python-2.6.2-r1 thx miroslav Miroslav Šulc napsal(a): > thx for answer, i tried what you suggest but the problem persists. i > also tried to compile python with -ggdb but that showed exactly the same > stack as without the debug flags so i'm not sure what's wrong. i am noob > wrt python and eclipse (i use netbeans) so i doubt i could manage to > debug trac remotely within short time and i cannot afford to spend on it > several hours or days. > > miroslav > > Olemis Lang napsal(a): > >> 2009/9/15 Miroslav Šulc <miroslav.sulc [at] startnet>: >> >> >>> hi, >>> >>> i have issues running some pages of trac, they simply do not load (empty >>> page displays in browser). i found out in apache log that the cause is >>> segmentation fault. here are the pages that cause seg fault: >>> /browser >>> /ticket/1 (any number) >>> /changeset/349%3Afd2a05fbaab3 (any changeset) >>> >>> >>> >> [...] >> >> >>> i also tried to debug tracd but it seems i miss debug info in python and >>> did not find a way how to turn it on: >>> >>> anyone has an idea why i get the segfaults and how to fix it? or at >>> least how to turn on debugging symbols for python so i could see the >>> cause in the stack? >>> >>> >>> >> try this one : >> >> - Disable trac.versioncontrol.* >> - Restart the server >> >> The only cause why I've experienced segfauls with Trac is >> py-svn-bindings. If the problem persists at least you know that you >> should look somewhere else ;o) >> >> Hint : You can debug Trac using PyDev + Eclipse ;o) >> >> >> > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-users [at] googlegroups To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
|