Rare server connection issues (Tor bug?) #173

Open
opened 1 year ago by sarah · 7 comments
sarah commented 1 year ago
Owner

Long running clients very occasionally stop being able to connect to a Cwtch server without a Tor reset.

My suspicion is that occasionally the underlying Tor circuit breaks down in a weird way - basically Tor thinks the onion is unreachable even though it isn't - resetting Tor through the Tor settings screen in these cases does fix the connection issue.

The tell tale sign of this error is if there are 2 profiles on the same cwtch client they will both be unable to connect to the same server (even though they are instantiating different overlay connections). It's something I've been keeping an eye out for but it's rare enough that I've only seen it happen once.

Long running clients very occasionally stop being able to connect to a Cwtch server without a Tor reset. My suspicion is that occasionally the underlying Tor circuit breaks down in a weird way - basically Tor thinks the onion is unreachable even though it isn't - resetting Tor through the Tor settings screen in these cases does fix the connection issue. The tell tale sign of this error is if there are 2 profiles on the same cwtch client they will both be unable to connect to the same server (even though they are instantiating different overlay connections). It's something I've been keeping an eye out for but it's rare enough that I've only seen it happen once.
sarah added the
tor
label 1 year ago

I'm wondering if this is different than a long running client dropping the connection to a group chat? I ask because I often leave my laptop running all day (or longer) with Cwtch running and sometimes when I check Cwtch the connection to the Release Candidate Testers group chat has dropped and can only be reconnected by resetting the tor circuit. I'm on the Mac version 1.2.1 and I only have one profile.

I'm wondering if this is different than a long running client dropping the connection to a group chat? I ask because I often leave my laptop running all day (or longer) with Cwtch running and sometimes when I check Cwtch the connection to the Release Candidate Testers group chat has dropped and can only be reconnected by resetting the tor circuit. I'm on the Mac version 1.2.1 and I only have one profile.

I guess I should point out that the connection to fuzzbot, Dan and Sarah have not dropped in this scenario.

I guess I should point out that the connection to fuzzbot, Dan and Sarah have not dropped in this scenario.

Looks like it might be network conditions on my end which drop the connection: switching to a VPN, MacOS putting the hard drive to sleep (which it shouldn't do according to my power management preferences but happens anyhow because of a known - and unfixed - bug in Mojave). Although these conditions kill all connections.

Looks like it might be network conditions on my end which drop the connection: switching to a VPN, MacOS putting the hard drive to sleep (which it shouldn't do according to my power management preferences but happens anyhow because of a known - and unfixed - bug in Mojave). Although these conditions kill all connections.

Ok. Cwtch Version 1.3. I just switched to VPN an no Cwtch connections lost. So much for that part of the theory. Although I do see "Fix Tor integration on MacOS" in the changelog for 1.3 so that appears to be fixed. Of course, when the hard drive sleeps the wifi conection is lost so obviously Cwtch connections are lost.

Ok. Cwtch Version 1.3. I just switched to VPN an no Cwtch connections lost. So much for that part of the theory. Although I do see "Fix Tor integration on MacOS" in the changelog for 1.3 so that appears to be fixed. Of course, when the hard drive sleeps the wifi conection is lost so obviously Cwtch connections are lost.

I keep running into this bug, on desktop Arch Linux, running cwtch 1.3 (also affected earlier versions).

Closing and re-opening cwtch fixes the issue when it happens, and the group chats come online again.

Is there anything I could do to help debug this further, next time it happens?

I keep running into this bug, on desktop Arch Linux, running cwtch 1.3 (also affected earlier versions). Closing and re-opening cwtch fixes the issue when it happens, and the group chats come online again. Is there anything I could do to help debug this further, next time it happens?

There is a quicker fix within Cwtch - reset the tor circuit from either the settings screen or the main view. It's the little button that looks like an onion. See attachmentment ;) That usually does the trick.

There is a quicker fix within Cwtch - reset the tor circuit from either the settings screen or the main view. It's the little button that looks like an onion. See attachmentment ;) That usually does the trick.
Poster
Owner

I keep running into this bug, on desktop Arch Linux, running cwtch 1.3 (also affected earlier versions).

Closing and re-opening cwtch fixes the issue when it happens, and the group chats come online again.

Is there anything I could do to help debug this further, next time it happens?

Intersting. Running with debug enabled env LOG_LEVEL=debug might surface some clues - but I don't think there is enough information in those logs to reach a conclusion right now.

One work item I want to get around to this sprint is surfacing some more information from the underlying Tor process up to the app level which should hopfully provide some more data on what exactly is happening here.

> I keep running into this bug, on desktop Arch Linux, running cwtch 1.3 (also affected earlier versions). > > Closing and re-opening cwtch fixes the issue when it happens, and the group chats come online again. > > Is there anything I could do to help debug this further, next time it happens? Intersting. Running with debug enabled `env LOG_LEVEL=debug` *might* surface some clues - but I don't think there is enough information in those logs to reach a conclusion right now. One work item I want to get around to this sprint is surfacing some more information from the underlying Tor process up to the app level which should hopfully provide some more data on what exactly is happening here.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: cwtch.im/cwtch-ui#173
Loading…
There is no content yet.