[GH-ISSUE #133] Latest docker build crashes #91

Closed
opened 2026-03-15 12:30:32 +03:00 by kerem · 7 comments
Owner

Originally created by @MrDiba on GitHub (Jun 28, 2023).
Original GitHub issue: https://github.com/axllent/mailpit/issues/133

When I run the latest version of Mailpit using the following docker-compose file:

  mailpit:
    image: axllent/mailpit:latest
    ports:
      - 8003:8025

I receive a Error sending data to the server. Please try again. error in the browser and in the backend the following error appears:

mailer-dev-mailpit-1  | 2023/06/28 06:42:30 http: panic serving 192.168.144.1:38076: runtime error: invalid memory address or nil pointer dereference
mailpit-1  | goroutine 1328 [running]:
mailpit-1  | net/http.(*conn).serve.func1()
mailpit-1  | 	/usr/local/go/src/net/http/server.go:1854 +0xbf
mailpit-1  | panic({0xb4d7a0, 0x13c68a0})
mailpit-1  | 	/usr/local/go/src/runtime/panic.go:890 +0x263
mailpit-1  | github.com/axllent/mailpit/storage.GetMessage({0xc000026924, 0x24})
mailpit-1  | 	/app/storage/database.go:409 +0x203
mailpit-1  | github.com/axllent/mailpit/server/apiv1.GetMessage({0xe700f0, 0xc0001a6c00}, 0xffffffffffffffff?)
mailpit-1  | 	/app/server/apiv1/api.go:162 +0x57
mailpit-1  | github.com/axllent/mailpit/server.middleWareFunc.func1({0xe6ffa0, 0xc000210700}, 0xc00037c400)
mailpit-1  | 	/app/server/server.go:150 +0x642
mailpit-1  | net/http.HandlerFunc.ServeHTTP(0xc00037c300?, {0xe6ffa0?, 0xc000210700?}, 0xc002a49998?)
mailpit-1  | 	/usr/local/go/src/net/http/server.go:2122 +0x2f
mailpit-1  | github.com/gorilla/mux.(*Router).ServeHTTP(0xc00011e000, {0xe6ffa0, 0xc000210700}, 0xc00037c200)
mailpit-1  | 	/go/pkg/mod/github.com/gorilla/mux@v1.8.0/mux.go:210 +0x1cf
mailpit-1  | net/http.(*ServeMux).ServeHTTP(0x0?, {0xe6ffa0, 0xc000210700}, 0xc00037c200)
mailpit-1  | 	/usr/local/go/src/net/http/server.go:2500 +0x149
mailpit-1  | net/http.serverHandler.ServeHTTP({0xc000024cf0?}, {0xe6ffa0, 0xc000210700}, 0xc00037c200)
mailpit-1  | 	/usr/local/go/src/net/http/server.go:2936 +0x316
mailpit-1  | net/http.(*conn).serve(0xc0000c4e10, {0xe70448, 0xc00011d830})
mailpit-1  | 	/usr/local/go/src/net/http/server.go:1995 +0x612
mailpit-1  | created by net/http.(*Server).Serve
mailpit-1  | 	/usr/local/go/src/net/http/server.go:3089 +0x5ed

But the weird thing is: If I specify the latest specific version like axllent/mailpit:v1.6.22 It works without a problem. As if there is a different version between the latest tag and the v1.6.22 tag.

Originally created by @MrDiba on GitHub (Jun 28, 2023). Original GitHub issue: https://github.com/axllent/mailpit/issues/133 When I run the latest version of Mailpit using the following docker-compose file: ``` mailpit: image: axllent/mailpit:latest ports: - 8003:8025 ``` I receive a `Error sending data to the server. Please try again.` error in the browser and in the backend the following error appears: ``` mailer-dev-mailpit-1 | 2023/06/28 06:42:30 http: panic serving 192.168.144.1:38076: runtime error: invalid memory address or nil pointer dereference mailpit-1 | goroutine 1328 [running]: mailpit-1 | net/http.(*conn).serve.func1() mailpit-1 | /usr/local/go/src/net/http/server.go:1854 +0xbf mailpit-1 | panic({0xb4d7a0, 0x13c68a0}) mailpit-1 | /usr/local/go/src/runtime/panic.go:890 +0x263 mailpit-1 | github.com/axllent/mailpit/storage.GetMessage({0xc000026924, 0x24}) mailpit-1 | /app/storage/database.go:409 +0x203 mailpit-1 | github.com/axllent/mailpit/server/apiv1.GetMessage({0xe700f0, 0xc0001a6c00}, 0xffffffffffffffff?) mailpit-1 | /app/server/apiv1/api.go:162 +0x57 mailpit-1 | github.com/axllent/mailpit/server.middleWareFunc.func1({0xe6ffa0, 0xc000210700}, 0xc00037c400) mailpit-1 | /app/server/server.go:150 +0x642 mailpit-1 | net/http.HandlerFunc.ServeHTTP(0xc00037c300?, {0xe6ffa0?, 0xc000210700?}, 0xc002a49998?) mailpit-1 | /usr/local/go/src/net/http/server.go:2122 +0x2f mailpit-1 | github.com/gorilla/mux.(*Router).ServeHTTP(0xc00011e000, {0xe6ffa0, 0xc000210700}, 0xc00037c200) mailpit-1 | /go/pkg/mod/github.com/gorilla/mux@v1.8.0/mux.go:210 +0x1cf mailpit-1 | net/http.(*ServeMux).ServeHTTP(0x0?, {0xe6ffa0, 0xc000210700}, 0xc00037c200) mailpit-1 | /usr/local/go/src/net/http/server.go:2500 +0x149 mailpit-1 | net/http.serverHandler.ServeHTTP({0xc000024cf0?}, {0xe6ffa0, 0xc000210700}, 0xc00037c200) mailpit-1 | /usr/local/go/src/net/http/server.go:2936 +0x316 mailpit-1 | net/http.(*conn).serve(0xc0000c4e10, {0xe70448, 0xc00011d830}) mailpit-1 | /usr/local/go/src/net/http/server.go:1995 +0x612 mailpit-1 | created by net/http.(*Server).Serve mailpit-1 | /usr/local/go/src/net/http/server.go:3089 +0x5ed ``` But the weird thing is: If I specify the latest specific version like `axllent/mailpit:v1.6.22` It works without a problem. As if there is a different version between the `latest` tag and the `v1.6.22` tag.
kerem closed this issue 2026-03-15 12:30:38 +03:00
Author
Owner

@MrDiba commented on GitHub (Jun 28, 2023):

I must add that it only happens when there is a mail in the mailbox.

image

<!-- gh-comment-id:1610871174 --> @MrDiba commented on GitHub (Jun 28, 2023): I must add that it only happens when there is a mail in the mailbox. ![image](https://github.com/axllent/mailpit/assets/37332424/e7038fde-5fe3-4009-b2fa-f528467d1bde)
Author
Owner

@axllent commented on GitHub (Jun 28, 2023):

Interesting, I do not have that issue and I have about 130k emails in my mailbox. What OS & architecture are you on?

<!-- gh-comment-id:1610938341 --> @axllent commented on GitHub (Jun 28, 2023): Interesting, I do not have that issue and I have about 130k emails in my mailbox. What OS & architecture are you on?
Author
Owner

@MrDiba commented on GitHub (Jun 28, 2023):

I'm running Linux mint 20.3 on AMD Ryzen 7 4800U with Radeon Graphics with Docker version 23.0.4, build f480fb1.

I see that I mistyped in my original post. Originally I said that using a specific problem "works without no problem", but that should be that it works without a problem (edited the original).

So: axllent/mailpit:latest results in the above error, and: axllent/mailpit:v1.6.22 works fine.

<!-- gh-comment-id:1611103368 --> @MrDiba commented on GitHub (Jun 28, 2023): I'm running Linux mint 20.3 on AMD Ryzen 7 4800U with Radeon Graphics with Docker version 23.0.4, build f480fb1. I see that I mistyped in my original post. Originally I said that using a specific problem "works without no problem", but that should be that it works without a problem (edited the original). So: `axllent/mailpit:latest` results in the above error, and: `axllent/mailpit:v1.6.22` works fine.
Author
Owner

@axllent commented on GitHub (Jun 28, 2023):

Linux AMD64 should be working fine (ie: same as what I'm using) - well they all should, but I can personally vouch for that one. So this happens with a specific database file, or every time you reuse a newly created database file?

<!-- gh-comment-id:1611131823 --> @axllent commented on GitHub (Jun 28, 2023): Linux AMD64 should be working fine (ie: same as what I'm using) - well they all should, but I can personally vouch for that one. So this happens with a specific database file, or every time you reuse a newly created database file?
Author
Owner

@axllent commented on GitHub (Jun 28, 2023):

Sorry, to answer your question, there is currently absolutely no difference at all between latest and v1.6.22 - they are both tags to the same thing (https://hub.docker.com/r/axllent/mailpit/tags). Are you sure you have the latest "latest" (docker pull axllent.mailpit)?

<!-- gh-comment-id:1611148124 --> @axllent commented on GitHub (Jun 28, 2023): Sorry, to answer your question, there is currently absolutely no difference at all between latest and v1.6.22 - they are both tags to the same thing (https://hub.docker.com/r/axllent/mailpit/tags). Are you sure you have the latest "latest" (`docker pull axllent.mailpit`)?
Author
Owner

@MrDiba commented on GitHub (Jun 28, 2023):

You hit the nail on the head! The "latest" was the latest two months ago...

Pulling the actual latest works like a charm. Thank you for the support.

<!-- gh-comment-id:1611524966 --> @MrDiba commented on GitHub (Jun 28, 2023): You hit the nail on the head! The "latest" was the latest two months ago... Pulling the actual latest works like a charm. Thank you for the support.
Author
Owner

@axllent commented on GitHub (Jun 29, 2023):

No problem. I'm still confused a little though, not how you ended up with a stale latest tag, but rather why Mailpit was crashing. Given that I have no idea just how old your latest tag was, I assume it was likely more than 2 months old. Two months ago in v1.6.6 there was an internal database change that restructured several several things. If your latest was older than that, and you tried to open a newer database then it makes perfect sense.

<!-- gh-comment-id:1612412899 --> @axllent commented on GitHub (Jun 29, 2023): No problem. I'm still confused a little though, not how you ended up with a stale `latest` tag, but rather why Mailpit was crashing. Given that I have no idea just how old your `latest` tag was, I _assume_ it was likely more than 2 months old. Two months ago in v1.6.6 there was an internal database change that restructured several several things. If your `latest` was older than that, and you tried to open a newer database then it makes perfect sense.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mailpit#91
No description provided.