Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failures in test suite when using go 1.18 with Gitea 1.16.4 #19134

Closed
ArchangeGabriel opened this issue Mar 18, 2022 · 5 comments
Closed

Failures in test suite when using go 1.18 with Gitea 1.16.4 #19134

ArchangeGabriel opened this issue Mar 18, 2022 · 5 comments
Milestone

Comments

@ArchangeGabriel
Copy link

ArchangeGabriel commented Mar 18, 2022

Gitea Version

1.16.4

Git Version

2.35.1

Operating System

Arch Linux

How are you running Gitea?

Not running, but building with:

make deps
export EXTRA_GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
export LDFLAGS="-X 'code.gitea.io/gitea/modules/setting.AppWorkPath=/var/lib/gitea/' -X 'code.gitea.io/gitea/modules/setting.CustomConf=/etc/gitea/app.ini'"
export TAGS="bindata sqlite sqlite_unlock_notify pam"
make -j1
make test

Log Gist

https://gist.github.com/ArchangeGabriel/42e7699cce6dfbd6054566b0ceabdc2d

Description

Failure in modules/lfs:

2022/03/18 23:03:36 ...ules/lfs/endpoint.go:71:endpointFromURL() [E] lfs.endpointFromUrl: unknown url
2022/03/18 23:03:36 ...s/lfs/http_client.go:115:batch() [E] Error decoding json: readObjectStart: expect { or n, but found i, error found in #1 byte of ...|invalid jso|..., bigger context ...|invalid json|...
unexpected fault address 0x0
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x46f9ff]

goroutine 98 [running]:
runtime.throw({0xb5f443?, 0xc0000fa7e0?})
	/usr/lib/go/src/runtime/panic.go:992 +0x71 fp=0xc001210e00 sp=0xc001210dd0 pc=0x43f6b1
runtime.sigpanic()
	/usr/lib/go/src/runtime/signal_unix.go:825 +0x305 fp=0xc001210e50 sp=0xc001210e00 pc=0x455a85
aeshashbody()
	/usr/lib/go/src/runtime/asm_amd64.s:1343 +0x39f fp=0xc001210e58 sp=0xc001210e50 pc=0x46f9ff
runtime.mapiternext(0xc00052dbc0)
	/usr/lib/go/src/runtime/map.go:934 +0x2cb fp=0xc001210ec8 sp=0xc001210e58 pc=0x4193eb
runtime.mapiterinit(0x794975?, 0x0?, 0xe926b8?)
	/usr/lib/go/src/runtime/map.go:861 +0x228 fp=0xc001210ee8 sp=0xc001210ec8 pc=0x4190c8
reflect.mapiterinit(0x794756?, 0xc001214b40?, 0xc00052dbc0?)
	/usr/lib/go/src/runtime/map.go:1373 +0x19 fp=0xc001210f10 sp=0xc001210ee8 pc=0x46c219
github.com/modern-go/reflect2.(*UnsafeMapType).UnsafeIterate(...)
	/build/go/pkg/mod/github.com/modern-go/reflect2@v1.0.1/unsafe_map.go:112
github.com/json-iterator/go.(*sortKeysMapEncoder).IsEmpty(0x4?, 0xae1b20?)
	/build/go/pkg/mod/github.com/json-iterator/go@v1.1.11/reflect_map.go:333 +0x28 fp=0xc001210f50 sp=0xc001210f10 pc=0x787bc8
github.com/json-iterator/go.(*placeholderEncoder).IsEmpty(0xc001214b40?, 0xc001203c80?)
	/build/go/pkg/mod/github.com/json-iterator/go@v1.1.11/reflect.go:336 +0x22 fp=0xc001210f70 sp=0xc001210f50 pc=0x77fd62
github.com/json-iterator/go.(*structFieldEncoder).IsEmpty(0xc001214cc0, 0xa7c7aa?)
	/build/go/pkg/mod/github.com/json-iterator/go@v1.1.11/reflect_struct_encoder.go:118 +0x42 fp=0xc001210f90 sp=0xc001210f70 pc=0x794902
github.com/json-iterator/go.(*structEncoder).Encode(0xc001214d50, 0x416c05?, 0xc0000fa7e0)
	/build/go/pkg/mod/github.com/json-iterator/go@v1.1.11/reflect_struct_encoder.go:148 +0x565 fp=0xc001211078 sp=0xc001210f90 pc=0x794f65
github.com/json-iterator/go.(*OptionalEncoder).Encode(0xd0?, 0x167d0c0?, 0xc001212820?)
	/build/go/pkg/mod/github.com/json-iterator/go@v1.1.11/reflect_optional.go:70 +0xa4 fp=0xc0012110c8 sp=0xc001211078 pc=0x78c324
github.com/json-iterator/go.(*sliceEncoder).Encode(0xc0003f9d10, 0xc001203c60, 0xc0000fa7e0)
	/build/go/pkg/mod/github.com/json-iterator/go@v1.1.11/reflect_slice.go:38 +0x2bd fp=0xc001211180 sp=0xc0012110c8 pc=0x78cd7d
github.com/json-iterator/go.(*structFieldEncoder).Encode(0xc001214de0, 0xa750d7?, 0xc0000fa7e0)
	/build/go/pkg/mod/github.com/json-iterator/go@v1.1.11/reflect_struct_encoder.go:110 +0x56 fp=0xc0012111f8 sp=0xc001211180 pc=0x794756
