Prefetch Technologies // Keeping your cache lines cozy

Archive

Posts in Web

HTTP Cookies

webJan 15, 2006 1 min read

The HTTP protocol was originally designed to be stateless protocol, which provides some serious hurdles for applications that need to be "session" aware. To address this issue, the HTTP protocol added a lovely thing called cookies. Cookies are sent to a client with the "Set-Cookie:" attribute in the HTTP header, and contain an expiration date and a path to indicate which parts of the URL namespace the cookie applies to. To see which cookies a server attempts to set, the curl utilities "-s" and "-D -" options can be used: Since your browser is a nice HTTP compliant entity, it will stores these cookies locally, and send them along with each HTTP request in a "Cookie:" header…

$ read more →

Root causing a bug in the Solaris display_stack_info() function

websolarisJan 14, 2006 4 min

I recently came across the Apache backtrace module, and thought it would be fun to get the module working with Solaris since it only supported Linux and FreeBSD. Since Solaris provides the printstack() function to view stack frames up to a specific point in time, I thought I would be able to add the following #ifdef/#endif in mod-backtrace's exception hook, and all would be swell: After adding the code and building the module, I quickly learned that the Solaris libc display_stack_info() function was causing a segmentation violation each time I sent a SIGSEGV to one of the child processes (see the irony here?): Since this issue was preventing my patch from working, I snagged Clay, and we started poking around the display_stack_info code to see what was wrong. The first item we checked was the instruction that cause the program to bomb: The program counter (%pc) indicates that the instruction at address 0xfef68814 is to blame. The instruction at address 0xfef68814 is attempting to add 8-bytes to the address stored in register %i4 (which is loaded two instructions earlier from %fp - 56), and load the value at that address into the register %i3…

$ read more →

Getting Apache backtraces with mod-backtrace

webJan 1, 2006 2 min

While perusing the web last week I came across Jeff Trawick's mod-backtrace module. This module can be used to print a stack backtrace each time Apache receives a critical signal (e.g., SIGSEGV, SIGBUS, etc.), and can be an invaluable resource for locating modules that are misbehaving. Since the module only worked with Linux and FreeBSD, I created a patch to allow it to work on Solaris systems. To install and configure mod-backtrace on a Solaris system, you will need to build Apache with the "--enable-exception-hook" option, download mod-backtrace.c from Jeff's website, apply the patch, and compile mod-backtrace with the apxs utility: Looks like a unified context diff…

$ read more →

I attached myself to myself

webDec 29, 2005 1 min

I came across my new favorite error message last night while debugging some issues with the Solaris printstack() function: You gotta love some geek humor. :)

$ read more →

Saving bandwidth with mod_deflate

webDec 23, 2005 1 min

While playing around with mod_deflate this week, I began to wonder how much bandwidth would be saved by enabling mod_deflate on a busy production site. To get a better idea of the bandwidth savings, I developed deflate-stats.pl: If you are paying for each byte of transit, I highly recommend testing out the awesome mod_deflate module. mod_deflate should be able to speed up rendering time for dial-up users, and could lead to a reduction in monthly circuit costs.

$ read more →