json.Unmarshal errors in gitea log #7803

Closed
opened 2025-11-02 07:36:56 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @echodreamz on GitHub (Sep 5, 2021).

  • Gitea version (or commit ref): 1.15.0

  • Git version: 2.33.0

  • Operating system: Ubuntu 20.0.4 - Gitea running as a systemd service, downloaded directly from the releases page

  • Database (use [x]):

    • PostgreSQL
    • [ x] MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:

    • Yes (provide example URL)
    • [x ] No
  • Log gist:
    `2021/09/05 08:36:38 .../templates/helper.go:849:ActionContent2Commits() [E] json.Unmarshal:
    {"Commits":[{"Sha1":"d5d05abd8ada7e8c3318433288915ff7a6acbee3","Message":"Updates

    • Fixed flag offsets on fuzzy checks to make sure each fuzzy check had a unique flag

    • Metadata exporter adjusted to also report trusted messages
      ","AuthorEmail":"REMOVED@REMOVED","AuthorName":"REMOVED","CommitterEmail":"REMOVED@REMOVED","CommitterName":"REMOVED","Timestamp":"2021-08-25T02:57:47-05:00"}],"HeadCommit":{"Sha1":"d5d05abd8ada7e8c3318433288915ff7a6acbee3","Message":"Updates

    • Fixed flag offsets on fuzzy checks to make sure each fuzzy check had a unique flag

    • Metadata exporter adjusted to also report trusted messages
      ","AuthorEmail":"REMOVED@REMOVED.com","AuthorName":"REMOVED","CommitterEmail":"REMOVED@REMOVED.com","CommitterName":"REMOVED","Timestamp":"2021-08-25T02:57:47-05:00"},"CompareURL":"rspamd-config/compare/e040728619554f1e3cbcd6fbeedd9de8d8399af8...d5d05abd8ada7e8c3318433288915ff7a6acbee3"}
      ERROR: repository.PushCommits.Commits: []*repository.PushCommit: repository.PushCommit.Message: ReadString: invalid control character found: 10, error found in #10 byte of ...|Message":"Updates

    -|..., bigger context ...|05abd8ada7e8c3318433288915ff7a6acbee3","Message":"Updates
    `

Description

The above errors started in our logs after the v1.15.0 update

Originally created by @echodreamz on GitHub (Sep 5, 2021). - Gitea version (or commit ref): 1.15.0 - Git version: 2.33.0 - Operating system: Ubuntu 20.0.4 - Gitea running as a systemd service, downloaded directly from the releases page - Database (use `[x]`): - [ ] PostgreSQL - [ x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x ] No - Log gist: `2021/09/05 08:36:38 .../templates/helper.go:849:ActionContent2Commits() [E] json.Unmarshal: {"Commits":[{"Sha1":"d5d05abd8ada7e8c3318433288915ff7a6acbee3","Message":"Updates - Fixed flag offsets on fuzzy checks to make sure each fuzzy check had a unique `flag` - Metadata exporter adjusted to also report trusted messages ","AuthorEmail":"REMOVED@REMOVED","AuthorName":"REMOVED","CommitterEmail":"REMOVED@REMOVED","CommitterName":"REMOVED","Timestamp":"2021-08-25T02:57:47-05:00"}],"HeadCommit":{"Sha1":"d5d05abd8ada7e8c3318433288915ff7a6acbee3","Message":"Updates - Fixed flag offsets on fuzzy checks to make sure each fuzzy check had a unique flag - Metadata exporter adjusted to also report trusted messages ","AuthorEmail":"REMOVED@REMOVED.com","AuthorName":"REMOVED","CommitterEmail":"REMOVED@REMOVED.com","CommitterName":"REMOVED","Timestamp":"2021-08-25T02:57:47-05:00"},"CompareURL":"rspamd-config/compare/e040728619554f1e3cbcd6fbeedd9de8d8399af8...d5d05abd8ada7e8c3318433288915ff7a6acbee3"} ERROR: repository.PushCommits.Commits: []*repository.PushCommit: repository.PushCommit.Message: ReadString: invalid control character found: 10, error found in #10 byte of ...|Message":"Updates -|..., bigger context ...|05abd8ada7e8c3318433288915ff7a6acbee3","Message":"Updates ` ## Description The above errors started in our logs after the v1.15.0 update
Author
Owner

@echodreamz commented on GitHub (Sep 5, 2021):

Was a DB issue, fixed up.

@echodreamz commented on GitHub (Sep 5, 2021): Was a DB issue, fixed up.
Author
Owner

@zeripath commented on GitHub (Sep 7, 2021):

There's an apparent issue with the dumping of this field with poor escaping of strings.

This makes me highly concerned that the dump is no longer handling cross db dumping correctly despite it working on 1.14.0-1.14.2.

@zeripath commented on GitHub (Sep 7, 2021): There's an apparent issue with the dumping of this field with poor escaping of strings. This makes me highly concerned that the dump is no longer handling cross db dumping correctly despite it working on 1.14.0-1.14.2.
Author
Owner

@wxiaoguang commented on GitHub (Dec 8, 2021):

Since 1.16 is coming, maybe we can close this one to see if there is new problem of database dumping.

Feel free to provide new clues to reopen this issue.

@wxiaoguang commented on GitHub (Dec 8, 2021): Since 1.16 is coming, maybe we can close this one to see if there is new problem of database dumping. Feel free to provide new clues to reopen this issue.
Author
Owner

@zeripath commented on GitHub (Dec 8, 2021):

No it's still broken.

Cross DB Dump is broken since 1.14.3 as it appears that the fixes I put in xorm to make it work were reverted.

We need to put some proper tests for dump into Gitea and we need to re-fix xorm.

@zeripath commented on GitHub (Dec 8, 2021): No it's still broken. Cross DB Dump is broken since 1.14.3 as it appears that the fixes I put in xorm to make it work were reverted. We need to put some proper tests for dump into Gitea and we need to re-fix xorm.
Author
Owner

@wxiaoguang commented on GitHub (Dec 8, 2021):

@lunny how do you think?

@wxiaoguang commented on GitHub (Dec 8, 2021): @lunny how do you think?
Author
Owner

@lunny commented on GitHub (Dec 8, 2021):

No it's still broken.

Cross DB Dump is broken since 1.14.3 as it appears that the fixes I put in xorm to make it work were reverted.

We need to put some proper tests for dump into Gitea and we need to re-fix xorm.

I don't know if the dump in recent xorm is right. But the tests in xorm PASS.

@lunny commented on GitHub (Dec 8, 2021): > No it's still broken. > > Cross DB Dump is broken since 1.14.3 as it appears that the fixes I put in xorm to make it work were reverted. > > We need to put some proper tests for dump into Gitea and we need to re-fix xorm. I don't know if the dump in recent xorm is right. But the tests in xorm PASS.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7803