While using a debugger in Confluence (the use of the debugger is probably what exposed an unlikely race condition), I found that DefaultPersonalInformationManager.getOrCreatePersonalInformation() is not atomic as its comment claims, probably because there's no synchronisation on it. The result was two user information objects created, with the user appearing twice in the people directory and the following error in the logs:

      2009-08-27 15:04:24,630 ERROR [http-1990-Processor14] [com.atlassian.hibernate.HibernateObjectDao] findSingleObject 
      Uh oh - found more than one object when single object requested: [userinfo: three v.1 (2064387), userinfo: three v.1 (2064388)]
       -- referer: http://localhost:1990/wiki/browsepeople.action?startIndex=0 | 
      url: /wiki/display/~three | userName: testadmin | action: viewuserprofile
      

      This issue may cause future problems in Studio, which has subscriptions from Crowd to notify it when new users are created, and uses the createPersonalInformation() method to put that user in the people directory. I have no idea how this was called concurrently a second time by a different thread (maybe by the indexer in the background before the transaction was committed?) but what is certain is that there ended up being two personal information objects.

            [CONFSERVER-16732] Duplicate user information objects created

            Anatoli added a comment -

            Resolving as a duplicate of CONF-9857 .

            Anatoli added a comment - Resolving as a duplicate of CONF-9857 .

            We have the same error showing up in our logs:

            2009-09-02 15:56:29,720 ERROR [TP-Processor210] [com.atlassian.hibernate.Hiberna
            teObjectDao] findSingleObject Uh oh - found more than one object when single obj
            ect requested: [userinfo: tteague v.1 (7662), userinfo: tteague v.1 (9615)]

            Stephen Gramm added a comment - We have the same error showing up in our logs: 2009-09-02 15:56:29,720 ERROR [TP-Processor210] [com.atlassian.hibernate.Hiberna teObjectDao] findSingleObject Uh oh - found more than one object when single obj ect requested: [userinfo: tteague v.1 (7662), userinfo: tteague v.1 (9615)]

              Unassigned Unassigned
              jroper James Roper [Atlassian]
              Affected customers:
              1 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: