com.cenqua.fisheye.rep.DbException: User named "mlandis@5amsolutions.com" already exists.

Atlassian JIRA | Nick Pellow [Atlassian] | 5 years ago
  1. 0

    There are at least 2 issues with the DefaultUserManager used in FishEye/Crucible regarding thread safety. The first one has been seen in practice, the second one however has not. h3. importUser race condition It is possible that 2 threads can enter any of the getOrImportXXX methods that do an upfront check for the existence of a User. If the user doesn't exist, then the user is imported. It is possible for 2 threads to both try and import a user, where both see the user doesn't exist first, then 1 will fail if it loses the race to create the user. Seen in studio: {code} 012-04-02 00:07:11,980 INFO [btpool0-4 ] fisheye.app DefaultUserManager-importUser - auto-import user: "mlandis@5amsolutions.com" 2012-04-02 00:07:11,982 INFO [btpool0-7 ] fisheye.app DefaultUserManager-importUser - auto-import user: "mlandis@5amsolutions.com" 2012-04-02 00:07:12,067 INFO [btpool0-9 ] fisheye.app DefaultUserManager-importUser - auto-import user: "mlandis@5amsolutions.com" 2012-04-02 00:07:12,089 WARN [btpool0-7 ] fisheye.app UserDetector-tryRequestDelegatedLogin - problem logging user delegated com.cenqua.fisheye.rep.DbException: User named "mlandis@5amsolutions.com" already exists. at com.cenqua.fisheye.user.DefaultUserManager$19.write(DefaultUserManager.java:1251) at com.cenqua.fisheye.user.DefaultUserManager$19.write(DefaultUserManager.java:1245) at com.cenqua.fisheye.config.DB0Handle.write(DB0Handle.java:96) at com.cenqua.fisheye.user.DefaultUserManager.addUserImpl(DefaultUserManager.java:1245) at com.cenqua.fisheye.user.DefaultUserManager.importUser(DefaultUserManager.java:634) at com.cenqua.fisheye.user.DefaultUserManager.getOrImportDelegatedUser(DefaultUserManager.java:594) at com.cenqua.fisheye.user.DefaultUserManager.tryRequestDelegatedLogin(DefaultUserManager.java:762) {code} h3. the mAuth member variable is not protected from multiple threads It is possible for the importUser() method to see a null mAuth member variable if the reload method is called during the import of a user.

    Atlassian JIRA | 5 years ago | Nick Pellow [Atlassian]
    com.cenqua.fisheye.rep.DbException: User named "mlandis@5amsolutions.com" already exists.
  2. 0

    There are at least 2 issues with the DefaultUserManager used in FishEye/Crucible regarding thread safety. The first one has been seen in practice, the second one however has not. h3. importUser race condition It is possible that 2 threads can enter any of the getOrImportXXX methods that do an upfront check for the existence of a User. If the user doesn't exist, then the user is imported. It is possible for 2 threads to both try and import a user, where both see the user doesn't exist first, then 1 will fail if it loses the race to create the user. Seen in studio: {code} 012-04-02 00:07:11,980 INFO [btpool0-4 ] fisheye.app DefaultUserManager-importUser - auto-import user: "mlandis@5amsolutions.com" 2012-04-02 00:07:11,982 INFO [btpool0-7 ] fisheye.app DefaultUserManager-importUser - auto-import user: "mlandis@5amsolutions.com" 2012-04-02 00:07:12,067 INFO [btpool0-9 ] fisheye.app DefaultUserManager-importUser - auto-import user: "mlandis@5amsolutions.com" 2012-04-02 00:07:12,089 WARN [btpool0-7 ] fisheye.app UserDetector-tryRequestDelegatedLogin - problem logging user delegated com.cenqua.fisheye.rep.DbException: User named "mlandis@5amsolutions.com" already exists. at com.cenqua.fisheye.user.DefaultUserManager$19.write(DefaultUserManager.java:1251) at com.cenqua.fisheye.user.DefaultUserManager$19.write(DefaultUserManager.java:1245) at com.cenqua.fisheye.config.DB0Handle.write(DB0Handle.java:96) at com.cenqua.fisheye.user.DefaultUserManager.addUserImpl(DefaultUserManager.java:1245) at com.cenqua.fisheye.user.DefaultUserManager.importUser(DefaultUserManager.java:634) at com.cenqua.fisheye.user.DefaultUserManager.getOrImportDelegatedUser(DefaultUserManager.java:594) at com.cenqua.fisheye.user.DefaultUserManager.tryRequestDelegatedLogin(DefaultUserManager.java:762) {code} h3. the mAuth member variable is not protected from multiple threads It is possible for the importUser() method to see a null mAuth member variable if the reload method is called during the import of a user.

    Atlassian JIRA | 5 years ago | Nick Pellow [Atlassian]
    com.cenqua.fisheye.rep.DbException: User named "mlandis@5amsolutions.com" already exists.
  3. 0

    If a user logs in with a username containing upper case characters, but the external auth system is case independent, they may get an error like: com.cenqua.fisheye.rep.DbException: User named "djdch" already exists. at com.cenqua.fisheye.user.DefaultUserManager$19.write(DefaultUserManager.java:1251) at com.cenqua.fisheye.user.DefaultUserManager$19.write(DefaultUserManager.java:1245) at com.cenqua.fisheye.config.DB0Handle.write(DB0Handle.java:96) at com.cenqua.fisheye.user.DefaultUserManager.addUserImpl(DefaultUserManager.java:1245) at com.cenqua.fisheye.user.DefaultUserManager.importUser(DefaultUserManager.java:634) at com.cenqua.fisheye.user.DefaultUserManager.getOrImportUser(DefaultUserManager.java:614) at com.cenqua.fisheye.user.DefaultUserManager.loginWithSanitizedUserName(DefaultUserManager.java:432) at com.cenqua.fisheye.user.DefaultUserManager.login(DefaultUserManager.java:407) at sun.reflect.GeneratedMethodAccessor412.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196) at $Proxy40.login(Unknown Source) at com.cenqua.fisheye.web.LoginServlet.login(LoginServlet.java:108) when they login. This is because the initial check to see if the user exists uses the mixed case name, and FeCru is case sensitive, but the name used to create the user is that returned by the external auth, which is mapped to lower case. We should always use the name provided by the user to create the local user, not the name returned by the external auth system, or should always map user names to lower case when external auth is used (which would probably not be backward compatible).

    Atlassian JIRA | 5 years ago | Tom Davies [Atlassian]
    com.cenqua.fisheye.rep.DbException: User named "djdch" already exists.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    If a user logs in with a username containing upper case characters, but the external auth system is case independent, they may get an error like: com.cenqua.fisheye.rep.DbException: User named "djdch" already exists. at com.cenqua.fisheye.user.DefaultUserManager$19.write(DefaultUserManager.java:1251) at com.cenqua.fisheye.user.DefaultUserManager$19.write(DefaultUserManager.java:1245) at com.cenqua.fisheye.config.DB0Handle.write(DB0Handle.java:96) at com.cenqua.fisheye.user.DefaultUserManager.addUserImpl(DefaultUserManager.java:1245) at com.cenqua.fisheye.user.DefaultUserManager.importUser(DefaultUserManager.java:634) at com.cenqua.fisheye.user.DefaultUserManager.getOrImportUser(DefaultUserManager.java:614) at com.cenqua.fisheye.user.DefaultUserManager.loginWithSanitizedUserName(DefaultUserManager.java:432) at com.cenqua.fisheye.user.DefaultUserManager.login(DefaultUserManager.java:407) at sun.reflect.GeneratedMethodAccessor412.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196) at $Proxy40.login(Unknown Source) at com.cenqua.fisheye.web.LoginServlet.login(LoginServlet.java:108) when they login. This is because the initial check to see if the user exists uses the mixed case name, and FeCru is case sensitive, but the name used to create the user is that returned by the external auth, which is mapped to lower case. We should always use the name provided by the user to create the local user, not the name returned by the external auth system, or should always map user names to lower case when external auth is used (which would probably not be backward compatible).

    Atlassian JIRA | 5 years ago | Tom Davies [Atlassian]
    com.cenqua.fisheye.rep.DbException: User named "djdch" already exists.
  6. 0

    2012-05-08 17:56:19,685 ERROR [InitialPinger1 twod] fisheye.app BaseRepositoryScanner-handleSlurpException - Problem processing revisions from repo twod due to class com.cenqua.fisheye.rep.RepositoryClientException - com.atlassian.fisheye.dvcs.handler.DvcsProcessException: Error while communicating with VCS: com.cenqua.fisheye.rep.RepositoryClientException: com.atlassian.fisheye.dvcs.handler.DvcsProcessException: Error while communicating with VCS: at com.atlassian.fisheye.dvcs.DvcsScanner.processRevisions(DvcsScanner.java:299) at com.atlassian.fisheye.git.GitScanner.processRevisions(GitScanner.java:250) at com.cenqua.fisheye.rep.BaseRepositoryScanner.slurpRepository(BaseRepositoryScanner.java:257) at com.cenqua.fisheye.rep.BaseRepositoryScanner.doSlurpTransaction(BaseRepositoryScanner.java:225) at com.cenqua.fisheye.rep.BaseRepositoryScanner.ping(BaseRepositoryScanner.java:184) at com.cenqua.fisheye.rep.BaseRepositoryEngine.doSlurp(BaseRepositoryEngine.java:92) at com.cenqua.fisheye.rep.RepositoryEngine.slurp(RepositoryEngine.java:381) at com.cenqua.fisheye.rep.ping.OneOffPingRequest.doRequest(OneOffPingRequest.java:28) at com.cenqua.fisheye.rep.ping.PingRequest.process(PingRequest.java:67) at com.cenqua.fisheye.rep.RepositoryHandle.processPingRequests(RepositoryHandle.java:138) at com.cenqua.fisheye.rep.RepositoryHandle.queuePingRequest(RepositoryHandle.java:128) at com.cenqua.fisheye.rep.ping.PingRequest.run(PingRequest.java:33) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: com.atlassian.fisheye.dvcs.handler.DvcsProcessException: Error while communicating with VCS: at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(DvcsContext.java:214) at com.atlassian.fisheye.git.GitScanner.processChanges(GitScanner.java:997) at com.atlassian.fisheye.git.GitScanner.slurpCommits(GitScanner.java:970) at com.atlassian.fisheye.dvcs.DvcsScanner.processBranch(DvcsScanner.java:415) at com.atlassian.fisheye.dvcs.DvcsScanner.processRevisions(DvcsScanner.java:243) ... 14 more Caused by: com.atlassian.utils.process.ProcessException: While executing: "/usr/bin/git whatchanged --always --reverse --date-order -m --no-abbrev -C 4e725ade737916e254fbb386219a820f38f5fbc8..e4071728511b62ad540baeee417595778e1eac24 --pretty=format:C:%H%nP:%P%nA:%aN%nE:%aE%nR:%cN%nF:%cE%nD:%at%nS:%s%nB:%b%n@@fe_body_end@@ " at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(DvcsContext.java:262) at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(DvcsContext.java:254) at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(DvcsContext.java:212) ... 18 more Caused by: com.atlassian.utils.process.ProcessException: com.cenqua.fisheye.rep.DbException: Attempt to load isBinary from non existent revid = -1 at com.atlassian.utils.process.ExternalProcessImpl$4.doTask(ExternalProcessImpl.java:273) at com.atlassian.utils.process.LatchedRunnable.run(LatchedRunnable.java:25) ... 3 more Caused by: com.cenqua.fisheye.rep.DbException: Attempt to load isBinary from non existent revid = -1 at com.cenqua.fisheye.rep.impl.CommonRevInfoDAO.isBinary(CommonRevInfoDAO.java:1719) at com.atlassian.fisheye.db.BaseFileRevisionDAO.isBinary(BaseFileRevisionDAO.java:221) at com.atlassian.fisheye.git.GitScanner.processCopyMove(GitScanner.java:851) at com.atlassian.fisheye.git.GitScanner.processRename(GitScanner.java:718) at com.atlassian.fisheye.git.GitScanner.processFileRevisions(GitScanner.java:664) at com.atlassian.fisheye.git.GitScanner.processGitCommit(GitScanner.java:567) at com.atlassian.fisheye.git.GitScanner$9.processCommit(GitScanner.java:1074) at com.atlassian.fisheye.git.client.GitChangeParser.handleCommit(GitChangeParser.java:217) at com.atlassian.fisheye.git.client.GitChangeParser.scanPaths(GitChangeParser.java:157) at com.atlassian.fisheye.git.client.GitChangeParser.processLine(GitChangeParser.java:61) at com.atlassian.utils.process.LineOutputHandler.process(LineOutputHandler.java:49) at com.atlassian.utils.process.LineOutputHandler.process(LineOutputHandler.java:36) at com.atlassian.utils.process.PluggableProcessHandler.processOutput(PluggableProcessHandler.java:34) at com.atlassian.utils.process.ExternalProcessImpl$4.doTask(ExternalProcessImpl.java:270) ... 4 more

    Atlassian JIRA | 5 years ago | Tom Davies [Atlassian]
    com.cenqua.fisheye.rep.RepositoryClientException: com.atlassian.fisheye.dvcs.handler.DvcsProcessException: Error while communicating with VCS:

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.cenqua.fisheye.rep.DbException

      User named "mlandis@5amsolutions.com" already exists.

      at com.cenqua.fisheye.user.DefaultUserManager$19.write()
    2. com.cenqua.fisheye
      DefaultUserManager.tryRequestDelegatedLogin
      1. com.cenqua.fisheye.user.DefaultUserManager$19.write(DefaultUserManager.java:1251)
      2. com.cenqua.fisheye.user.DefaultUserManager$19.write(DefaultUserManager.java:1245)
      3. com.cenqua.fisheye.config.DB0Handle.write(DB0Handle.java:96)
      4. com.cenqua.fisheye.user.DefaultUserManager.addUserImpl(DefaultUserManager.java:1245)
      5. com.cenqua.fisheye.user.DefaultUserManager.importUser(DefaultUserManager.java:634)
      6. com.cenqua.fisheye.user.DefaultUserManager.getOrImportDelegatedUser(DefaultUserManager.java:594)
      7. com.cenqua.fisheye.user.DefaultUserManager.tryRequestDelegatedLogin(DefaultUserManager.java:762)
      7 frames