routers/repo/repo.go:315:MigratePost() [E] MigratePost: pq: division by zero #7649

Closed
opened 2019-07-28 16:28:09 +00:00 by Alir3z4 · 7 comments
Alir3z4 commented 2019-07-28 16:28:09 +00:00 (Migrated from github.com)
  • Gitea version 1.9.0+rc2-16-gd789170e3 built with GNU Make 4.1, go1.12.7 : bindata, sqlite, sqlite_unlock_notify
  • Git version: 2.7.4
  • Operating system: Ubuntu 16.04 LTS
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
2019/07/28 16:21:20 ...-xorm/xorm/engine.go:329:Ping() [I] PING DATABASE postgres
2019/07/28 16:21:20 models/models.go:305:NewEngine() [W] Table user Column max_repo_creation db default is '-1'::integer, struct default is -1
2019/07/28 16:21:20 models/models.go:305:NewEngine() [W] Table user Column diff_view_style db default is '''::character varying', struct default is ''
2019/07/28 16:21:20 models/models.go:305:NewEngine() [W] Table user Column theme db default is '''::character varying', struct default is ''
2019/07/28 16:21:20 models/models.go:305:NewEngine() [W] Table gpg_key column key_id db type is VARCHAR(16), struct type is CHAR(16)
2019/07/28 16:21:20 models/models.go:305:NewEngine() [W] Table gpg_key column primary_key_id db type is VARCHAR(16), struct type is CHAR(16)
2019/07/28 16:21:20 models/models.go:305:NewEngine() [W] Table gpg_key_import column key_id db type is VARCHAR(16), struct type is CHAR(16)
2019/07/28 16:21:20 models/models.go:305:NewEngine() [W] Table commit_status column context_hash db type is VARCHAR(40), struct type is CHAR(40)
2019/07/28 16:21:20 routers/init.go:84:GlobalInit() [I] ORM engine initialization successful!
2019/07/28 16:21:21 routers/init.go:106:GlobalInit() [I] SQLite3 Supported
2019/07/28 16:21:21 routers/init.go:37:checkRunMode() [I] Run Mode: Production
2019/07/28 16:21:21 cmd/web.go:151:runWeb() [I] Listen: http://0.0.0.0:3000
2019/07/28 16:21:21 cmd/web.go:154:runWeb() [I] LFS server enabled
2019/07/28 16:21:21 ...ce/gracehttp/http.go:142:Serve() [I] Serving [::]:3000 with pid 19160
2019/07/28 16:22:00 routers/repo/repo.go:315:MigratePost() [E] MigratePost: pq: division by zero

Description

I'm trying to import a github repo with all the issues, pull requests etc.
After hitting migrate button, it shows 500 page.

The last error is routers/repo/repo.go:315:MigratePost() [E] MigratePost: pq: division by zero
...

Screenshots

image

- Gitea version 1.9.0+rc2-16-gd789170e3 built with GNU Make 4.1, go1.12.7 : bindata, sqlite, sqlite_unlock_notify - Git version: 2.7.4 - Operating system: Ubuntu 16.04 LTS - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ``` 2019/07/28 16:21:20 ...-xorm/xorm/engine.go:329:Ping() [I] PING DATABASE postgres 2019/07/28 16:21:20 models/models.go:305:NewEngine() [W] Table user Column max_repo_creation db default is '-1'::integer, struct default is -1 2019/07/28 16:21:20 models/models.go:305:NewEngine() [W] Table user Column diff_view_style db default is '''::character varying', struct default is '' 2019/07/28 16:21:20 models/models.go:305:NewEngine() [W] Table user Column theme db default is '''::character varying', struct default is '' 2019/07/28 16:21:20 models/models.go:305:NewEngine() [W] Table gpg_key column key_id db type is VARCHAR(16), struct type is CHAR(16) 2019/07/28 16:21:20 models/models.go:305:NewEngine() [W] Table gpg_key column primary_key_id db type is VARCHAR(16), struct type is CHAR(16) 2019/07/28 16:21:20 models/models.go:305:NewEngine() [W] Table gpg_key_import column key_id db type is VARCHAR(16), struct type is CHAR(16) 2019/07/28 16:21:20 models/models.go:305:NewEngine() [W] Table commit_status column context_hash db type is VARCHAR(40), struct type is CHAR(40) 2019/07/28 16:21:20 routers/init.go:84:GlobalInit() [I] ORM engine initialization successful! 2019/07/28 16:21:21 routers/init.go:106:GlobalInit() [I] SQLite3 Supported 2019/07/28 16:21:21 routers/init.go:37:checkRunMode() [I] Run Mode: Production 2019/07/28 16:21:21 cmd/web.go:151:runWeb() [I] Listen: http://0.0.0.0:3000 2019/07/28 16:21:21 cmd/web.go:154:runWeb() [I] LFS server enabled 2019/07/28 16:21:21 ...ce/gracehttp/http.go:142:Serve() [I] Serving [::]:3000 with pid 19160 2019/07/28 16:22:00 routers/repo/repo.go:315:MigratePost() [E] MigratePost: pq: division by zero ``` ## Description I'm trying to import a github repo with all the issues, pull requests etc. After hitting migrate button, it shows 500 page. The last error is `routers/repo/repo.go:315:MigratePost() [E] MigratePost: pq: division by zero` ... ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** --> ![image](https://user-images.githubusercontent.com/591113/62009951-61179d80-b16d-11e9-977c-8b0e120d4c55.png)
Alir3z4 commented 2019-07-28 17:11:37 +00:00 (Migrated from github.com)

I've done some testing.

The failure only happens when "Milestones" are checked to be imported, but importing with rest of the entities is ok.

I've done some testing. The failure only happens when "Milestones" are checked to be imported, but importing with rest of the entities is ok.

@Alir3z4 could you tell me the repository URL on github?

@Alir3z4 could you tell me the repository URL on github?
Alir3z4 commented 2019-07-29 13:19:12 +00:00 (Migrated from github.com)
@lunny here's the repo URL https://github.com/SavandBros/gonevis-dash

I have tested locally with mysql, but it works. I will test with postgres tomorrow.

image

I have tested locally with mysql, but it works. I will test with postgres tomorrow. ![image](https://user-images.githubusercontent.com/81045/62059202-59cbbf00-b255-11e9-9a17-8a3ba51e57e0.png)
Alir3z4 commented 2019-08-01 20:23:00 +00:00 (Migrated from github.com)

@lunny were you able to reproduce on postgresql ?

@lunny were you able to reproduce on postgresql ?

@Alir3z4 I can confirm this with postgres.

@Alir3z4 I can confirm this with postgres.
Alir3z4 commented 2019-08-03 08:19:42 +00:00 (Migrated from github.com)

Thanks for confirming.

Thanks for confirming.
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lunny/gitea#7649
No description provided.