github.com/json-iterator/go.(*structEncoder).Encode(0xc001214e40, 0x0?, 0xc0000fa7e0)
	/build/go/pkg/mod/github.com/json-iterator/go@v1.1.11/reflect_struct_encoder.go:158 +0x765 fp=0xc0012112e0 sp=0xc0012111f8 pc=0x795165
github.com/json-iterator/go.(*OptionalEncoder).Encode(0xc00014eb40?, 0x0?, 0x0?)
	/build/go/pkg/mod/github.com/json-iterator/go@v1.1.11/reflect_optional.go:70 +0xa4 fp=0xc001211330 sp=0xc0012112e0 pc=0x78c324
github.com/json-iterator/go.(*onePtrEncoder).Encode(0xc0003cb2c0, 0xc001203c50, 0xc0012022d0?)
	/build/go/pkg/mod/github.com/json-iterator/go@v1.1.11/reflect.go:219 +0x82 fp=0xc001211368 sp=0xc001211330 pc=0x77f2c2
github.com/json-iterator/go.(*Stream).WriteVal(0xc0000fa7e0, {0xa83280, 0xc001203c50})
	/build/go/pkg/mod/github.com/json-iterator/go@v1.1.11/reflect.go:98 +0x158 fp=0xc0012113d8 sp=0xc001211368 pc=0x77e5d8
github.com/json-iterator/go.(*Encoder).Encode(0xc000010b08, {0xa83280?, 0xc001203c50?})
	/build/go/pkg/mod/github.com/json-iterator/go@v1.1.11/adapter.go:127 +0x32 fp=0xc001211428 sp=0xc0012113d8 pc=0x76a212
code.gitea.io/gitea/modules/lfs.lfsTestRoundtripHandler(0xe90e80?)
	/build/gitea/src/gitea/modules/lfs/http_client_test.go:149 +0xc42 fp=0xc001211528 sp=0xc001211428 pc=0x984a62
code.gitea.io/gitea/modules/lfs.TestHTTPClientDownload.func1(0xc000590d00)
	/build/gitea/src/gitea/modules/lfs/http_client_test.go:171 +0x30c fp=0xc0012115b8 sp=0xc001211528 pc=0x98544c
code.gitea.io/gitea/modules/lfs.RoundTripFunc.RoundTrip(0x416c05?, 0xe90f40?)
	/build/gitea/src/gitea/modules/lfs/http_client_test.go:23 +0x1f fp=0xc0012115d0 sp=0xc0012115b8 pc=0x983c9f
net/http.send(0xc000590d00, {0xe90f40, 0xc001102a80}, {0xb33900?, 0x1?, 0x0?})
	/usr/lib/go/src/net/http/client.go:252 +0x5d8 fp=0xc0012117b0 sp=0xc0012115d0 pc=0x6f6478
net/http.(*Client).send(0xc001102ab0, 0xc000590d00, {0x203000?, 0xc0003555a0?, 0x0?})
	/usr/lib/go/src/net/http/client.go:176 +0x9b fp=0xc001211828 sp=0xc0012117b0 pc=0x6f5d1b
net/http.(*Client).do(0xc001102ab0, 0xc000590d00)
	/usr/lib/go/src/net/http/client.go:725 +0x8f5 fp=0xc001211a28 sp=0xc001211828 pc=0x6f8155
net/http.(*Client).Do(...)
	/usr/lib/go/src/net/http/client.go:593
code.gitea.io/gitea/modules/lfs.(*HTTPClient).batch(0xc001211d80, {0xe94b68, 0xc00014c000}, {0xb89eb9, 0x8}, {0xc0003f9b48?, 0x1, 0x1})
	/build/gitea/src/gitea/modules/lfs/http_client.go:96 +0x747 fp=0xc001211bd0 sp=0xc001211a28 pc=0x980d47
code.gitea.io/gitea/modules/lfs.(*HTTPClient).performOperation(0xc001211d80, {0xe94b68, 0xc00014c000}, {0xc0003f9b48?, 0x163dc80?, 0x153d6d8?}, 0xc001211d70, 0x0)
	/build/gitea/src/gitea/modules/lfs/http_client.go:146 +0xaf fp=0xc001211cd8 sp=0xc001211bd0 pc=0x98144f
code.gitea.io/gitea/modules/lfs.(*HTTPClient).Download(...)
	/build/gitea/src/gitea/modules/lfs/http_client.go:128
code.gitea.io/gitea/modules/lfs.TestHTTPClientDownload(0xc0005091e0)
	/build/gitea/src/gitea/modules/lfs/http_client_test.go:244 +0x25f fp=0xc001211f70 sp=0xc001211cd8 pc=0x984dbf
testing.tRunner(0xc0005091e0, 0xcba830)
	/usr/lib/go/src/testing/testing.go:1439 +0x102 fp=0xc001211fc0 sp=0xc001211f70 pc=0x519122
testing.(*T).Run.func1()
	/usr/lib/go/src/testing/testing.go:1486 +0x2a fp=0xc001211fe0 sp=0xc001211fc0 pc=0x519fca
runtime.goexit()
	/usr/lib/go/src/runtime/asm_amd64.s:1571 +0x1 fp=0xc001211fe8 sp=0xc001211fe0 pc=0x472601
created by testing.(*T).Run
	/usr/lib/go/src/testing/testing.go:1486 +0x35f

