Skip to content

SIGSEGV panic when running gdpr_export #637

@gnouts

Description

@gnouts

MMR (v1.3.8), synapse (v1.127.1) and postgres (v16.8) are running via docker.

I'm trying to do a full export of my local media by running inside MMR container /usr/local/bin/gdpr_export -config /config/media-repo.yaml -entity myservername.com

Here are the logs :

time="2025-03-31 08:07:43.383 Z" level=info msg="Preparing database..."
time="2025-03-31 08:07:43.410 Z" level=info msg="Comparing datastores against config..."
time="2025-03-31 08:07:43.413 Z" level=info msg="Starting export..."
time="2025-03-31 08:07:43.452 Z" level=info msg="Exporting 24436 media records" internal_flag=1
time="2025-03-31 08:07:43.457 Z" level=info msg="Cleaning up temporary migrations directory: /tmp/media-repo-migrations2136691135"
time="2025-03-31 08:07:43.457 Z" level=info msg="Cleaning up temporary assets directory: /tmp/media-repo-templates3237398428"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0xd8348c]

goroutine 1 [running]:
github.com/didip/tollbooth/v7/libstring.RemoteIP({0xc0000a4d20, 0x3, 0xc00103a850?}, 0x0, 0x0)
	/go/pkg/mod/github.com/didip/tollbooth/v7@v7.0.2/libstring/libstring.go:22 +0x2c
github.com/t2bot/matrix-media-repo/limits.GetRequestIP(0x0)
	/opt/limits/rate_limiting.go:36 +0x65
github.com/t2bot/matrix-media-repo/pipelines/pipeline_download.Execute({{0x11e6ac0, 0xc0002ddd40}, 0xc000038380, {{{0xc0003ab440, 0x1, 0x1}, {0x1, 0x0, 0xc800000}, {0x6400000, ...}, ...}, ...}, ...}, ...)
	/opt/pipelines/pipeline_download/pipeline.go:79 +0x4ad
github.com/t2bot/matrix-media-repo/archival.ExportEntityData({{0x11e6ac0, 0xc0002ddd40}, 0xc000038380, {{{0xc0003ab440, 0x1, 0x1}, {0x1, 0x0, 0xc800000}, {0x6400000, ...}, ...}, ...}, ...}, ...)
	/opt/archival/entity_export.go:43 +0x473
main.main()
	/opt/cmd/archival/gdpr_export/main.go:59 +0x48f

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions