Follow Slashdot stories on Twitter


Forgot your password?
Government Bug United States News Politics

Software Bug Adds 5K Votes To Election 239

eldavojohn writes "You may be able to argue that a five-thousand-vote error is a small price to pay for a national election, but these errors are certainly inadmissible on a much smaller scale. According to the Rapid City Journal, a software glitch added 4,875 phantom ballots in a South Dakota election for a seat on the city council. It's not a hardware security problem this time; it's a software glitch. Although not unheard of in electronic voting, this bug was about to cause a runoff vote since the incumbent did not hold a high enough percentage of the vote. That is no longer the case after the numbers were corrected. Wired notes it's probably a complex bug as it is not just multiplying the vote count by two. Here's to hoping that AutoMark follows suit and releases the source code for others to scrutinize."
This discussion has been archived. No new comments can be posted.

Software Bug Adds 5K Votes To Election

Comments Filter:
  • by stickrnan ( 1290752 ) on Monday June 08, 2009 @11:18AM (#28251393)

    i++; is essentially the same as the statement i=i+1;. If you have multiple threads running at the same time you can potentially lose data should more than one thread try to assign i the value of i+1 at the same time.

  • Pseudocode (Score:3, Informative)

    by Jamamala ( 983884 ) on Monday June 08, 2009 @11:21AM (#28251427)
    I posted a question yesterday about what was wrong with a simple program. No-one seemed to know so here's my attempt at writing that simple program. Feel free to tear my ideas to pieces. Hint: I am not a programmer.

    print("Please enter your Voter ID")
    scan, store as voterID
    if (voterID == any value in array of legal voters)
    then run the vote program
    else {
    go back to main }

    print("Enter your choice of candidate")
    scan, store as candidate
    if (candidate == A) {
    then record vote for candidate A
    remove voterID from array of legal voters
    exit }

    elif (candidate == B) {
    then record vote for candidate B++
    remove voterID from array of legal voters
    exit }

    else {
    go back to vote }
  • ballot browser (Score:3, Informative)

    by mtrachtenberg ( 67780 ) on Monday June 08, 2009 @11:28AM (#28251539) Homepage

    There is a very simple, comparatively low-tech fix for broken elections that involve paper ballots.

    As we do in Humboldt County, CA, run all ballots through an off-the-shelf scanner and run an independent count with independent, open source software. Ballot Browser (open source, Python, GPL from me) is available for tweaking and the basics are explained in April's Python Magazine. Or, it's really not that difficult to write your own bubble-reading software.

  • Re:How..... (Score:3, Informative)

    by Shakrai ( 717556 ) on Monday June 08, 2009 @11:30AM (#28251571) Journal

    Hey, you are preaching to the choir here. I became a NYS Elections Inspector primarily so I could see how the machines and procedures work behind the scenes. I'm convinced that we have a good system.

    The new machines we use have two main components. The ballot scanner and ballot marking device (BMD). The BMD is only used by handicapped voters. It consists of different interfaces (a control pad, a sip/puff device, foot pedals, LCD screen and headphones) designed for people with various disabilities. It takes their votes and prints out a ballot that is then scanned by the ballot scanner. Regular voters get a paper ballot where they fill in the squares and drop it into the ballot scanner. The ballot scanner will catch under/over-votes and give you a chance to get a new ballot if you want.

    All paper ballots are retained and can be referred back to in the event of a close/disputed election. The scanner is also smart enough to catch write-in votes and divert those to a different ballot box for easier tabulation. When it scans a ballot it also retains an image of the actual ballot on a memory card. At the end of the day we remove that memory card and transport it to the Board of Elections with the unused ballots and rest of our supplies. This memory card is primarily intended as a backup in the event that something (i.e: building the machine is in burns down) happens to the paper ballots.

    Our system is pretty good. It took NYS years to adopt it but at least that gave us the chance to learn from the mistakes that other states made. I've seen the DRE machines in action (worked as a poll watcher during the Presidential Primaries in Ohio last year) and they scare the hell out of me. A single hardware failure and you lose every vote cast on that machine during the day. What idiot decided that was a good idea?

  • by The Moof ( 859402 ) on Monday June 08, 2009 @11:43AM (#28251691)
    That was the whole point of the code. He was answering the GP's question "How can a computer 'add phantom ballots'?"

    Or at least I hope that was his intention.
  • by Enigma0498 ( 1572247 ) on Monday June 08, 2009 @12:45PM (#28252461)

    How do you know this system is fraud free? Reading your comment doesn't convince me one bit. I voted too, in the Netherlands, and for the first time in years I had to use a pencil again. No guarantee that there are no counting errors, but they won't be systematic on a large scale.

    The Belgian government publishes the source code of the voting software the moment the bureaus close. The software of yesterday's election can be found here: []

  • I'm not a programmer but why would totalVotes[candidate]++; not work?

    Is it a race condition, it pulls the number adds one and puts it back, and if the system is run parallel it will drop vote added at the same time?

    Because totalVotes[candidate]++ really is
    totalVotes[candidate] = totalVotes[candidate] + 1
    which is
    temp = totalVotes[candidate];
    totalVotes[candidate] = temp + 1

    and with 2 threads this might look like this:

    Thread1: tempA = totalVotes[candidate];
    Thread1: totalVotes[candidate] = tempA + 1
    Thread2: tempB = totalVotes[candidate];
    Thread2: totalVotes[candidate] = tempB + 1

    Or like this:

    Thread1: tempA = totalVotes[candidate];
    Thread2: tempB = totalVotes[candidate];
    Thread1: totalVotes[candidate] = tempA + 1
    Thread2: totalVotes[candidate] = tempB + 1

    The issue is that the ++ command (increment) is not necessarily atomic. Either you make it atomic (operating system or hardware), or you need some read-write concurrency strategy (a synchronisation strategy like locks).

    Also see Readers-writers_problem []

  • Verified Voting (Score:3, Informative)

    by Presto Vivace ( 882157 ) <> on Monday June 08, 2009 @01:05PM (#28252803) Homepage Journal
    Verified Voting [] also does great work.
  • by gubers33 ( 1302099 ) on Monday June 08, 2009 @02:07PM (#28253513)
    The documentary "Hacking Democracy" talks about bugs like this one as well as poorly written and easily exploited code used in these systems. It why one such system was banned from use in California. It is amazing how many government tools use extremely poor code not just voting machines, but breathalyzers and other vital hardware.

"Well, social relevance is a schtick, like mysteries, social relevance, science fiction..." -- Art Spiegelman