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.
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.
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.
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
Copyright 2008
by Paul Bissex
and E-Scribe New Media
(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.
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.
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 ;)
Comments use Markdown syntax. Your comment will not appear until approved, which may take a few hours or more. Spammers will be torpedoed.
The iPhone keyboard doesn't suck
Python one-liner of the day
7 comments
How not to advocate via Google Code
2 comments
99 problems
3 comments
bitmonk
Obscure "svn mv" problem solved
98 days ago
Charlie
Book news: Rough Cuts and Amazon
99 days ago
Simon Griffee
Django Mercurial mirror tweaks
116 days ago
Jason Calleiro
From PHP to Python
117 days ago
Yuli
dpaste.com
120 days ago
bruce
Neat Python hack: infix operators
124 days ago
David Reynolds
The original Lego Star Wars
132 days ago
At least 38476 pieces of comment spam killed since January 12th. Thanks are mostly due to Akismet.
There is something like that. It's called a "bookmark".
:-)