Too Many MySQL Sleep Processes

Tuesday, May 15, 2007 by Scott Karlin

I’ve been using the CodeIgniter PHP framework to develop a web site that connects to a MySQL database using InnoDB tables and transactions. I ran into some trouble when I filled the MySQL process list with entries with “Sleep” in the command column. This happened even if I was rendering a page that only required reading from the database (and not using transactions). Solutions on the Internet suggesting that I should reduce the MySQL wait_timeout value to 3 seconds (from a setting of 28,800 seconds) or increasing the number of allowed connections didn’t ring true. A post on the MySQL Performance Blog pointed me in the right direction. Apparently, persistent connections do not currently play nice with transactions and InnoDB. The fix was to set the $db['default']['pconnect'] value to FALSE in the CodeIgniter database configuration file (application/config/database.php).

Miracle Fruit

Monday, April 30, 2007 by Scott Karlin

Last Friday, the regulars at the IT Policy reading group meeting tried something completely different. Instead of discussing the paper of the week, the meeting became an event to sample sour foods before and after eating miraculin, an extract of miracle fruit. (For pictures and additional details, see Ed Felten’s blog entry.) In a nutshell, miraculin binds to a receptor on one’s tongue and has the effect of making sour things taste sweet.

We tried lemons, limes, and grapefruit. For me, the lemons actually ended up tasting too sweet — a bit like oversweetened lemonade. The limes were good (although, I like limes anyway). The grapefruit was outstanding. Admittedly, I like grapefruit and we started with good fruit; however, the modified taste was sweet with just enough of the original acidity. It was better than eating grapefruit with sugar or honey because the sweetness was uniform and the original texture of the fruit was unchanged (no sugar grit or syrup).

Stock Up After 45M Card Numbers Stolen

Thursday, March 29, 2007 by Scott Karlin

I thought it was particularly interesting to read the first paragraph and then the last paragraph of today’s AP article (as seen in the New York Times) reporting of the security breach of TJX Cos, the owner of T.J. Maxx and Marshall’s stores. First paragraph:

Information from at least 45.7 million credit and debit cards was stolen by hackers who accessed TJX’s customer information in a security breach that the discount retailer disclosed more than two months ago.

Last paragraph:

TJX shares rose 51 cents, or 1.9 percent, to $27.01 in morning trading on the New York Stock Exchange.

Mojave Phone Booth Site

Tuesday, February 20, 2007 by Scott Karlin

While wandering through Wikipedia, I ran across the Mojave phone booth article. While the phone booth is long gone, I ran across this satellite photo. By reading descriptions of the location at the same site, I managed to find the location on Google Maps. Maybe I’ll visit someday.

2007 Predictions

Saturday, January 6, 2007 by Scott Karlin

This year, Alex Halderman, Ed Felten, and I put our heads together to come up with a single list of predictions. They are posted at Freedom to Tinker.

Empowerment with FOSS

Sunday, December 31, 2006 by Scott Karlin

I recently got around to a project that had been on my “to do” list for many months when I transferred a personal video from analog tape to DVD. As part of the transfer, I also learned how to author a DVD. In this case, authoring meant creating an eight-screen menu system where the user could jump directly to one of 28 different chapters by selecting a representative frame from the chapter. I was quite pleased with the result.

In addition to liking the end-result, I was also proud of the fact that I used only Free and Open Source (FOSS) software running on Linux to do the job. When describing the process to colleagues, I would get the suitable (or perhaps simply polite) responses of “cool” or “wow.” It wasn’t until I was talking to a tech-savvy cousin at a Christmas party that I got a reality check when he said, “Yeah, I just use a Mac.”

Defensively, I quickly countered that I didn’t want to be forced to use a graphical interface, that the command line allowed me to script the process, and that I felt that I had much more control over the authoring process by using command line tools.

Over the past week, I have been reflecting on this conversation. While I stand by my counter argument, I don’t feel that it captured the essence of why I went the Linux/FOSS route. (I should note that I did use the graphical tool Kino to separate the video into chapters; the various command line tools were used to create the menu system and to burn the DVD. I’ll write about the details in a future post.)

I’m fairly certain that had I used commercial software (e.g., on a Mac), I would have been able to author a DVD in short order. However, I’m not sure I would have gained as deep an understanding of the process as I did by gathering the various utilities from across the Internet and “doing it myself.” Sure, it was a bit of a steep learning curve at times, but by knowing more about the nitty-gritty details, I think I ended up with a better result. I also had the option of modifying the code if it didn’t suit my needs. It was empowering to have so much control over the process.

