1183: Viewing diff in review request causes traceback involving memcache

robwa******@gmai***** (Google Code) (Is this you? Claim this profile.)
March 21, 2011
387
What version are you running?

1.0 Final

What's the URL of the page containing the problem?

http://10.0.0.9/r/2/diff/#index_header

What steps will reproduce the problem?

1. Set up a Bazaar branch as the repository.

2. Create a diff using the windows command console, something to the 
effect of "bzr diff > foo.diff".

3. Create a review request in Review Board, uploading the diff file,
and using "/" as the base path (the diff was the same directory as the
branch/repo).

What is the expected output? What do you see instead?

I expect to see a diff. Instead I see a traceback.

What operating system are you using? What browser?

Windows XP 32bit SP2. Mozilla Firefox 3.0.11

Please provide any additional information below.

This is the actual output of the traceback:

Traceback (most recent call last):
  File
"/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0-py2.6.egg/reviewboard/diffviewer/views.py",
line 152, in view_diff
    interdiffset, highlighting, True)
  File
"/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0-py2.6.egg/reviewboard/diffviewer/diffutils.py",
line 623, in get_diff_files
    large_data=True)
  File
"/usr/local/lib/python2.6/dist-packages/Djblets-0.5-py2.6.egg/djblets/util/misc.py",
line 143, in cache_memoize
    data = lookup_callable()
  File
"/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0-py2.6.egg/reviewboard/diffviewer/diffutils.py",
line 622, in <lambda>
    enable_syntax_highlighting),
  File
"/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0-py2.6.egg/reviewboard/diffviewer/diffutils.py",
line 344, in get_chunks
    old = get_original_file(filediff)
  File
"/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0-py2.6.egg/reviewboard/diffviewer/diffutils.py",
line 251, in get_original_file
    large_data=True)[0]
  File
"/usr/local/lib/python2.6/dist-packages/Djblets-0.5-py2.6.egg/djblets/util/misc.py",
line 134, in cache_memoize
    if not force_overwrite and cache.has_key(key):
  File
"/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-py2.6.egg/django/core/cache/backends/base.py",
line 66, in has_key
    return self.get(key) is not None
  File
"/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-py2.6.egg/django/core/cache/backends/memcached.py",
line 25, in get
    val = self._cache.get(smart_str(key))
  File "/var/lib/python-support/python2.6/memcache.py", line 619, in get
    check_key(key)
  File "/var/lib/python-support/python2.6/memcache.py", line 888, in check_key
    raise Client.MemcachedKeyCharacterError, "Control characters not allowed"
MemcachedKeyCharacterError: Control characters not allowed
chipx86
#1 chipx86
Definitely never seen that before. Any chance you can provide us with a diff that
reproduces this problem for our unit tests?

Ideally, provide a dummy repository with some files, and a diff against that, so we
can bundle it and make sure this doesn't happen again. If it even is in our control.
  • +NeedInfo
#2 ksee.z*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Same problem here, but with git repo: http://patches.synfig.org/r/30/
(check http://patches.synfig.org/r/30/diff/3/ link).

Original diff is attached.
  • +
    diff --git a/synfig-studio/trunk/src/gtkmm/app.h b/synfig-studio/trunk/src/gtkmm/app.h
    --- a/synfig-studio/trunk/src/gtkmm/app.h
    +++ b/synfig-studio/trunk/src/gtkmm/app.h
     -204,6 +204,8 @@ public:
     	static int preferred_x_size;
     	static int preferred_y_size;
     	static synfig::String predefined_size;
    +	static synfig::String predefined_fps;
    +	static float preferred_fps;
     	/*
      -- ** -- S I G N A L S -------------------------------------------------------
     	*/
    diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp
    --- a/synfig-studio/trunk/src/gtkmm/app.cpp
    +++ b/synfig-studio/trunk/src/gtkmm/app.cpp
     -280,6 +280,8 @@ String studio::App::custom_filename_prefix(DEFAULT_FILENAME_PREFIX);
     int studio::App::preferred_x_size=480;
     int studio::App::preferred_y_size=270;
     String studio::App::predefined_size(DEFAULT_PREDEFINED_SIZE);
    +String studio::App::predefined_fps(DEFAULT_PREDEFINED_FPS);
    +float studio::App::preferred_fps=24.0;
     #ifdef USE_OPEN_FOR_URLS
     St
#3 ksee.z*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Ah, upgrade to 1.0 helped. Thanks.
david
#4 david
If 1.0 works, I'm gonna close this out. Please update if it's still a problem.
  • -NeedInfo
    +Fixed
#5 eero*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Got this problem with a fresh install of version 1.0.9. Did anyone ever find a solution for this?
chipx86
#6 chipx86
Can you give me the names of the files in the diff? Or at least, let me know if there's any non-alphanumeric characters in there (spaces, colons, non-English letters, etc.)
  • -Fixed
    +NeedInfo
#7 eero*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Here's the original diff...
  • +
    --- index.php	2010-09-27 12:33:30 +0000
    +++ index.php	2010-09-27 16:46:57 +0000
    @@ -1,4 +1,5 @@
     <?php
    +/* This has now been initialized as a Bazaar project */
     require_once("/data/www/devel/juicer/common/accesscontrol.php");
     require_once($inst_path."/common/docdef_xhtml11.html");
     ?>
david
#8 david
  • +Component-DiffViewer
#9 Karr*****@gmai***** (Google Code) (Is this you? Claim this profile.)
I'm seeing this same issue on ReviewBoard 1.5.


The diff (downloading the raw works fine):
https://fedorahosted.org/reviewboard/r/87/diff/raw/
(Note, this diff is only adding a blank line)

The error page:
https://fedorahosted.org/reviewboard/r/87/diff/#index_header


There are no unusual characters in the diff.

We are using ReviewBoard 1.5 on python 2.4.3 on Red Hat Enterprise Linux.
Bazaar is version 2.1.1
david
#10 david
  • -NeedInfo
    +New
david
#11 david