goroutine 1 [chan receive]:
testing.(*T).Run(0xc0000ffa00, {0xc3ce86?, 0x518b05?}, 0xcba830)
	/usr/lib/go/src/testing/testing.go:1487 +0x37a
testing.runTests.func1(0xc0000ffa00?)
	/usr/lib/go/src/testing/testing.go:1839 +0x6e
testing.tRunner(0xc0000ffa00, 0xc000523cd8)
	/usr/lib/go/src/testing/testing.go:1439 +0x102
testing.runTests(0xc00106b680?, {0x1627fc0, 0xc, 0xc}, {0x7ff9ca352108?, 0x40?, 0x167c3c0?})
	/usr/lib/go/src/testing/testing.go:1837 +0x457
testing.(*M).Run(0xc00106b680)
	/usr/lib/go/src/testing/testing.go:1719 +0x5d9
main.main()
	_testmain.go:69 +0x1aa

goroutine 21 [select]:
code.gitea.io/gitea/modules/log.(*ChannelledLog).Start(0xc000126870)
	/build/gitea/src/gitea/modules/log/event.go:70 +0x88
created by code.gitea.io/gitea/modules/log.NewChannelledLog
	/build/gitea/src/gitea/modules/log/event.go:61 +0x239

goroutine 22 [select]:
code.gitea.io/gitea/modules/log.(*MultiChannelledLog).Start(0xc0001a8600)
	/build/gitea/src/gitea/modules/log/event.go:300 +0x26c
created by code.gitea.io/gitea/modules/log.(*MultiChannelledLog).AddLogger
	/build/gitea/src/gitea/modules/log/event.go:190 +0x176
FAIL	code.gitea.io/gitea/modules/lfs	0.039s

Failure in routers/web/repo:

2022/03/18 23:03:44 ...s/storage/storage.go:171:initAttachments() [I] Initialising Attachment storage with type: 
2022/03/18 23:03:44 ...les/storage/local.go:49:NewLocalStorage() [I] Creating new Local Storage at /tmp/appdata3460238500/attachments
2022/03/18 23:03:44 ...s/storage/storage.go:165:initAvatars() [I] Initialising Avatar storage with type: 
2022/03/18 23:03:44 ...les/storage/local.go:49:NewLocalStorage() [I] Creating new Local Storage at /tmp/appdata3460238500/avatars
2022/03/18 23:03:44 ...s/storage/storage.go:183:initRepoAvatars() [I] Initialising Repository Avatar storage with type: 
2022/03/18 23:03:44 ...les/storage/local.go:49:NewLocalStorage() [I] Creating new Local Storage at /tmp/appdata3460238500/repo-avatars
2022/03/18 23:03:44 ...s/storage/storage.go:177:initLFS() [I] Initialising LFS storage with type: 
2022/03/18 23:03:44 ...les/storage/local.go:49:NewLocalStorage() [I] Creating new Local Storage at /tmp/appdata3460238500/lfs
2022/03/18 23:03:44 ...s/storage/storage.go:189:initRepoArchives() [I] Initialising Repository Archive storage with type: 
2022/03/18 23:03:44 ...les/storage/local.go:49:NewLocalStorage() [I] Creating new Local Storage at /tmp/appdata3460238500/repo-archive
unexpected fault address 0x0
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x46fdbf]

goroutine 259 [running]:
runtime.throw({0x1d04daa?, 0x0?})
	/usr/lib/go/src/runtime/panic.go:992 +0x71 fp=0xc0025c5aa8 sp=0xc0025c5a78 pc=0x43f7d1
runtime.sigpanic()
	/usr/lib/go/src/runtime/signal_unix.go:825 +0x305 fp=0xc0025c5af8 sp=0xc0025c5aa8 pc=0x455ba5
aeshashbody()
	/usr/lib/go/src/runtime/asm_amd64.s:1343 +0x39f fp=0xc0025c5b00 sp=0xc0025c5af8 pc=0x46fdbf
runtime.mapiternext(0xc002261d80)
	/usr/lib/go/src/runtime/map.go:934 +0x2cb fp=0xc0025c5b70 sp=0xc0025c5b00 pc=0x41946b
runtime.mapiterinit(0xc000680400?, 0xc0005bf930?, 0x0?)
	/usr/lib/go/src/runtime/map.go:861 +0x228 fp=0xc0025c5b90 sp=0xc0025c5b70 pc=0x419148
reflect.mapiterinit(0x418a5d?, 0x1a25120?, 0xc0005bf938?)
	/usr/lib/go/src/runtime/map.go:1373 +0x19 fp=0xc0025c5bb8 sp=0xc0025c5b90 pc=0x46c5d9
github.com/modern-go/reflect2.(*UnsafeMapType).UnsafeIterate(...)
	/build/go/pkg/mod/github.com/modern-go/reflect2@v1.0.1/unsafe_map.go:112
github.com/json-iterator/go.(*sortKeysMapEncoder).Encode(0xc001c3b8c0, 0xc001241e30, 0xc0005acb40)
	/build/go/pkg/mod/github.com/json-iterator/go@v1.1.11/reflect_map.go:291 +0x225 fp=0xc0025c5d28 sp=0xc0025c5bb8 pc=0x7d1605