Video, Internet, and Phone Service: the Marketing Triple-Play

Thursday, November 30, 2006 by Scott Karlin

Maury Wright has a couple of interesting columns in recent issues of EDN magazine:

Security Implications of Hybrid Hard Drives

Friday, October 20, 2006 by Scott Karlin

A hybrid hard drive (HHD) is a device that combines a standard drive with a significant amount of non-volatile Flash memory. In 2005, a Samsung press release annouced they would team with Microsoft to develop such a device. The result appears to be the Samsung FlashON drive (with 2Gbytes of Flash) specifically for Microsoft Vista. The benefits of including significant non-volatile storage with the drive include faster boot/resume-from-hibernation (state can be transferred from the Flash back to the main memory without waiting for the drive spindle to come up to speed) and reduced power consumption (writes to magnetic media can be batched allowing the drive to idle or spin down more often). However, there is a security implication that is mentioned in a article:

Security conscious organisations are taught to be very aware of data left on hard drives when PCs are disposed of. However, [Flash] memory is nonvolatile, so a company could end up with up to 512Mbytes of data ­lying around in memory on the motherboard or on the side of the drive.

Few companies own the industrial-scale degaussing equipment that can instantly be used to fry the data on a drive, and instead rely on software that laboriously overwrites the magnetic surface.

The trouble is that drive degaussing is not designed to erase Flash memory and software methods require that the drive can be powered up and works. Because degaussing involves moving a drive though a powerful magnet eddy currents may be induced that might erase/damage the Flash electrically or even thermally. (Our degausser heats up drives so much that they must be handled with heavy oven mitts.) That said, my guess is that degaussing followed by physical destruction of the Flash chips will be necessary to ensure that the non-volatile data is destroyed. For more information on extracting data from Flash memory, check out the paper Data Remanence in Flash Memory Devices from the University of Cambridge.

Another security implication of hybrid drives is that, depending on the interface between the operating system and the drive, it may also be possible to hide malicious code in the Flash memory that is not detected by virus scanners.

More on ThreeBallot Voting

Tuesday, October 10, 2006 by Scott Karlin

Last week I posted a short overview of Ron Rivest’s ThreeBallot voting system paper. In his weblog, Ed Felten has begun a discussion about issues related to write-in candidates.

At first, I didn’t think the issue of write-in candidates was much of a problem. An approach for write-ins would be to slightly mechanize the process. Voters would not mark pre-printed ballots. Instead, they would use an isolated ballot generating machine that would let them mark the three ballots and, optionally, add a write-in. The machine would print a three-part ballot that has all the write-in names. This machine would also perform the necessary constraint checks.

Now, this would only partially preserve the secrecy of the ballot. To vote for a write-in, one’s receipt would definitely show the candidate’s name. As long as enough voters wrote-in identical candidate names, no one would know with certainty if the voter actually voted for the write-in or not due to the way the ThreeBallot system works. HOWEVER, and this is a big “however,” this approach (having a machine print the write-in on all three ballots) can be used to prove to someone else how a voter cast their ballot. This can lead to voter coercion and vote selling. Here’s how:

  1. The voter adds a write-in candidate with a unique, silly name like Phoebe Figalilly
  2. The voter marks the three ballots to cast a vote for a candidate (which doesn’t have to be the write-in)
  3. The voter leaves with a copy of one of the ballots listing the unique write-in name
  4. By showing the receipt to a third party, the third party can review the posted list of ballots and find the three with the unique write-in name allowing them to determine how the vote was cast.

ThreeBallot Voting

Tuesday, September 26, 2006 by Scott Karlin

Ron Rivest has posted a fascinating paper called The ThreeBallot Voting System. This paper describes a paper-based, low-tech, three-part voting system. Each voter actually marks three identical ballots. To vote FOR a candidate in a race, they mark exactly 2 of the 3 ballots. To vote AGAINST a candidate in a race, they mark exactly 1 of the 3 ballots. The ballots are checked by a stateless checking device. The voter then gets a copy of any one of the three ballots but deposits all three originals in the ballot box. Each individual ballot has a unique number on it and at the end of the election all of the ballots (including how they were cast) are posted online. The voter can then verify that their vote was included. Assuming there are n voters, tallying works by simply adding all 3n cast ballots. The actual number of voters a candidate receives is the number of cast ballots minus the number of voters. This is a very interesting result and the paper goes into all the necessary details of election integrity, voter coercion, vote selling, recounts, and audits.

(via Risks-Forum Digest Volume 24 : Issue 44)