My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1961: Creating a new group results in internal error
2 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by james.ng...@gmail.com, Jun 13, 2013
************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.    *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS!  *****
************************************************************

Affected Version: 2.7rc1

What steps will reproduce the problem?
1. Login with admin account
2. Goto 'People' and select 'Create New Group'
3. Enter any group name

What is the expected output? What do you see instead?
The expect behavior is successful group creation. I see internal error instead with the following stack trace:

[2013-06-13 22:04:01,418] ERROR com.google.gerrit.sshd.BaseCommand : Internal server error (user james account 1) during gerrit create-group Contractors
com.google.gwtorm.server.OrmException: insert failure on account_groups
        at com.google.gwtorm.schema.sql.SqlDialect.convertError(SqlDialect.java:151)
        at com.google.gwtorm.jdbc.JdbcAccess.convertError(JdbcAccess.java:448)
        at com.google.gwtorm.jdbc.JdbcAccess.insert(JdbcAccess.java:160)
        at com.google.gerrit.server.account.PerformCreateGroup.createGroup(PerformCreateGroup.java:125)
        at com.google.gerrit.sshd.commands.CreateGroupCommand.run(CreateGroupCommand.java:75)
        at com.google.gerrit.sshd.SshCommand$1.run(SshCommand.java:35)
        at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:429)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
        at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:337)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.sql.BatchUpdateException: Duplicate entry '6' for key 'PRIMARY'
        at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2054)
        at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467)
        at com.google.gwtorm.schema.sql.SqlDialect.executeBatch(SqlDialect.java:370)
        at com.google.gwtorm.jdbc.JdbcAccess.execute(JdbcAccess.java:438)
        at com.google.gwtorm.jdbc.JdbcAccess.insertAsBatch(JdbcAccess.java:202)
        at com.google.gwtorm.jdbc.JdbcAccess.insert(JdbcAccess.java:155)
        ... 13 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '6' for key 'PRIMARY'
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
        at com.mysql.jdbc.Util.getInstance(Util.java:386)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2468)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2719)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
        at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2450)
        at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2006)
        ... 18 more


Please provide any additional information below.
You can find the screenshot here http://screencloud.net/v/8pL2
Jun 17, 2013
#1 james.ng...@gmail.com
Resolution was to perform the following mysql statements:

select group_id from account_groups order by group_id;
alter table account_group_id auto_increment=nn;
Jul 2, 2013
#2 dborowitz@google.com
What version did you upgrade from? Did it prompt you about any schema upgrades?
Sign in to add a comment

Powered by Google Project Hosting