element-hq / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://element-hq.github.io/synapse
GNU Affero General Public License v3.0
1.36k stars 161 forks source link

public rooms in space not visible #17174

Open OE1KHZ opened 4 months ago

OE1KHZ commented 4 months ago

Description

previously added public spaces are not displayed in the superspace anymore. I cannot remove nor add the vanished spaces to the space.

Synapse logspams "space hierarchy problem", logs are from opening that superspace (see below). It seems like it's trying to find rooms which no longer exist.

Space view (doesnt show the spaces): image

Left Tab view (shows the spaces): image

I already discussed this issue in the synapse room but unfortuantely it couldnt be solved: https://matrix.to/#/!ehXvUhWNASUkSLvAGP:matrix.org/$qH1R4RatiMPHKDPiCryA5gMbYGr5atU6f5HpWkkcR60?via=matrix.org&via=matrix.breakpointingbad.com&via=dev.kyn.be

Steps to reproduce

I expect to see all added spaces in the "super" space.

Homeserver

matrix.oevsv.at

Synapse Version

1.106.0

Installation Method

Debian packages from packages.matrix.org

Database

PostgreSQL, single, not ported, no backup

Workers

Single process

Platform

Debian bookworm

Configuration

nothing unusual

Relevant log output

2024-05-09 14:21:29,331 - synapse.handlers.room_summary - 491 - INFO - GET-2692 - Requesting summary for !OPbIwSSTezqxdpIQXr:matrix.oevsv.at via ['matrix.oevsv.at']
2024-05-09 14:21:29,331 - synapse.handlers.room_summary - 506 - WARNING - GET-2692 - Unable to get hierarchy of !OPbIwSSTezqxdpIQXr:matrix.oevsv.at via federation: 502: Failed to fetch room hierarchy via any server
2024-05-09 14:21:29,332 - synapse.handlers.room_summary - 491 - INFO - GET-2692 - Requesting summary for !FhFpSKuGERRfHiXYTS:matrix.oevsv.at via ['matrix.oevsv.at']
2024-05-09 14:21:29,332 - synapse.handlers.room_summary - 506 - WARNING - GET-2692 - Unable to get hierarchy of !FhFpSKuGERRfHiXYTS:matrix.oevsv.at via federation: 502: Failed to fetch room hierarchy via any server
2024-05-09 14:21:29,332 - synapse.handlers.room_summary - 491 - INFO - GET-2692 - Requesting summary for !CSWXSKnykTkEPwYTzt:matrix.oevsv.at via ['matrix.oevsv.at']
2024-05-09 14:21:29,332 - synapse.handlers.room_summary - 506 - WARNING - GET-2692 - Unable to get hierarchy of !CSWXSKnykTkEPwYTzt:matrix.oevsv.at via federation: 502: Failed to fetch room hierarchy via any server
2024-05-09 14:21:29,332 - synapse.handlers.room_summary - 491 - INFO - GET-2692 - Requesting summary for !HZUfGTOEJlvZLZETzq:matrix.oevsv.at via ['matrix.oevsv.at']
2024-05-09 14:21:29,332 - synapse.handlers.room_summary - 506 - WARNING - GET-2692 - Unable to get hierarchy of !HZUfGTOEJlvZLZETzq:matrix.oevsv.at via federation: 502: Failed to fetch room hierarchy via any server
2024-05-09 14:21:29,335 - synapse.handlers.room_summary - 491 - INFO - GET-2692 - Requesting summary for !mAsGDNGrQdNJPZDFyL:matrix.oevsv.at via ['matrix.oevsv.at']
2024-05-09 14:21:29,335 - synapse.handlers.room_summary - 506 - WARNING - GET-2692 - Unable to get hierarchy of !mAsGDNGrQdNJPZDFyL:matrix.oevsv.at via federation: 502: Failed to fetch room hierarchy via any server
2024-05-09 14:21:29,335 - synapse.handlers.room_summary - 491 - INFO - GET-2692 - Requesting summary for !xGCDqHzTkvYCPYAWhF:matrix.oevsv.at via ['matrix.oevsv.at']
2024-05-09 14:21:29,335 - synapse.handlers.room_summary - 506 - WARNING - GET-2692 - Unable to get hierarchy of !xGCDqHzTkvYCPYAWhF:matrix.oevsv.at via federation: 502: Failed to fetch room hierarchy via any server
2024-05-09 14:21:29,335 - synapse.handlers.room_summary - 491 - INFO - GET-2692 - Requesting summary for !snRNNLEEcIFzcHbrBw:matrix.oevsv.at via ['matrix.oevsv.at']
2024-05-09 14:21:29,335 - synapse.handlers.room_summary - 506 - WARNING - GET-2692 - Unable to get hierarchy of !snRNNLEEcIFzcHbrBw:matrix.oevsv.at via federation: 502: Failed to fetch room hierarchy via any server
2024-05-09 14:21:29,335 - synapse.handlers.room_summary - 491 - INFO - GET-2692 - Requesting summary for !KOXdBBzznryLgnufoM:matrix.oevsv.at via ['matrix.oevsv.at']
2024-05-09 14:21:29,335 - synapse.handlers.room_summary - 506 - WARNING - GET-2692 - Unable to get hierarchy of !KOXdBBzznryLgnufoM:matrix.oevsv.at via federation: 502: Failed to fetch room hierarchy via any server
2024-05-09 14:21:29,338 - synapse.handlers.room_summary - 491 - INFO - GET-2692 - Requesting summary for !ykbAgtRTkOMRMmuIwR:matrix.oevsv.at via ['matrix.oevsv.at']
2024-05-09 14:21:29,338 - synapse.handlers.room_summary - 506 - WARNING - GET-2692 - Unable to get hierarchy of !ykbAgtRTkOMRMmuIwR:matrix.oevsv.at via federation: 502: Failed to fetch room hierarchy via any server
2024-05-09 14:21:29,338 - synapse.handlers.room_summary - 491 - INFO - GET-2692 - Requesting summary for !MkPZNPOOsjvyGzxFdE:matrix.oevsv.at via ['matrix.oevsv.at']
2024-05-09 14:21:29,338 - synapse.handlers.room_summary - 506 - WARNING - GET-2692 - Unable to get hierarchy of !MkPZNPOOsjvyGzxFdE:matrix.oevsv.at via federation: 502: Failed to fetch room hierarchy via any server
2024-05-09 14:21:29,345 - synapse.handlers.room_summary - 491 - INFO - GET-2692 - Requesting summary for !UGDGsUlzqRROjiYiWD:matrix.oevsv.at via ['matrix.oevsv.at']
2024-05-09 14:21:29,345 - synapse.handlers.room_summary - 506 - WARNING - GET-2692 - Unable to get hierarchy of !UGDGsUlzqRROjiYiWD:matrix.oevsv.at via federation: 502: Failed to fetch room hierarchy via any server
2024-05-09 14:21:29,345 - synapse.handlers.room_summary - 491 - INFO - GET-2692 - Requesting summary for !SnLjjvgEDuKVugjdbQ:matrix.oevsv.at via ['matrix.oevsv.at']
2024-05-09 14:21:29,345 - synapse.handlers.room_summary - 506 - WARNING - GET-2692 - Unable to get hierarchy of !SnLjjvgEDuKVugjdbQ:matrix.oevsv.at via federation: 502: Failed to fetch room hierarchy via any server
2024-05-09 14:21:29,349 - synapse.handlers.room_summary - 649 - INFO - GET-2692 - room !paamApMylmjDacgjjn:matrix.oevsv.at is unpeekable and requester @oe1khz:matrix.oevsv.at is not a member / not allowed to join, omitting from summary
2024-05-09 14:21:29,362 - synapse.handlers.room_summary - 491 - INFO - GET-2692 - Requesting summary for !UHCgnKGFBemgxPiLyc:matrix.oevsv.at via ['matrix.oevsv.at']
2024-05-09 14:21:29,362 - synapse.handlers.room_summary - 506 - WARNING - GET-2692 - Unable to get hierarchy of !UHCgnKGFBemgxPiLyc:matrix.oevsv.at via federation: 502: Failed to fetch room hierarchy via any server
2024-05-09 14:21:29,379 - synapse.access.http.8008 - 473 - INFO - GET-2692 - 188.23.57.148 - 8008 - {@oe1khz:matrix.oevsv.at} Processed request: 0.052sec/0.001sec (0.009sec, 0.005sec) (0.006sec/0.031sec/43) 16121B 200 "GET /_matrix/client/v1/rooms/!oRJuBQyKFTqrluUIvO%3Amatrix.oevsv.at/hierarchy?suggested_only=false&limit=20 HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0" [0 dbevts]

Anything else that would be useful to know?

No response

reivilibre commented 4 months ago

This seems weird:

Requesting summary for !snRNNLEEcIFzcHbrBw:matrix.oevsv.at via ['matrix.oevsv.at']

Maybe this is just misleading logging but I don't think it should be 'requesting' summaries from itself.

OE1KHZ commented 4 months ago

I don't know. I'm not that deep into synapse.

Sadly I haven't found any solution to this problem in the meantime...

sandhose commented 3 months ago

Looking at the code, it looks like this could be triggered if all the users on the homeserver left a subspace, but that subspace is still referenced by the parent space. Because Synapse thinks the space/room doesn't exist locally, it will try to summarise it over federation, which it can't

@OE1KHZ was there any other user in those subspaces or was it just you? If it was just you, it is expected that if you leave a space, it will get deleted with no way to go back in. I guess the problem then is that it is still referenced in the parent space, which spams the log

OE1KHZ commented 3 months ago

@sandhose Thank you for looking into this issue. There still are ppl in these subspaces, not just me. The subspaces still exist, but I deleted some rooms within them (not only in those that disappeared) a while ago.

Does that mean that "deleting" (leaving) a room doesn't remove space references?

Sadly, that doesn't explain why spaces and rooms that are still existing aren't shown in the superspace...

sandhose commented 3 months ago

There still are ppl in these subspaces, not just me. The subspaces still exist, but I deleted some rooms within them (not only in those that disappeared) a while ago.

The problem is that the parent space only has a reference via your homeserver. So when it tries to query that space, it only ever knew that your homeserver was in it, not the other ones.

A fix would probably be to ask someone to invite you back in those subspaces?

Does that mean that "deleting" (leaving) a room doesn't remove space references?

Yes that is the case

Sadly, that doesn't explain why spaces and rooms that are still existing aren't shown in the superspace...

Well if you left a space, the rooms within that space stop showing up, I think that is supposed to be the case?

OE1KHZ commented 3 months ago

A fix would probably be to ask someone to invite you back in those subspaces?

I still am in those subspaces... the problem is that these subspaces don't show up in the parent space.

Well if you left a space, the rooms within that space stop showing up, I think that is supposed to be the case?

I didn't leave any subspace. I deleted some rooms within a subspace (I am a member of) and now i can't find the subspace (which I am a member of) in the parent space (member too) anymore. I didn't delete or leave any space. I don't know if the deletion of the rooms within the subspace is connected to the subspace vanishing in the parent space in any way.

OE1KHZ commented 3 months ago

Example: 329260177-08092388-d8f4-4c8d-b32a-39aa39567ddc Here in the left tab all the subspaces, which I am a member of, within the parentspace are shown. There's no problem here.

Now the space view of the parentspace: 329260251-a8a4580a-e85f-4adb-9cf3-6dfbb68c58a9 There are 2 spaces missing: LV7 and LV6 Why?

OE1KHZ commented 1 month ago

Hi, still having the same issue. Is there any update regarding this problem?