Possible race condition when creating a new account could lead to an OOPS

Bug #31755 reported by Guilherme Salgado
6
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Medium
Stuart Bishop

Bug Description

Although we always check if a name is not already in use by another person when creating a new account, OOPS-47B349, OOPS-57D129 and OOPS-54C229 show something went wrong.

Revision history for this message
Guilherme Salgado (salgado) wrote :

Some extra information:

There's an account named 'djaghloul2008', which is the name used in the request that became that OOPS. That account was created on 2006-02-16 11:39:26.746718 UTC, while the oops date is 2006-02-16 11:39:45 UTC.

Changed in launchpad:
status: Unconfirmed → Confirmed
Revision history for this message
Guilherme Salgado (salgado) wrote :

Somebody had this same problem yesterday: OOPS-54C229

Revision history for this message
Guilherme Salgado (salgado) wrote :

Similarly to the first oops, this second one happened 10 seconds after another transaction created a person with the same name in the database.

OOPS time: 2006-02-23 10:20:56 UTC
Person.datecreated: 2006-02-23 10:20:46.878019 UTC

My best guess is that the user submitted the form (almost) simultaneously, in two different tabs/windows. Would that trigger an error like this?

description: updated
Revision history for this message
Diogo Matsubara (matsubara) wrote :

More recent oops: OOPS-131B91

Revision history for this message
Diogo Matsubara (matsubara) wrote :

Another recent occurrence: OOPS-139B779

Revision history for this message
Stuart Bishop (stub) wrote :

If we catch constraint violation exceptions and reraise them as Retry exceptions, this race conditions and all the similar ones should go away.

Changed in launchpad:
assignee: nobody → stub
Stuart Bishop (stub)
Changed in launchpad:
status: Confirmed → In Progress
Stuart Bishop (stub)
Changed in launchpad:
status: In Progress → Fix Committed
Revision history for this message
Stuart Bishop (stub) wrote :

Still need to catch ProgrammingError exception (currently just catch IntegrityError)

Changed in launchpad:
status: Fix Committed → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.