#8020 closed (fixed)
python process crashes when using sitemaps after [8088]
Reported by: | Boo | Owned by: | nobody |
---|---|---|---|
Component: | Contrib apps | Version: | dev |
Severity: | Keywords: | sitemap | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
When I go to http://example.com/sitemap.xml, python process crashes without any errors or core dumps.
Django-version: trunk after [8088] DB-backends: PostgreSQL or SQLite3 URLs in sitemap: less than 50000
Attachments (3)
Change History (18)
comment:1 by , 16 years ago
Description: | modified (diff) |
---|
comment:2 by , 16 years ago
I've added TestCase to repeat this problem.
I use Python-2.5.2, OS: FreeBSD and MacOSX.
I run development server and go to http://127.0.0.1:8000/sitemap.xml, and devserver crushes without any errors.
Boo:~/projects/testcase boo$ ./manage.py runserver Validating models... 0 errors found Django version 1.0-alpha-SVN-8138, using settings 'testcase.settings' Development server is running at http://127.0.0.1:8000/ Quit the server with CONTROL-C. Boo:~/projects/testcase boo$
comment:3 by , 16 years ago
Needs tests: | set |
---|
comment:4 by , 16 years ago
As long as I add "django.contrib.sitemaps" to INSTALLED_APPS the attached test case works fine for me: displaying the sitemap file without any sign of errors or crashing. I happen to be at changeset [8156] on python 2.5.2.
by , 16 years ago
Attachment: | sitemap-crash.diff added |
---|
fixes development server crash sitemaps framework
comment:6 by , 16 years ago
I can reproduce this on MacOSX with Python 2.5.1 The attached patch fixes the crash for me.
from django.contrib.sitemaps import Sitemap from blog.models import Post class PostSitemap(Sitemap): changefreq = "never" priority = 0.5 def items(self): return Post.objects.all() def lastmod(self, obj): return obj.pub_date
comment:7 by , 16 years ago
Has patch: | set |
---|---|
milestone: | → 1.0 beta |
Needs tests: | unset |
comment:9 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:10 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This change recurses for me on Mac OSX, I don't understand why it wouldn't infinitely recurse on all platforms???
Is it because I changed the Sitemap class to a new-style class?
get_urls gets the paginator entering _get_paginator
It already has the property paginator, so
it returns the property paginator which triggers a call to _get_paginator
as it already has ....
comment:11 by , 16 years ago
I believe reverting the fix and making Sitemaps new-style classes fixes the cause of this ticket.
comment:12 by , 16 years ago
milestone: | 1.0 beta → 1.0 |
---|
comment:13 by , 16 years ago
Triage Stage: | Ready for checkin → Accepted |
---|
comment:14 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
From your description, it sounds like you are running a version from earlier than [8231], where the infinite loop problem with referring to a bad attribute was fixed. So I'm going to reclose this.
If you are still seeing a problem on unmodified code that is up to date, please open a new ticket explaining how to repeat the problem.
There isn't really enough information here to work out what's going on or what the problem being reported is. You say "it crashed", but what do you mean? How can we replicate the problem? Do you have a small example that shows what is going on?
A problem that cannot be repeated cannot be fixed.