github.com/json-iterator/go.(*onePtrEncoder).Encode(0xc0021f2230, 0xc001c3b710, 0xc002261d80?)
	/build/go/pkg/mod/github.com/json-iterator/go@v1.1.11/reflect.go:219 +0x82 fp=0xc0025c5d60 sp=0xc0025c5d28 pc=0x7c9902
github.com/json-iterator/go.(*Stream).WriteVal(0xc0005acb40, {0x1a56300, 0xc001c3b710})
	/build/go/pkg/mod/github.com/json-iterator/go@v1.1.11/reflect.go:98 +0x158 fp=0xc0025c5dd0 sp=0xc0025c5d60 pc=0x7c8c18
github.com/json-iterator/go.(*Encoder).Encode(0xc001241e00, {0x1a56300?, 0xc001c3b710?})
	/build/go/pkg/mod/github.com/json-iterator/go@v1.1.11/adapter.go:127 +0x32 fp=0xc0025c5e20 sp=0xc0025c5dd0 pc=0x7b4852
code.gitea.io/gitea/modules/context.(*Context).JSON(0xc000234240, 0xc001c3b710?, {0x1a56300, 0xc001c3b710})
	/build/gitea/src/gitea/modules/context/context.go:384 +0x142 fp=0xc0025c5e88 sp=0xc0025c5e20 pc=0x138d3e2
code.gitea.io/gitea/routers/web/repo.DeleteLabel(0xc000234240)
	/build/gitea/src/gitea/routers/web/repo/issue_label.go:157 +0x1e5 fp=0xc0025c5ef0 sp=0xc0025c5e88 pc=0x17e5425
code.gitea.io/gitea/routers/web/repo.TestDeleteLabel(0x0?)
	/build/gitea/src/gitea/routers/web/repo/issue_label_test.go:119 +0x15f fp=0xc0025c5f70 sp=0xc0025c5ef0 pc=0x17f011f
testing.tRunner(0xc00330e680, 0x1f3fcb8)
	/usr/lib/go/src/testing/testing.go:1439 +0x102 fp=0xc0025c5fc0 sp=0xc0025c5f70 pc=0x527642
testing.(*T).Run.func1()
	/usr/lib/go/src/testing/testing.go:1486 +0x2a fp=0xc0025c5fe0 sp=0xc0025c5fc0 pc=0x5284ea
runtime.goexit()
	/usr/lib/go/src/runtime/asm_amd64.s:1571 +0x1 fp=0xc0025c5fe8 sp=0xc0025c5fe0 pc=0x4729c1
created by testing.(*T).Run
	/usr/lib/go/src/testing/testing.go:1486 +0x35f

goroutine 1 [chan receive]:
testing.(*T).Run(0xc00055fa00, {0x1dd8ed2?, 0x527025?}, 0x1f3fcb8)
	/usr/lib/go/src/testing/testing.go:1487 +0x37a
testing.runTests.func1(0xc00055fa00?)
	/usr/lib/go/src/testing/testing.go:1839 +0x6e
testing.tRunner(0xc00055fa00, 0xc001c1d868)
	/usr/lib/go/src/testing/testing.go:1439 +0x102
testing.runTests(0xc0000192c0?, {0x33e6bc0, 0x22, 0x22}, {0xc0000021a0?, 0x100c001c1d8f0?, 0x359cfe0?})
	/usr/lib/go/src/testing/testing.go:1837 +0x457
testing.(*M).Run(0xc0000192c0)
	/usr/lib/go/src/testing/testing.go:1719 +0x5d9
code.gitea.io/gitea/models/unittest.MainTest(0xc001c1de88?, {0xc00194d898, 0x8}, {0x0, 0x0, 0xc0000192c0?})
	/build/gitea/src/gitea/models/unittest/testdb.go:127 +0x99d
code.gitea.io/gitea/routers/web/repo.TestMain(0x449dd1?)
	/build/gitea/src/gitea/routers/web/repo/main_test.go:15 +0x89
main.main()
	_testmain.go:115 +0x1d3

goroutine 6 [select]:
code.gitea.io/gitea/modules/log.(*ChannelledLog).Start(0xc00012a3c0)
	/build/gitea/src/gitea/modules/log/event.go:70 +0x88
created by code.gitea.io/gitea/modules/log.NewChannelledLog
	/build/gitea/src/gitea/modules/log/event.go:61 +0x239

goroutine 7 [select]:
code.gitea.io/gitea/modules/log.(*MultiChannelledLog).Start(0xc000218100)
	/build/gitea/src/gitea/modules/log/event.go:300 +0x26c
created by code.gitea.io/gitea/modules/log.(*MultiChannelledLog).AddLogger
	/build/gitea/src/gitea/modules/log/event.go:190 +0x176

goroutine 99 [select]:
github.com/blevesearch/bleve_index_api.AnalysisWorker({0xc00188f860?, 0xc00188f8c0?})
	/build/go/pkg/mod/github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:46 +0x8f
created by github.com/blevesearch/bleve_index_api.NewAnalysisQueue
	/build/go/pkg/mod/github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:38 +0x92

goroutine 100 [select]:
github.com/blevesearch/bleve_index_api.AnalysisWorker({0xc00188f860?, 0xc00188f8c0?})
	/build/go/pkg/mod/github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:46 +0x8f
created by github.com/blevesearch/bleve_index_api.NewAnalysisQueue
	/build/go/pkg/mod/github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:38 +0x92

