Skip to content

Swagger API makes server to fail on panic #21869

@VitSimon

Description

@VitSimon

Description

When I use swagger page call:
http://localhost:3000/api/swagger#/issue/issueCreateIssue

operation is successful but server is terminated on panic.

JSONInput.txt
CLIOutput.txt

Logs

2022/11/19 11:47:46 ...s/graceful/server.go:62:NewServer() [I] [6378b452-46] Starting new Web server: tcp:0.0.0.0:3000 on PID: 1300
2022/11/19 11:47:58 router: completed POST /api/v1/repos/admin1/GRPCBlueprint/issues for 127.0.0.1:64688, 201 Created in 65.6ms @ repo/issue.go:562(repo.CreateIssue)
panic: unaligned 64-bit atomic operation

goroutine 1098 [running]:
runtime/internal/atomic.panicUnaligned()
        /usr/local/go/src/runtime/internal/atomic/unaligned.go:8 +0x2d
runtime/internal/atomic.Xadd64(0x1d210df4, 0x8)
        /usr/local/go/src/runtime/internal/atomic/atomic_386.s:125 +0x11
github.com/blevesearch/zapx/v15.(*chunkedContentCoder).incrementBytesWritten(...)
        /go/pkg/mod/github.com/blevesearch/zapx/[email protected]/contentcoder.go:114
github.com/blevesearch/zapx/v15.(*chunkedContentCoder).flushContents(0x1d210d80)
        /go/pkg/mod/github.com/blevesearch/zapx/[email protected]/contentcoder.go:143 +0x24a
github.com/blevesearch/zapx/v15.(*chunkedContentCoder).Close(...)
        /go/pkg/mod/github.com/blevesearch/zapx/[email protected]/contentcoder.go:110
github.com/blevesearch/zapx/v15.(*interim).writeDicts(0x1f7c0f00)
        /go/pkg/mod/github.com/blevesearch/zapx/[email protected]/new.go:803 +0x1443
github.com/blevesearch/zapx/v15.(*interim).convert(0x1f7c0f00)
        /go/pkg/mod/github.com/blevesearch/zapx/[email protected]/new.go:277 +0x2b5
github.com/blevesearch/zapx/v15.(*ZapPlugin).newWithChunkMode(0x5b887a4, {0x1e00d7a8, 0x1, 0x1}, 0x402)
        /go/pkg/mod/github.com/blevesearch/zapx/[email protected]/new.go:72 +0x18b
github.com/blevesearch/zapx/v15.(*ZapPlugin).New(0x5b887a4, {0x1e00d7a8, 0x1, 0x1})
        /go/pkg/mod/github.com/blevesearch/zapx/[email protected]/new.go:47 +0x43
github.com/blevesearch/bleve/v2/index/scorch.(*Scorch).Batch(0x1c937000, 0x1f7dea70)
        /go/pkg/mod/github.com/blevesearch/bleve/[email protected]/index/scorch/scorch.go:411 +0x5ff
github.com/blevesearch/bleve/v2.(*indexImpl).Batch(0x1bb045a0, 0x1e715d40)
        /go/pkg/mod/github.com/blevesearch/bleve/[email protected]/index_impl.go:309 +0xa0
code.gitea.io/gitea/modules/indexer/bleve.(*FlushingBatch).Flush(0x1adf1dc4)
        /source/modules/indexer/bleve/batch.go:53 +0x32
code.gitea.io/gitea/modules/indexer/issues.(*BleveIndexer).Index(0x1be45720, {0x1e00d6f0, 0x1, 0x1})
        /source/modules/indexer/issues/bleve.go:226 +0x183
code.gitea.io/gitea/modules/indexer/issues.InitIssueIndexer.func1({0x1b942640, 0x1, 0x14})
        /source/modules/indexer/issues/indexer.go:147 +0x5b1
code.gitea.io/gitea/modules/queue.NewByteFIFOQueue.func1({0x1b942640, 0x1, 0x14})
        /source/modules/queue/queue_bytefifo.go:71 +0x3e
code.gitea.io/gitea/modules/queue.(*WorkerPool).doWork(0x1d4f85a0, {0x45bdc20, 0x1d573540})
        /source/modules/queue/workerpool.go:564 +0x69f
code.gitea.io/gitea/modules/queue.(*WorkerPool).addWorkers.func1()
        /source/modules/queue/workerpool.go:312 +0x5d
created by code.gitea.io/gitea/modules/queue.(*WorkerPool).addWorkers
        /source/modules/queue/workerpool.go:310 +0x25

Gitea Version

1.18.0+rc0-23-gaf8b2250c

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

I cannot verify it on web site.

Git Version

git version 2.33.0.windows.2

Operating System

Microsoft Windows [Version 10.0.19044.2251]

How are you running Gitea?

Gitea downloaded from here:
https://dl.gitea.io/gitea/1.18

run via cmd command in console.

Database

SQLite

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions