Slashdot Banner
Stories
Slash Boxes
Comments
typodupeerror delete not in

Comments: 239 +-   Software Bug Adds 5K Votes To Election on Monday June 08, @09:30AM

Posted by CmdrTaco on Monday June 08, @09:30AM
from the margin-of-error dept.
government
bug
usa
news
politics
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."
story

Related Stories

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • Uh oh... (Score:3, Funny)

    by Anonymous Coward on Monday June 08, @09:33AM (#28250863)

    The software has achieved sentience and is trying to elect its robot overlords! Before anyone else... I for one welcome our democratically elected robot overlords.

  • Why is a voting system doing any kind of math at all? I voted yesterday in Belgium on a computer that puts my vote onto a card, which is then tallied separately. This same system has been working since at least 1995 with zero reports of fraud or failure (except normal "computer is broken" style failures).

    How can a computer "add phantom ballots"? Software does not just "glitch", it breaks in ways that depend entirely on how it was built.

    • by rvw (755107) on Monday June 08, @09:42AM (#28250959)

      Why is a voting system doing any kind of math at all? I voted yesterday in Belgium on a computer that puts my vote onto a card, which is then tallied separately. This same system has been working since at least 1995 with zero reports of fraud or failure (except normal "computer is broken" style failures).

      How can a computer "add phantom ballots"? Software does not just "glitch", it breaks in ways that depend entirely on how it was built.

      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.

    • While I'm as puzzled as you are on why its doing simple addition wrong, I can understand why you would want a computer to do the math though, as it should be more error-proof than humans.
      • Real life appears to disagree with you! :D

      • Right. Ask a computer to count 1 million records and stop exactly on the millionth, and then ask a person to count 1 million cards and stop on the millionth. If you had to bet your life on it, who would you think would be more precise? Obviously computers have value.

        On the other hand, I'm a firm believer in the idea that the source code should be available for review to make sure there are no weird bugs that could multiply votes, and there should be a paper trail so that the computer can be checked for voter fraud. Computers are more efficient, but not only are they more efficient at doing the right thing, and they're more efficient at doing the wrong thing. If the code tells them to count votes incorrectly (whether it's fraud or an inadvertent bug) they will very efficiently count the votes incorrectly.

    • Additions just aren't so simple anymore in concurrent computing. The obvious way to do addition in gcc c would be:

      totalVotes[candidate]++;

      but this will totally screw up the vote count, whereas

      __sync_add_and_fetch(&totalVotes[candidate], 1);

      gets it right.

      • 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?
        • by Anonymous Coward on Monday June 08, @10:19AM (#28251409)

          Yes, it's a threading issue. If you have multiple threads trying to update the value, some of them won't count. You'd either need to use a lock (and probably mark the variables as volatile) or use some kind of atomic update (like a read-modify-write operation).

          Still, you'd have to be an idiot to even try to count votes as they're coming in. A much better approach would be to use a database. Database servers are already really good at handling concurrency and scaling. When a vote is cast, simply add a record to the database. Once the election's over, do something like "SELECT COUNT(*), candidate_id FROM votes GROUP BY candidate_id", and the results will be calculated based on the records in the database.

          Really, you could only screw this up if you insisted on developing the entire system from scratch, rather than going with existing, well-tested code.

          • Sure, go ahead and add a field to the table and you've got a record of who voted for who, which is awesome!

            The problem for slashdotters is that there is more to a voting system than JUST counting the votes properly.

            You have to count the votes properly, provide proper auditing to validate that everyones vote got counted for who they voted for, all the while making sure that you don't actually know who specifically voted for who, even though you may need to prove that their vote was counted for a specific candidate later.

            If all they had to do was count votes, they would have gotten it right cause even the $0.50/hour programmers from India can get that part right.

            It does blow my mind however that we still get errors in electronic voting due to bugs, these companies are utterly failing and should be banned from making software such as these as soon as a bug like this is detected. It is not acceptable to have not tested your software properly before hand to detect this crap.

        • Exactly... why would it fail on a single-threaded program? The problem is much more that just simple race-conditions on instruction level. What do you do if the program crashes? You have no way of recovering if all you do is increment an array. It really should keep a cryptographically signed logs of each vote, on hardware designed to be read only using specialized key+hardware. The GUI app and the vote management app should be separate programs, with different user/privileges. This would avoid the more c
        • 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:

      • Re: (Score:3, Interesting)

        The obvious way to do addition in gcc c would be:

        totalVotes[candidate]++;

        but this will totally screw up the vote count.

        Why will it screw up? A bug? gcc trying to force good coding practices? Ignorant minds want to know.

        • Re: (Score:3, Insightful)

          I am not a programmer, nor an election official, but that process is as dumb as a blade of grass.

          Why upload during the day? We are only interested in the whole day's total.

          Why reset the local count? Like the server is infallible?

          Why transmit ANYTHING? Like I trust even a modem call to a dedicated line. There is not much easier than diverting a landline. All you need are cutters and spare wire. My modem is just like your modem. MY server will be like your server. I can tap in and listen to a few connec

    • Re: (Score:3, Interesting)

      Well, there's the

          candidate[x]++;

      that should be going on inside..

      Other then then, no math..

      Seems somebody is not following the K.I.S.S. method..



    • void vote(int candidate)
      {
         switch (candidate)
         {
            case GEORGE_BUSH:
               totalVotes[GEORGE_BUSH] ++;

            case AL_GORE:
               totalVotes[AL_GORE] ++;
               break;
         }
      }
      • eh...your first case statement is missing a break. As it currently stands, a vote for GEORGE_BUSH also adds a vote for AL_GORE. I dunno maybe you left it out on purpose to make a point? I guess the bigger question is: why do I care? The answer of course is because I have no friends.
        • Re: (Score:3, Informative)

          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 Nursie (632944) on Monday June 08, @09:34AM (#28250871) Homepage

    I mean really, I'm pretty sure I could write a program with a couple of buttons and a counter for each.

    What's going on here?

    • by noundi (1044080) on Monday June 08, @09:46AM (#28250997)

      What's going on here?

      That, my friend, we will never find out. We would if these highly complex applications were OSS, but then again the complexity of these are so immense that 9/10 experienced programmers had their heads spontaneously explode upon viewing the first line of code. That or someone is bullshitting you.

      • The problem is probably that the developers of that voting software was probably exactly like the OP, thinking: I'm pretty sure I could write a program with a couple of buttons and a counter for each.

        Really, the very first step you'd need to make, is separating the system into a GUI client, operator client and vote server. The vote server would be easier to verify due to very few libraries and unrelated code being used. The GUI client would not be able to mangle _all_ vote results in an instance due to
  • How..... (Score:4, Insightful)

    by Darkness404 (1287218) on Monday June 08, @09:36AM (#28250891)
    It still amazes me how "hard" it is to write a simple program. First have something to scan the ID, check that its unique then move to the voting. Have a few radio buttons that you click, then hit submit, each radio button corresponds to a candidate or a choice, they are added up and give you the results. How the crap do you screw that up?
    • Re:How..... (Score:5, Interesting)

      by Shakrai (717556) on Monday June 08, @09:52AM (#28251061) Journal

      It still amazes me how "hard" it is to write a simple program. First have something to scan the ID, check that its unique then move to the voting. Have a few radio buttons that you click, then hit submit, each radio button corresponds to a candidate or a choice, they are added up and give you the results. How the crap do you screw that up?

      Well, in the case of New York State, our fearless leaders in Albany changed the requirements no less than 15 times after signing a contract with the vendor for new voting machines. Then after they finally agreed on a set of requirements they decided that they needed voting machines for 62 counties right now so they'd have them in time for the election. Then after the machines arrived they changed the requirements again and needed the new software for them right now.

      Doing business with the Government is not an easy undertaking. The only good thing that came out of it is our fearless leaders weren't stupid enough to go with a DRE (direct electronic recording) system. We still have paper ballots that can be counted by any human being if the computer system fails. All the computer does is tabulate them and provide an interface for those voters (the blind/handicapped) whom can't fill out paper ballots themselves.

        • Re: (Score:3, Informative)

          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

      • Re:How..... (Score:4, Insightful)

        by Darkness404 (1287218) on Monday June 08, @09:57AM (#28251137)

        How does a local election provider define the ballot?

        Depends, have a list of candidates, choose the candidate, submit it. For a yes or no issue have two buttons, one yes the other no.

        How do you ensure that the ballot programming is accessible to politicos and not computer programmers?

        Either have a GUI or hire a programmer, I'm sure that the cost of one programmer and one or two other people is a lot less than hiring a team to hand-count votes.

        How do you QA the ballot program? How do you verify that nobody has tampered with the ballot program after it has been QAed?

        Sign it. Have the program check the signature, good signature it lets it go, bad signature it rejects it and throws up an error message.

        For QA, how do you do it without using official ballots that don't end up in the valid votes pile?

        Reimage the machine after use.

        What happens if the scanner (for optical scanners) gets miscalibrated, or the ballot printer was miscalibrated when it printed them, so that alignments aren't off? What if the initial votes and ballots are correct but later ones are not because of changes in calibration or alignment? Think about multiple ballot runs off a printer in a high-volume election.

        Simple, don't use scanners. Simply have it be all digital with a paper printout that may be used if the electronic voting failed due to errors, etc. The paper printouts could be hand-counted if there was a major failure.

        What about different election types? "Most-of", "at-large", "one-of", "instant-runoff", etc.? What about the interactions between these election types and other election types on a single ballot? What about multiple ballots in small regional areas? Who programs them and verifies the programs?

        Programmers and the town. Have an open meeting where anyone can discuss them, fix them, etc. You only need to hire one competent programmer to program a ballot. Multiple ballots are simply more XML files, trivial to make.

  • by thekm (622569) on Monday June 08, @09:36AM (#28250895)
    ...but I can't understand how a glorified logger can be this far off. With hand-shaking and all the rest of it, it just staggers me that something this simple is so hard. If our systems or audit logging were off by more than 5k, our nuts would be in a sling, and our projects sure as heck aren't as big as these puppies.
  • Blckboxvoting.org (Score:5, Insightful)

    by Red Flayer (890720) on Monday June 08, @09:38AM (#28250911) Journal

    "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.

    A software error resulting in +/- 5000 votes cast is unacceptable on any level, even if it gets drowned out on the national level in the US.

    There is absolutely no reason or excuse for software to miscount votes. It isn't rocket science.

    I know I'm preaching to the choir here, but this shit just pisses me off. It's a matter of national and local integrity that our voting systems are transparent. Please support blackboxvoting.org [blackboxvoting.org] if you don't have the time to get involved in a deeper fashion (calling/writing your legislators, etc).

    Note: I'm not affiliated with blackboxvoting.org. I just appreciate their work.

    • by nedlohs (1335013) on Monday June 08, @10:06AM (#28251253)

      Yes, but it's hilarious when there were only 5600 actual votes cast. +/-100% error bars, is good enough for government work apparently.

    • A software error resulting in +/- 5000 votes cast is unacceptable on any level, even if it gets drowned out on the national level in the US.

      You know, some people are always complaining. First you complain that there's not enough people turning out to vote each election, that people are apathetic, etc. Finally someone develops some software that fixes that problem and now everyone complains about that!!

  • by BlueKitties (1541613) on Monday June 08, @09:41AM (#28250957)
    I'm pretty sure, somewhere in that code, was a server thread handle which states "if {vote=="thisGuy"){thisGuy++;}else{otherGuy++;}" - because validating your requests might require extra code.
  • tampering? (Score:5, Interesting)

    by Ltap (1572175) on Monday June 08, @09:44AM (#28250987)
    TFA only tells me the numbers and the guy's plans, nothing about the actual bug. What was it? It seems awfully hard to screw up adding two numbers together to get a third number, which is basically what that software was doing. Has it occurred to anyone that it might have been tampering? It seems to me that, with the fairly large (tens of thousands) number of votes, adding or removing just enough to make it a runoff would be the perfect vote tampering scheme - too little to draw much attention, but enough to actually make a difference.
  • It's simple (Score:5, Funny)

    by Mad-Bassist (944409) on Monday June 08, @10:00AM (#28251165) Homepage

    Someone forgot to clear the chad bit!

  • In related news... (Score:3, Interesting)

    by Xiver (13712) on Monday June 08, @10:09AM (#28251291)
    In related news its apparently very easy to convince the media that programming voting machines is hard. I seriously doubt this was an accident. Independent testing should have flushed this bug out very early.
  • my observation (Score:3, Interesting)

    by Tumbleweed (3706) * on Monday June 08, @10:11AM (#28251315) Homepage

    I find it interesting that companies that make ATMs for systems that track things down to the penny are unable to track much smaller numbers with errors of plus or minus THOUSANDS.

    Maybe we should just start voting at ATMs?

    Oh wait, that's what the lobbyists do already.

      • Nah, I've HAD the ATM screw up before, and record a deposit twice. The bank happily deducted it from my account later. I've also had an ATM record a withdrawal three times for the one transaction. Took me a couple weeks of back and forth for them to get it all straightened out. So, the ATMs *do* screw up, but the banks don't care because in the end they don't lose any money. The only one that suffers is the customer (by being out my $$ for two weeks).

  • Pseudocode (Score:3, Informative)

    by Jamamala (983884) on Monday June 08, @10: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.

    MAIN:
    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 {
    print("Error")
    go back to main }

    VOTE:
    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 {
    print("Error")
    go back to vote }
  • ballot browser (Score:3, Informative)

    by mtrachtenberg (67780) on Monday June 08, @10: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.

  • PuhLease (Score:3, Funny)

    by wtbname (926051) on Monday June 08, @11:10AM (#28251973)
    Can't these idiots get anything right? This is so freaking easy to fix it boggles the mind.... votes = votes - 5000 ; There. Done.
  • by Subm (79417) on Monday June 08, @11:49AM (#28252541)

    The real issue isn't that the votes were miscounted in South Dakota.

    It's that I bought them for South Carolina!

    • Re:!bug (Score:4, Insightful)

      by skelterjohn (1389343) on Monday June 08, @09:51AM (#28251051)

      yeah, cause the difference in saying something like "x+y/2" or "(x+y)/2" is obvious fraud, as it is a bug that wouldn't crash the system.

    • Re:!bug (Score:5, Insightful)

      by link-error (143838) on Monday June 08, @09:53AM (#28251075)
      It's probably more like they aren't rolling back some transaction on a network error or something. Network timeouts, etc, are probably doubling up the votes from that machine. It's probably an unusual error so it doesn't get caught in testing. Like busy networks on election night? It's not that hard to imagine.
    • vote = GetVote( );


      if( vote = my_candidate )
      {
      my_candidate_votes = my_candidate_votes + 2;
      } else {
      other_candidate_votes = other_candidate_votes + 1;
      }


      In the source code as complex as this, you will probably need a PhD in computer science...

      /s
    • Re: (Score:3, Insightful)

      It's called paper based voting.

      There are plenty of good paper based systems around.

      They scale. The more voters you have, the more volunteers and observers you should be able to get.

      The counting of each ballot can be observed by party representatives and independent 3rd party observers/monitors. In my country, the counter holds up each ballot paper to show it to "everyone". It'll take a fair number of magicians to cheat in this and they would have to work a lot harder to cheat without getting caught.

      As I've
I just got my PRINCE bumper sticker ... But now I can't remember WHO he is ...