Archive for 2004

halloween costume cuteness

Wednesday, September 29th, 2004

Halloween is only a month away, which means it’s time to find some overly cute costumes for your kids if you haven’t already. The folks at babystyle.com have got some absolutely adorable costumes.

Check them out:

Dilbert the Dragon, $11.99
Dilbert the Dragon
$24.00 $11.99
Take the Bunny and Run, $24.00
Take the Bunny and Run
$24.00
Out of stock


www.babystyle.com

nsingres is now official

Monday, September 27th, 2004

It’s official: I just committed the nsingres module to SourceForge CVS. nsingres is an internal DB driver for AOLserver.

Source tarball is available here: nsingres-0.1-src.tar.gz

encodings and character sets

Monday, September 27th, 2004

Janine Sisk at Furfly has been working hard to migrate her customers to the latest AOLserver 4.0.x release, which has been helping the project find bugs and answer migration questions. This has been incredibly helpful and the most recent issue involved encoding and character set settings.

Her problem, in a nutshell, is that users are entering data into the system originally authored in Microsoft Word which uses the Microsoft Windows Codepage 1252 character set which contains codepoints for things like en-dashes (0×96 = U+2013), ellipses (0×85 = U+2026), and some other elements. However, if you treat CP1252-encoded data as UTF-8 (RFC 2279), it won’t render correctly: all bytes in the range of 0×80-0xFF, which contains en-dashes and ellipses, are encoded using two bytes instead of just one. In this particular case, the en-dashes become transcoded from 0×96 to the sequence 0xC2 0×96. The 0xC2 looks like this — Â or 쎂 — depending on which one your browser rendered correctly. You may recognize it and wonder how it got in your own pages and how to remove it, too.

For Janine, her solution was to instruct AOLserver to use the ISO-8859-1 character set as the output character set, which would mean the inputs by the users originally in CP1252 would get output from the server as ISO-8859-1 which is a close enough match, I guess. The configuration might look like this:

ns_section "ns/parameters"

ns_param OutputCharset iso-8859-1

I’m not sure what she has the other related encoding and character set settings set to, but I’ve asked and hopefully will find out and update this entry with the details.

who’s your daddy?

Tuesday, September 21st, 2004

I’m a big fan of Steve Buscemi, but this morning I saw something very disturbing on Google News … a picture of Macaulay Culkin.

Now, in and of itself, that’s not very scary. What’s scary is the double-take I did when I first saw the picture. I thought to myself, “Boy, that must be a really young picture of Steve Buscemi …” until I realized it wasn’t him! See for yourself:

Macaulay CulkinSteve Buscemi

For appropriate photo credit, here’s the original article where Macaulay gets smacked down for dope posession and the picture of Steve.

Just makes you wonder … is Macaulay actually Steve’s love-child? Hmm …

Update: Alex at Martini Republic beat me to it by two days … damn! Great minds think alike, or fools rarely differ.

hanging on by a thread

Monday, September 20th, 2004

I’ve been doing a lot of core dump analysis at work on Solaris, digging deep into the bag of coder kung-fu using adb, which is a debugger that is not for the faint of heart.

So, trying to help someone troubleshoot a problem with AOLserver on Linux, I asked the simple question of “did it drop a core file”? The answer was, “No, it didn’t.” That prompts the next question, “Did you set ulimit -c unlimited?” The affirmative answer surprised me: how is it not dropping a core file? Ahh, that’s when it occurred to me: Linux has had issues with threads (same info, more polished) for a long time now. So, I decided to do some hacking on my own Debian Linux box running my own hand-compiled 2.6.7 kernel.

Apparently, there are some kernel patches to implement multithreaded core dumps which suggests that the patches were merged into the 2.5.47 kernel. So, why isn’t AOLserver writing a core file when it segfaults?

After making dinner and putting the kids to bed, I thought about it and wrote a little test program that starts a thread then aborts in the thread. It wrote out a core file just fine! Then it dawned on me: AOLserver does a setuid to drop root privileges — Linux, by default, won’t write a core file out if the process has changed uid/euid. Figuring I wasn’t the first person to want Linux to behave like every other Unix out there, I found my answer in the unofficial comp.os.linux.development.* FAQ: How can I make a suid executable dump core? Making the change in nsd/nsmain.c, adding the prctl(PR_SET_DUMPABLE) call, I can now get AOLserver to dump a core file on Linux. Yay.

I’ve just filed SF Bug #1031599, attached the diff’s and committed the change.

While this doesn’t solve the original problem of why this person’s AOLserver is crashing, at least now I might be able to get a core file to look at …