E-Scribe News : a programmer’s blog

About Me

PBX My name is Paul Bissex, and e-scribe.com is my consulting business. I build web applications using as much open source software as possible. From September to June I teach web design and other important non-photographic professional skills to photographers. In the '90s I wrote technology commentary and reviews for magazines, newspapers, and web publications, including Wired, Salon.com, FamilyPC, the late lamented Web Review, and the Chicago Tribune. Feel free to email me.

Book Project

I'm co-authoring a book, "Python Web Development with Django", with Jeff Forcier and Wesley Chun. It will be published by Prentice Hall in July 2008, but is available for pre-ordering on Amazon now.

Colophon

This site is built on a fresh trunk checkout of Django, running on Python 2.5.1, served by Apache and mod_python. The database is SQLite. The operating system is FreeBSD, on a VPS hosted at Johncompanies.com. Comment-spam protection by Akismet. Vintage topo imagery from the Maptech archive.

Pile o'Tags

Stuff I Use

Akismet, del.icio.us, Django, dpaste.com, Emacs, FreeBSD, Freenode, jQuery, LaunchBar, MacPorts, Markdown, Mercurial, OS X, Postfix, Python, SQLite, Subversion, TextMate, Trac, Ubuntu Linux, wmii

A Django site.
(Finally!)

Copyright 2008
by Paul Bissex
and E-Scribe New Media

If all else fails, force it

(There's got to be a name for blog posts that you make just so you'll be able to remember something later -- or so somebody who is banging their head against a problem you just solved can find your solution via Google magic. This is one of those posts.)

A while back I started getting bizarre errors when using Python with MySQL. They looked like this:

python in free(): warning: junk pointer, too high to make sense

It didn't make sense to me either! Tech support for my VPS and copious Google searching didn't turn up anything I could use.

Because most of the sites on this server are now using SQLite instead of MySQL, this wasn't a particularly critical problem -- especially since the front-ends continued to work fine for the most part.

The likely culprits were, of course: Python, MySQL, or the glue holding them together (the MySQLdb extension). All three were at the latest versions available via FreeBSD ports, and I stick with ports unless absolutely compelled to do otherwise. And other stuff on the server depended on MySQL or Python separately, so I was reluctant to mess with them. There I sat.

Today it occurred to me that it would be a cheap experiment to force a reinstall of the least critical of the three, MySQLdb. So:

sudo portupgrade --force databases/py-MySQLdb

And that was it. Everything works dandy now.

Tuesday, October 17th, 2006
+ + +
3 comments

Comment from Tim Keating, 2 days later

There is something like that. It's called a "bookmark".

:-)

Comment from Matt Rose, 2 days later

Yeah, but then nobody else gets to benefit from your revelation. I have a blog entry from 2001 that still gets hits when somebody wants to run an IMAP server without TLS on debian. Plus, when you put it on your blog, you know where to find it.

Comment from Morris, 10 weeks later

I would guess that this is a warning that a pointer has been corrupted. A pointer to memory above allocated memory is a bad pointer, which is detected when free() is called, and that is probably what "too high to make sense" means. A search on that phrase finds the same error for httpd, awk, perl, gdb so it is probably a message from the kernel (BSD?).

Of course, working out what is causing memory corruption is often painful. The upgrade may have had a fix, or it may have just moved the corruption so that it no longer affected you ;)

Post a comment

Comments use Markdown syntax. Your comment will not appear until approved, which may take a few hours or more. Spammers will be torpedoed.


(Will not be shared)

(Optional)