[bug] Internal server error in logs since 3.13.3 release #858

Open
opened 2024-11-30 21:19:23 +00:00 by kinetix · 0 comments

Your setup

From source

Extra details

Gentoo

Version

stable (3.13.3)

PostgreSQL version

15

What were you trying to do?

Nothing - just reviewing logs and noticed the errors, so I'll skip ahead to the log entries.

What did you expect to happen?

No response

What actually happened?

When speaking to Oneric in #akkoma about this, he recommended posting at least the log lines that I've pasted in here, and he thought there were two new bugs here.

16:18 < Oneric> There are also "could not figure out who owns the key" messages, but checking some of them they seem to originate from
deleted accounts
16:18 < Oneric> There’s also a "expected one but got two results" log re signing keys though
16:18 < Oneric> Thanks for bringing this up, this indeed appears to be (two) new bugs. Can you create an issue on akkoma.dev with at least
lines 97-100 of your larger excerpt attached (as well as any other info the template asks for) so this can be properly
tracked?

Logs

Nov 29 15:33:05 [mycrowd] request_id=GAyUdJ-XVkcGf5YAAD-D [error] Internal server error: %Ecto.MultipleResultsError{message: "expected at most one result but got 2 in query:\n\nfrom s0 in Pleroma.User.SigningKey,\n  where: s0.user_id == ^\"AjPEo08n9DW9ZrETz6\"\n"}
Nov 29 15:33:05 [mycrowd] [error] #PID<0.3036.0> running Pleroma.Web.Endpoint (connection #PID<0.3035.0>, stream id 1) terminated_Server: mycrowd.ca:80 (http)_Request: POST /inbox_** (exit) an exception was raised:_    ** (Ecto.MultipleResultsError) expected at most one result but got 2 in query:__from s0 in Pleroma.User.SigningKey,_  where: s0.user_id == ^"AjPEo08n9DW9ZrETz6"__        (ecto 3.10.3) lib/ecto/repo/queryable.ex:154: Ecto.Repo.Queryable.one/3_        (pleroma 3.13.3-177-g34aa1694) lib/pleroma/user/signing_key.ex:182: Pleroma.User.SigningKey.get_or_fetch_by_key_id/1_        (pleroma 3.13.3-177-g34aa1694) lib/pleroma/web/plugs/ensure_user_public_key_plug.ex:15: Pleroma.Web.Plugs.EnsureUserPublicKeyPlug.call/2_        (pleroma 3.13.3-177-g34aa1694) Pleroma.Web.Router.http_signature/2_        (pleroma 3.13.3-177-g34aa1694) Pleroma.Web.Router.activitypub/2_        (pleroma 3.13.3-177-g34aa1694) lib/pleroma/web/router.ex:5: Pleroma.Web.Router.__pipe_through21__/1_        (phoenix 1.7.14) lib/phoenix/router.ex:475: Phoenix.Router.__call__/5_        (pleroma 3.13.3-177-g34aa1694) lib/pleroma/web/endpoint.ex:5: Pleroma.Web.Endpoint.plug_builder_call/2
Nov 29 15:33:10 [mycrowd] request_id=GAyUdbz4zYxVSYoAAAkH [error] Internal server error: %Ecto.MultipleResultsError{message: "expected at most one result but got 2 in query:\n\nfrom s0 in Pleroma.User.SigningKey,\n  where: s0.user_id == ^\"AcNO8UnRO1QM4EYK3c\"\n"}
Nov 29 15:33:10 [mycrowd] [error] #PID<0.3079.0> running Pleroma.Web.Endpoint (connection #PID<0.3078.0>, stream id 1) terminated_Server: mycrowd.ca:80 (http)_Request: POST /inbox_** (exit) an exception was raised:_    ** (Ecto.MultipleResultsError) expected at most one result but got 2 in query:__from s0 in Pleroma.User.SigningKey,_  where: s0.user_id == ^"AcNO8UnRO1QM4EYK3c"__        (ecto 3.10.3) lib/ecto/repo/queryable.ex:154: Ecto.Repo.Queryable.one/3_        (pleroma 3.13.3-177-g34aa1694) lib/pleroma/user/signing_key.ex:182: Pleroma.User.SigningKey.get_or_fetch_by_key_id/1_        (pleroma 3.13.3-177-g34aa1694) lib/pleroma/web/plugs/ensure_user_public_key_plug.ex:15: Pleroma.Web.Plugs.EnsureUserPublicKeyPlug.call/2_        (pleroma 3.13.3-177-g34aa1694) Pleroma.Web.Router.http_signature/2_        (pleroma 3.13.3-177-g34aa1694) Pleroma.Web.Router.activitypub/2_        (pleroma 3.13.3-177-g34aa1694) lib/pleroma/web/router.ex:5: Pleroma.Web.Router.__pipe_through21__/1_        (phoenix 1.7.14) lib/phoenix/router.ex:475: Phoenix.Router.__call__/5_        (pleroma 3.13.3-177-g34aa1694) lib/pleroma/web/endpoint.ex:5: Pleroma.Web.Endpoint.plug_builder_call/2
Nov 29 15:33:15 [mycrowd] [error] Object rejected while fetching https://sfba.social/users/cynblogger/statuses/113568854301203915 {:transmogrifier, {:error, {:validate, {:error, #Ecto.Changeset<action: :insert, changes: %{type: "Create", context: "tag:hachyderm.io,2024-11-29:objectId=214983319:objectType=Conversation", cc: ["https://hachyderm.io/users/al3x", "https://sfba.social/users/cynblogger/followers"], to: ["https://www.w3.org/ns/activitystreams#Public"], actor: "https://sfba.social/users/cynblogger", object: "https://sfba.social/users/cynblogger/statuses/113568854301203915"}, errors: [object: {"The object to create already exists", []}], data: #Pleroma.Web.ActivityPub.ObjectValidators.CreateGenericValidator<>, valid?: false>}}}}