goroutine 101 [select]:
github.com/blevesearch/bleve_index_api.AnalysisWorker({0xc00188f860?, 0xc00188f8c0?})
	/build/go/pkg/mod/github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:46 +0x8f
created by github.com/blevesearch/bleve_index_api.NewAnalysisQueue
	/build/go/pkg/mod/github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:38 +0x92

goroutine 102 [select]:
github.com/blevesearch/bleve_index_api.AnalysisWorker({0xc00188f860?, 0xc00188f8c0?})
	/build/go/pkg/mod/github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:46 +0x8f
created by github.com/blevesearch/bleve_index_api.NewAnalysisQueue
	/build/go/pkg/mod/github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:38 +0x92

goroutine 103 [select]:
database/sql.(*DB).connectionOpener(0xc001fc0a90, {0x22c92f0, 0xc00124fd00})
	/usr/lib/go/src/database/sql/sql.go:1226 +0x8d
created by database/sql.OpenDB
	/usr/lib/go/src/database/sql/sql.go:794 +0x18d
FAIL	code.gitea.io/gitea/routers/web/repo	0.512s

Failure in services/migrations:

2022/03/18 23:03:43 ...s/storage/storage.go:171:initAttachments() [I] Initialising Attachment storage with type: 
2022/03/18 23:03:43 ...les/storage/local.go:49:NewLocalStorage() [I] Creating new Local Storage at /tmp/appdata3133406506/attachments
2022/03/18 23:03:43 ...s/storage/storage.go:165:initAvatars() [I] Initialising Avatar storage with type: 
2022/03/18 23:03:43 ...les/storage/local.go:49:NewLocalStorage() [I] Creating new Local Storage at /tmp/appdata3133406506/avatars
2022/03/18 23:03:43 ...s/storage/storage.go:183:initRepoAvatars() [I] Initialising Repository Avatar storage with type: 
2022/03/18 23:03:43 ...les/storage/local.go:49:NewLocalStorage() [I] Creating new Local Storage at /tmp/appdata3133406506/repo-avatars
2022/03/18 23:03:43 ...s/storage/storage.go:177:initLFS() [I] Initialising LFS storage with type: 
2022/03/18 23:03:43 ...les/storage/local.go:49:NewLocalStorage() [I] Creating new Local Storage at /tmp/appdata3133406506/lfs
2022/03/18 23:03:43 ...s/storage/storage.go:189:initRepoArchives() [I] Initialising Repository Archive storage with type: 
2022/03/18 23:03:43 ...les/storage/local.go:49:NewLocalStorage() [I] Creating new Local Storage at /tmp/appdata3133406506/repo-archive
panic: test timed out after 10m0s

goroutine 74 [running]:
testing.(*M).startAlarm.func1()
	/usr/lib/go/src/testing/testing.go:2029 +0x8e
created by time.goFunc
	/usr/lib/go/src/time/sleep.go:176 +0x32

goroutine 1 [chan receive, 10 minutes]:
testing.(*T).Run(0xc0001831e0, {0x1c64912?, 0x524a25?}, 0x1d587c8)
	/usr/lib/go/src/testing/testing.go:1487 +0x37a
testing.runTests.func1(0xc0001831e0?)
	/usr/lib/go/src/testing/testing.go:1839 +0x6e
testing.tRunner(0xc0001831e0, 0xc00213f878)
	/usr/lib/go/src/testing/testing.go:1439 +0x102
testing.runTests(0xc001357360?, {0x30ed920, 0x9, 0x9}, {0xc0000021a0?, 0x100c00213f900?, 0x3296200?})
	/usr/lib/go/src/testing/testing.go:1837 +0x457
testing.(*M).Run(0xc001357360)
	/usr/lib/go/src/testing/testing.go:1719 +0x5d9
code.gitea.io/gitea/models/unittest.MainTest(0xc0018bfe98?, {0xc001ad8981, 0x5}, {0x0, 0x0, 0x1bcee6f?})
	/build/gitea/src/gitea/models/unittest/testdb.go:127 +0x99d
code.gitea.io/gitea/services/migrations.TestMain(0x449dd1?)
	/build/gitea/src/gitea/services/migrations/main_test.go:20 +0x71
main.main()
	_testmain.go:65 +0x1d3

goroutine 20 [select, 10 minutes]:
code.gitea.io/gitea/modules/log.(*ChannelledLog).Start(0xc000194460)
	/build/gitea/src/gitea/modules/log/event.go:70 +0x88
created by code.gitea.io/gitea/modules/log.NewChannelledLog
	/build/gitea/src/gitea/modules/log/event.go:61 +0x239

goroutine 21 [select, 10 minutes]:
code.gitea.io/gitea/modules/log.(*MultiChannelledLog).Start(0xc000224280)
	/build/gitea/src/gitea/modules/log/event.go:300 +0x26c
created by code.gitea.io/gitea/modules/log.(*MultiChannelledLog).AddLogger
	/build/gitea/src/gitea/modules/log/event.go:190 +0x176

goroutine 86 [select, 10 minutes]:
github.com/blevesearch/bleve_index_api.AnalysisWorker({0xc001aa9680?, 0xc001aa96e0?})
	/build/go/pkg/mod/github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:46 +0x8f
created by github.com/blevesearch/bleve_index_api.NewAnalysisQueue
	/build/go/pkg/mod/github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:38 +0x92

