element-hq / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://element-hq.github.io/dendrite/
GNU Affero General Public License v3.0
11 stars 3 forks source link

tests/sqlite: getting the profile can 500 #924

Closed matrixbot closed 2 weeks ago

matrixbot commented 2 weeks ago

This issue was originally created by @kegsay at https://github.com/matrix-org/dendrite/issues/924.

time="2020-03-19T10:44:10.163327131Z" level=error msg="getProfile failed" func=github.com/matrix-org/dendrite/clientapi/routing.GetDisplayName file="/src/clientapi/routing/profile.go:195" error="context canceled" req.id=psqC6AI98t1C req.method=GET req.path="/_matrix/client/r0/profile/@174:localhost:8800/displayname"
time="2020-03-19T10:44:10.163392901Z" level=info msg="Responding (55 bytes)" func=github.com/matrix-org/util.respond file="/gopath/pkg/mod/github.com/matrix-org/util@v0.0.0-20190711121626-527ce5ddefc7/json.go:170" code=500 req.id=psqC6AI98t1C req.method=GET req.path="/_matrix/client/r0/profile/@174:localhost:8800/displayname"

mattn/sqlite3 doesn't seem to do context.WithCancel which implies it's the http conn going away. Sytest does retry, and these requests 200 OK, but it never seems to find the correct display name and fails the test:

not ok 225 Guest user can set display names
# Started: 2020-03-19 10:44:09.835
# Ended: 2020-03-19 10:44:20.073
# Timed out waiting for test at ./run-tests.pl line 745.
# 0.098528: Registered new user @anon-20200319_104240-171:localhost:8800
# 0.299815: User @174:localhost:8800 joined room
# { room_id => "!39uY8boxEZHCqpRX:localhost:8800" }

This only applies to the sqlite tests so something must be going wrong there.

matrixbot commented 2 weeks ago

This comment was originally posted by @kegsay at https://github.com/matrix-org/dendrite/issues/924#issuecomment-673995517.

Haven't seen this since the TransactionWriter stuff got done.