Severity

I can manage

Have you searched for this issue?

  • I have double-checked and have not found this issue mentioned anywhere.
### Your setup From source ### Extra details Gentoo ### Version stable (3.13.3) ### PostgreSQL version 15 ### What were you trying to do? Nothing - just reviewing logs and noticed the errors, so I'll skip ahead to the log entries. ### What did you expect to happen? _No response_ ### What actually happened? When speaking to Oneric in #akkoma about this, he recommended posting at least the log lines that I've pasted in here, and he thought there were two new bugs here. > 16:18 < Oneric> There are also "could not figure out who owns the key" messages, but checking some of them they seem to originate from > deleted accounts > 16:18 < Oneric> There’s also a "expected one but got two results" log re signing keys though > 16:18 < Oneric> Thanks for bringing this up, this indeed appears to be (two) new bugs. Can you create an issue on akkoma.dev with at least > lines 97-100 of your larger excerpt attached (as well as any other info the template asks for) so this can be properly > tracked? > ### Logs ```shell Nov 29 15:33:05 [mycrowd] request_id=GAyUdJ-XVkcGf5YAAD-D [error] Internal server error: %Ecto.MultipleResultsError{message: "expected at most one result but got 2 in query:\n\nfrom s0 in Pleroma.User.SigningKey,\n where: s0.user_id == ^\"AjPEo08n9DW9ZrETz6\"\n"} Nov 29 15:33:05 [mycrowd] [error] #PID<0.3036.0> running Pleroma.Web.Endpoint (connection #PID<0.3035.0>, stream id 1) terminated_Server: mycrowd.ca:80 (http)_Request: POST /inbox_** (exit) an exception was raised:_ ** (Ecto.MultipleResultsError) expected at most one result but got 2 in query:__from s0 in Pleroma.User.SigningKey,_ where: s0.user_id == ^"AjPEo08n9DW9ZrETz6"__ (ecto 3.10.3) lib/ecto/repo/queryable.ex:154: Ecto.Repo.Queryable.one/3_ (pleroma 3.13.3-177-g34aa1694) lib/pleroma/user/signing_key.ex:182: Pleroma.User.SigningKey.get_or_fetch_by_key_id/1_ (pleroma 3.13.3-177-g34aa1694) lib/pleroma/web/plugs/ensure_user_public_key_plug.ex:15: Pleroma.Web.Plugs.EnsureUserPublicKeyPlug.call/2_ (pleroma 3.13.3-177-g34aa1694) Pleroma.Web.Router.http_signature/2_ (pleroma 3.13.3-177-g34aa1694) Pleroma.Web.Router.activitypub/2_ (pleroma 3.13.3-177-g34aa1694) lib/pleroma/web/router.ex:5: Pleroma.Web.Router.__pipe_through21__/1_ (phoenix 1.7.14) lib/phoenix/router.ex:475: Phoenix.Router.__call__/5_ (pleroma 3.13.3-177-g34aa1694) lib/pleroma/web/endpoint.ex:5: Pleroma.Web.Endpoint.plug_builder_call/2 Nov 29 15:33:10 [mycrowd] request_id=GAyUdbz4zYxVSYoAAAkH [error] Internal server error: %Ecto.MultipleResultsError{message: "expected at most one result but got 2 in query:\n\nfrom s0 in Pleroma.User.SigningKey,\n where: s0.user_id == ^\"AcNO8UnRO1QM4EYK3c\"\n"} Nov 29 15:33:10 [mycrowd] [error] #PID<0.3079.0> running Pleroma.Web.Endpoint (connection #PID<0.3078.0>, stream id 1) terminated_Server: mycrowd.ca:80 (http)_Request: POST /inbox_** (exit) an exception was raised:_ ** (Ecto.MultipleResultsError) expected at most one result but got 2 in query:__from s0 in Pleroma.User.SigningKey,_ where: s0.user_id == ^"AcNO8UnRO1QM4EYK3c"__ (ecto 3.10.3) lib/ecto/repo/queryable.ex:154: Ecto.Repo.Queryable.one/3_ (pleroma 3.13.3-177-g34aa1694) lib/pleroma/user/signing_key.ex:182: Pleroma.User.SigningKey.get_or_fetch_by_key_id/1_ (pleroma 3.13.3-177-g34aa1694) lib/pleroma/web/plugs/ensure_user_public_key_plug.ex:15: Pleroma.Web.Plugs.EnsureUserPublicKeyPlug.call/2_ (pleroma 3.13.3-177-g34aa1694) Pleroma.Web.Router.http_signature/2_ (pleroma 3.13.3-177-g34aa1694) Pleroma.Web.Router.activitypub/2_ (pleroma 3.13.3-177-g34aa1694) lib/pleroma/web/router.ex:5: Pleroma.Web.Router.__pipe_through21__/1_ (phoenix 1.7.14) lib/phoenix/router.ex:475: Phoenix.Router.__call__/5_ (pleroma 3.13.3-177-g34aa1694) lib/pleroma/web/endpoint.ex:5: Pleroma.Web.Endpoint.plug_builder_call/2 Nov 29 15:33:15 [mycrowd] [error] Object rejected while fetching https://sfba.social/users/cynblogger/statuses/113568854301203915 {:transmogrifier, {:error, {:validate, {:error, #Ecto.Changeset<action: :insert, changes: %{type: "Create", context: "tag:hachyderm.io,2024-11-29:objectId=214983319:objectType=Conversation", cc: ["https://hachyderm.io/users/al3x", "https://sfba.social/users/cynblogger/followers"], to: ["https://www.w3.org/ns/activitystreams#Public"], actor: "https://sfba.social/users/cynblogger", object: "https://sfba.social/users/cynblogger/statuses/113568854301203915"}, errors: [object: {"The object to create already exists", []}], data: #Pleroma.Web.ActivityPub.ObjectValidators.CreateGenericValidator<>, valid?: false>}}}} ``` ### Severity I can manage ### Have you searched for this issue? - [x] I have double-checked and have not found this issue mentioned anywhere.
kinetix added the
bug
label 2024-11-30 21:19:23 +00:00
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: AkkomaGang/akkoma#858
No description provided.