goroutine 87 [select, 10 minutes]:
github.com/blevesearch/bleve_index_api.AnalysisWorker({0xc001aa9680?, 0xc001aa96e0?})
	/build/go/pkg/mod/github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:46 +0x8f
created by github.com/blevesearch/bleve_index_api.NewAnalysisQueue
	/build/go/pkg/mod/github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:38 +0x92

goroutine 88 [select, 10 minutes]:
github.com/blevesearch/bleve_index_api.AnalysisWorker({0xc001aa9680?, 0xc001aa96e0?})
	/build/go/pkg/mod/github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:46 +0x8f
created by github.com/blevesearch/bleve_index_api.NewAnalysisQueue
	/build/go/pkg/mod/github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:38 +0x92

goroutine 89 [select, 10 minutes]:
github.com/blevesearch/bleve_index_api.AnalysisWorker({0xc001aa9680?, 0xc001aa96e0?})
	/build/go/pkg/mod/github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:46 +0x8f
created by github.com/blevesearch/bleve_index_api.NewAnalysisQueue
	/build/go/pkg/mod/github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:38 +0x92

goroutine 90 [select, 10 minutes]:
database/sql.(*DB).connectionOpener(0xc001ae6000, {0x20b12c8, 0xc001ae43c0})
	/usr/lib/go/src/database/sql/sql.go:1226 +0x8d
created by database/sql.OpenDB
	/usr/lib/go/src/database/sql/sql.go:794 +0x18d

goroutine 94 [select, 10 minutes]:
code.gitea.io/gitea/services/migrations.(*GithubDownloaderV3).waitAndPickClient(0xc001be40a0)
	/build/gitea/src/gitea/services/migrations/github.go:149 +0x11e
code.gitea.io/gitea/services/migrations.(*GithubDownloaderV3).GetReviews(0xc001be40a0, {0x20ad698, 0x20a0500})
	/build/gitea/src/gitea/services/migrations/github.go:798 +0x3e5
code.gitea.io/gitea/services/migrations.TestGitHubDownloadRepo(0xc000183ba0?)
	/build/gitea/src/gitea/services/migrations/github_test.go:372 +0x2a98
testing.tRunner(0xc000183ba0, 0x1d587c8)
	/usr/lib/go/src/testing/testing.go:1439 +0x102
created by testing.(*T).Run
	/usr/lib/go/src/testing/testing.go:1486 +0x35f
FAIL	code.gitea.io/gitea/services/migrations	600.209s

Those might be configuration issues of our tests environment, so I’m happy to try any suggestion.

@techknowlogick
Copy link
Member

A few more pieces of information that might help us debug: as you are on arch, I assume that you are running these with go1.18 is this indeed the case? and, are you on amd64, arm64, or some other arch?

@pauschuu
Copy link

I am trying to get gitea 1.16.4 on my Arch server to run and no matter what it just panics.

I built it on the same server with go 1.18, nodejs 17.7.2 and npm 8.5.5.

uname -a
Linux 5.16.15-arch1-1 #1 SMP PREEMPT Thu, 17 Mar 2022 00:30:09 +0000 x86_64 GNU/Linux
# it's an AMD Zen3 CPU if that matters

git --version
git version 2.35.1

Just tell me if you need anything else. I can provide you with some debug logs or anything, if you tell me what I need to do.

2022/03/19 11:12:16 cmd/web.go:102:runWeb() [I] Starting Gitea on PID: 69640
2022/03/19 11:12:16 cmd/web.go:150:runWeb() [I] Global init
2022/03/19 11:12:16 routers/init.go:106:GlobalInitInstalled() [I] Git Version: 2.35.1, Wire Protocol Version 2 Enabled
2022/03/19 11:12:16 routers/init.go:109:GlobalInitInstalled() [I] AppPath: /usr/bin/gitea
2022/03/19 11:12:16 routers/init.go:110:GlobalInitInstalled() [I] AppWorkPath: /var/lib/gitea
2022/03/19 11:12:16 routers/init.go:111:GlobalInitInstalled() [I] Custom path: /var/lib/gitea/custom
2022/03/19 11:12:16 routers/init.go:112:GlobalInitInstalled() [I] Log path: /var/lib/gitea/log
2022/03/19 11:12:16 routers/init.go:113:GlobalInitInstalled() [I] Configuration file: /etc/gitea/app.ini
2022/03/19 11:12:16 routers/init.go:114:GlobalInitInstalled() [I] Run Mode: Prod
unexpected fault address 0x0
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x555cb419debf]
goroutine 1 [running]:
runtime.throw({0x555cb5f31012?, 0xd0?})
        runtime/panic.go:992 +0x71 fp=0xc000926c10 sp=0xc000926be0 pc=0x555cb416d7f1
runtime.sigpanic()
        runtime/signal_unix.go:825 +0x305 fp=0xc000926c60 sp=0xc000926c10 pc=0x555cb4183c05
aeshashbody()
        runtime/asm_amd64.s:1343 +0x39f fp=0xc000926c68 sp=0xc000926c60 pc=0x555cb419debf
runtime.mapiternext(0xc0027e2b00)
        runtime/map.go:934 +0x2cb fp=0xc000926cd8 sp=0xc000926c68 pc=0x555cb414726b
runtime.mapiterinit(0xc000926d70?, 0x555cb4144a85?, 0xc002908cf0?)
        runtime/map.go:861 +0x228 fp=0xc000926cf8 sp=0xc000926cd8 pc=0x555cb4146f48
reflect.mapiterinit(0x555cb414685d?, 0x555cb76c0d40?, 0xc004c05468?)
        runtime/map.go:1373 +0x19 fp=0xc000926d20 sp=0xc000926cf8 pc=0x555cb419a5d9
github.com/modern-go/reflect2.(*UnsafeMapType).UnsafeIterate(...)
        github.com/modern-go/reflect2@v1.0.1/unsafe_map.go:112
github.com/json-iterator/go.(*sortKeysMapEncoder).Encode(0xc004c642d0, 0xc002888628, 0xc0000a43c0)
        github.com/json-iterator/go@v1.1.11/reflect_map.go:291 +0x225 fp=0xc000926e90 sp=0xc000926d20 pc=0x555cb432dce5
github.com/json-iterator/go.(*onePtrEncoder).Encode(0xc0017c2480, 0xc004c64180, 0xc0027e2b00?)
        github.com/json-iterator/go@v1.1.11/reflect.go:219 +0x82 fp=0xc000926ec8 sp=0xc000926e90 pc=0x555cb4325fe2
github.com/json-iterator/go.(*Stream).WriteVal(0xc0000a43c0, {0x555cb7702020, 0xc004c64180})
        github.com/json-iterator/go@v1.1.11/reflect.go:98 +0x158 fp=0xc000926f38 sp=0xc000926ec8 pc=0x555cb43252f8
github.com/json-iterator/go.(*frozenConfig).Marshal(0xc0000d2280, {0x555cb7702020, 0xc004c64180})
        github.com/json-iterator/go@v1.1.11/config.go:299 +0xc9 fp=0xc000926fd0 sp=0xc000926f38 pc=0x555cb431c409
code.gitea.io/gitea/modules/json.JSONiter.Marshal({{0x555cb7a9d690?, 0xc0000d2280?}}, {0x555cb7702020?, 0xc004c64180?})
        code.gitea.io/gitea/modules/json/json.go:78 +0x37 fp=0xc000926ff8 sp=0xc000926fd0 pc=0x555cb4346df7
code.gitea.io/gitea/modules/json.(*JSONiter).Marshal(0x555cb7702020?, {0x555cb7702020?, 0xc004c64180?})
        <autogenerated>:1 +0x45 fp=0xc000927028 sp=0xc000926ff8 pc=0x555cb4347ce5
code.gitea.io/gitea/modules/json.Marshal(...)
        code.gitea.io/gitea/modules/json/json.go:103
code.gitea.io/gitea/modules/setting.generateLogConfig(0x555cb414a6f9?, {0xc002909a71, 0x7}, {{0x555cb5f24307, 0x4}, {0x555cb5f74261, 0x8}, {0xc004c249c0, 0x1c}, 0x2710, ...})
        code.gitea.io/gitea/modules/setting/log.go:205 +0x1469 fp=0xc000927198 sp=0xc000927028 pc=0x555cb45cbc49
code.gitea.io/gitea/modules/setting.newLogService()
        code.gitea.io/gitea/modules/setting/log.go:323 +0x6b5 fp=0xc000927388 sp=0xc000927198 pc=0x555cb45cd2d5
code.gitea.io/gitea/modules/setting.NewLogServices(0x0?)
        code.gitea.io/gitea/modules/setting/log.go:349 +0x1d fp=0xc0009273a8 sp=0xc000927388 pc=0x555cb45cd71d
code.gitea.io/gitea/modules/setting.NewServices()
        code.gitea.io/gitea/modules/setting/setting.go:1224 +0x31 fp=0xc0009273c0 sp=0xc0009273a8 pc=0x555cb45dd091
code.gitea.io/gitea/routers.InitGitServices()
        code.gitea.io/gitea/routers/init.go:74 +0x19 fp=0xc0009273d8 sp=0xc0009273c0 pc=0x555cb5d30d19
code.gitea.io/gitea/routers.GlobalInitInstalled({0x555cb7a8f9c8, 0xc0028dc1c0})
        code.gitea.io/gitea/routers/init.go:119 +0x385 fp=0xc0009274c0 sp=0xc0009273d8 pc=0x555cb5d31345
code.gitea.io/gitea/cmd.runWeb(0xc0028ae840)
        code.gitea.io/gitea/cmd/web.go:153 +0x811 fp=0xc0009275a0 sp=0xc0009274c0 pc=0x555cb5e0c071
github.com/urfave/cli.HandleAction({0x555cb766ad00?, 0x555cb7a6ffc0?}, 0x3?)
        github.com/urfave/cli@v1.22.5/app.go:524 +0xa8 fp=0xc0009275b8 sp=0xc0009275a0 pc=0x555cb57da3e8
github.com/urfave/cli.Command.Run({{0x555cb5f1b88d, 0x3}, {0x0, 0x0}, {0x0, 0x0, 0x0}, {0x555cb6087f90, 0x16}, {0x0, ...}, ...}, ...)
        github.com/urfave/cli@v1.22.5/command.go:173 +0x652 fp=0xc000927798 sp=0xc0009275b8 pc=0x555cb57db1d2
github.com/urfave/cli.(*App).Run(0xc0028c6000, {0xc00003c080, 0x4, 0x4})
        github.com/urfave/cli@v1.22.5/app.go:277 +0x8a7 fp=0xc000927d70 sp=0xc000927798 pc=0x555cb57d7a47
main.main()
        code.gitea.io/gitea/main.go:115 +0xcf9 fp=0xc000927f80 sp=0xc000927d70 pc=0x555cb5e42219
runtime.main()
        runtime/proc.go:250 +0x213 fp=0xc000927fe0 sp=0xc000927f80 pc=0x555cb416ff13
runtime.goexit()
        runtime/asm_amd64.s:1571 +0x1 fp=0xc000927fe8 sp=0xc000927fe0 pc=0x555cb41a0b41
goroutine 6 [select]:
code.gitea.io/gitea/modules/log.(*ChannelledLog).Start(0xc0000ae370)
        code.gitea.io/gitea/modules/log/event.go:70 +0x88
created by code.gitea.io/gitea/modules/log.NewChannelledLog
        code.gitea.io/gitea/modules/log/event.go:61 +0x239
goroutine 7 [runnable]:
time.when(0xdf8475800)
        time/sleep.go:28 +0x5b
time.NewTimer(0xc0002085e0?)
        time/sleep.go:91 +0x3d
time.After(...)
        time/sleep.go:157
code.gitea.io/gitea/modules/log.(*ChannelledLog).LogEvent(0xc0000ae370, 0xc000204eb0?)
        code.gitea.io/gitea/modules/log/event.go:95 +0x4b
code.gitea.io/gitea/modules/log.(*MultiChannelledLog).Start(0xc000048180)
        code.gitea.io/gitea/modules/log/event.go:312 +0x4fc
created by code.gitea.io/gitea/modules/log.(*MultiChannelledLog).AddLogger
        code.gitea.io/gitea/modules/log/event.go:190 +0x176
goroutine 15 [select]:
github.com/blevesearch/bleve_index_api.AnalysisWorker({0xc0027a9980?, 0xc0027a99e0?})
        github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:46 +0x8f
created by github.com/blevesearch/bleve_index_api.NewAnalysisQueue
        github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:38 +0x92
goroutine 16 [select]:
github.com/blevesearch/bleve_index_api.AnalysisWorker({0xc0027a9980?, 0xc0027a99e0?})
        github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:46 +0x8f
created by github.com/blevesearch/bleve_index_api.NewAnalysisQueue
        github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:38 +0x92
goroutine 66 [select]:
github.com/blevesearch/bleve_index_api.AnalysisWorker({0xc0027a9980?, 0xc0027a99e0?})
        github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:46 +0x8f
created by github.com/blevesearch/bleve_index_api.NewAnalysisQueue
        github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:38 +0x92
goroutine 67 [select]:
github.com/blevesearch/bleve_index_api.AnalysisWorker({0xc0027a9980?, 0xc0027a99e0?})
        github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:46 +0x8f
created by github.com/blevesearch/bleve_index_api.NewAnalysisQueue
        github.com/blevesearch/bleve_index_api@v1.0.1/analysis.go:38 +0x92
goroutine 52 [select]:
code.gitea.io/gitea/modules/graceful.(*Manager).handleSignals(0xc00010f8c0?, {0x555cb7a8f9c8, 0xc0028dc100})
        code.gitea.io/gitea/modules/graceful/manager_unix.go:118 +0x1c8
created by code.gitea.io/gitea/modules/graceful.(*Manager).start
        code.gitea.io/gitea/modules/graceful/manager_unix.go:65 +0x19a
goroutine 53 [semacquire]:
sync.runtime_Semacquire(0x0?)
        runtime/sema.go:56 +0x25
sync.(*WaitGroup).Wait(0x0?)
        sync/waitgroup.go:136 +0x52
code.gitea.io/gitea/modules/graceful.(*Manager).start.func1()
        code.gitea.io/gitea/modules/graceful/manager_unix.go:73 +0x65
created by code.gitea.io/gitea/modules/graceful.(*Manager).start
        code.gitea.io/gitea/modules/graceful/manager_unix.go:69 +0x205
goroutine 83 [syscall]:
os/signal.signal_recv()
        runtime/sigqueue.go:151 +0x2f
os/signal.loop()
        os/signal/signal_unix.go:23 +0x19
created by os/signal.Notify.func1.1
        os/signal/signal.go:151 +0x2a

@Gusted
Copy link
Contributor

Gusted commented Mar 19, 2022

This is already fixed on master, #19100. @techknowlogick we maybe should release 1.16.5 as go1.18 is rolling out slowly.

@ArchangeGabriel
Copy link
Author

A few more pieces of information that might help us debug: as you are on arch, I assume that you are running these with go1.18 is this indeed the case? and, are you on amd64, arm64, or some other arch?

Not that it matters much now (at least it confirm), but yes go1.18 and amd64 (arm is a separate distro, at least for now).

@Gusted Thanks, I can confirm that cherry-picking #19100 solves these failures as well as the one on start I had reported in #19135. Keep up the good work!

@ArchangeGabriel
Copy link
Author

That being said, the third failure still happens. It did not on my first attempt after backporting the fix, but then I wanted to remove the “expected failure” of tests from my build script and now it failed three times in a row (still re-running it, but no success so far). So seems to be an intermittent one, but not related to #19100?

@zeripath zeripath changed the title Failures in test suite Failures in test suite when using go 1.18 with Gitea 1.16.4 Mar 23, 2022
@zeripath zeripath added this to the 1.16.5 milestone Mar 23, 2022
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants