Closed Bug 1654282 Opened 4 years ago Closed 4 years ago

websocket fails to connect

Categories

(Core :: Networking: WebSockets, defect, P2)

80 Branch
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: u605551, Assigned: kershaw)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:80.0) Gecko/20100101 Firefox/80.0

Steps to reproduce:

Use glowing-bear.org to connect to a weechat server.
The app is using websocket protocol internally.

Actual results:

The site fails to connect, console shows that the browser sent a request, and the connection then gets terminated with error 1006.

Expected results:

The site should have been able to connect. This is a regression, the site worked on a earlier nightly in 80 branch.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Networking: WebSockets
Product: Firefox → Core

(In reply to 86ecce74 from comment #0)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:80.0) Gecko/20100101 Firefox/80.0

Steps to reproduce:

Use glowing-bear.org to connect to a weechat server.
The app is using websocket protocol internally.

Actual results:

The site fails to connect, console shows that the browser sent a request, and the connection then gets terminated with error 1006.

Expected results:

The site should have been able to connect. This is a regression, the site worked on a earlier nightly in 80 branch.

Could you use mozregression to find out which changeset causes this problem?
Thanks.

Flags: needinfo?(86ecce74)

2020-07-21T20:11:53.719000: INFO : Narrowed integration regression window from [15e2f6e7, 2494b411] (3 builds) to [15e2f6e7, 39c56dc3] (2 builds) (~1 steps left)
2020-07-21T20:11:53.736000: DEBUG : Starting merge handling...
2020-07-21T20:11:53.736000: DEBUG : Using url: https://hg.mozilla.org/integration/autoland/json-pushes?changeset=39c56dc3d46928bd0f4d61a15c7321603a47a7aa&full=1
2020-07-21T20:11:53.737000: DEBUG : redo: attempt 1/3
2020-07-21T20:11:53.737000: DEBUG : redo: retry: calling _default_get with args: ('https://hg.mozilla.org/integration/autoland/json-pushes?changeset=39c56dc3d46928bd0f4d61a15c7321603a47a7aa&full=1',), kwargs: {}, attempt #1
2020-07-21T20:11:53.740000: DEBUG : urllib3.connectionpool: Resetting dropped connection: hg.mozilla.org
2020-07-21T20:11:55.145000: DEBUG : urllib3.connectionpool: https://hg.mozilla.org:443 "GET /integration/autoland/json-pushes?changeset=39c56dc3d46928bd0f4d61a15c7321603a47a7aa&full=1 HTTP/1.1" 200 None
2020-07-21T20:11:55.145000: DEBUG : Found commit message:
Bug 1625070 - Use glxCopySubBufferMESA when available if partial present and WebRender are enabled on GLX. r=jgilbert

Differential Revision: https://phabricator.services.mozilla.com/D81868

2020-07-21T20:11:55.145000: DEBUG : Did not find a branch, checking all integration branches
2020-07-21T20:11:55.145000: INFO : The bisection is done.
2020-07-21T20:11:55.145000: INFO : Stopped

Flags: needinfo?(86ecce74)

(In reply to 86ecce74 from comment #3)

2020-07-21T20:11:53.719000: INFO : Narrowed integration regression window from [15e2f6e7, 2494b411] (3 builds) to [15e2f6e7, 39c56dc3] (2 builds) (~1 steps left)
2020-07-21T20:11:53.736000: DEBUG : Starting merge handling...
2020-07-21T20:11:53.736000: DEBUG : Using url: https://hg.mozilla.org/integration/autoland/json-pushes?changeset=39c56dc3d46928bd0f4d61a15c7321603a47a7aa&full=1
2020-07-21T20:11:53.737000: DEBUG : redo: attempt 1/3
2020-07-21T20:11:53.737000: DEBUG : redo: retry: calling _default_get with args: ('https://hg.mozilla.org/integration/autoland/json-pushes?changeset=39c56dc3d46928bd0f4d61a15c7321603a47a7aa&full=1',), kwargs: {}, attempt #1
2020-07-21T20:11:53.740000: DEBUG : urllib3.connectionpool: Resetting dropped connection: hg.mozilla.org
2020-07-21T20:11:55.145000: DEBUG : urllib3.connectionpool: https://hg.mozilla.org:443 "GET /integration/autoland/json-pushes?changeset=39c56dc3d46928bd0f4d61a15c7321603a47a7aa&full=1 HTTP/1.1" 200 None
2020-07-21T20:11:55.145000: DEBUG : Found commit message:
Bug 1625070 - Use glxCopySubBufferMESA when available if partial present and WebRender are enabled on GLX. r=jgilbert

Differential Revision: https://phabricator.services.mozilla.com/D81868

2020-07-21T20:11:55.145000: DEBUG : Did not find a branch, checking all integration branches
2020-07-21T20:11:55.145000: INFO : The bisection is done.
2020-07-21T20:11:55.145000: INFO : Stopped

It's weird that a graphic bug could cause this bug. :nical, could you take a look?
Thanks.

In addition, I can't reproduce this on my laptop when connecting to my local weechat server.
Reporter, do you probably have a public weechat server that we can use to debug?
Thanks.

Flags: needinfo?(nical.bugzilla)
Flags: needinfo?(86ecce74)

I have a suspicion mozregression failed to identify the proper commit. Please wait while i try bisecting manually, but i suspect https://phabricator.services.mozilla.com/rMOZILLACENTRAL74bb3c2ab767a67e3e67f9781ce13ea2cebca918 and https://phabricator.services.mozilla.com/rMOZILLACENTRALf7b6aac1b58bc959e431136e1b23231abe55d0b1 have something to do with my problem

(In reply to 86ecce74 from comment #5)

I have a suspicion mozregression failed to identify the proper commit. Please wait while i try bisecting manually, but i suspect https://phabricator.services.mozilla.com/rMOZILLACENTRAL74bb3c2ab767a67e3e67f9781ce13ea2cebca918 and https://phabricator.services.mozilla.com/rMOZILLACENTRALf7b6aac1b58bc959e431136e1b23231abe55d0b1 have something to do with my problem

That's what I also worry about. :(
Could you try to capture the log? Please also append nsWebSocket:5 to MOZ_LOG. Thanks.

Flags: needinfo?(nical.bugzilla)
Flags: needinfo?(86ecce74)

Thanks a lot for your effort! I think the best is to back out the patch that causes this bug.
I'll use the next nightly cycle to debug and re-land the patch.

I've checked the log, but I can't find any problem. The log shows there are two websocket channels created and both of them are still alive at the end of the log. Maybe the log is not complete?

Could you tell me more about how you setup the weechat server? It'd be great if I can debug this by myself.
Thanks.

Flags: needinfo?(86ecce74)

The issue can manifest itself in multiple ways, sometimes it disconnects instantly, sometimes it just never logs in and times out. I am using the unencrypted relay mode in weechat (/relay add weechat <port>) with nginx as a reverse proxy to add encryption. The relevant parts of nginx configs are below:


server {
    listen 80;
    listen [::]:80;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name <url>;
    add_header "Strict-Transport-Security" "max-age=31536000; includeSubDomains";

    ssl_certificate <path to cert>;
    ssl_certificate_key <path to cert>;

    location /weechat {
        proxy_set_header Connection "Upgrade";
        proxy_set_header Upgrade $http_upgrade;
        proxy_pass http://localhost:21337;
    }
}
Flags: needinfo?(86ecce74)
Flags: needinfo?(kershaw)
Assignee: nobody → kershaw
Severity: -- → S3
Flags: needinfo?(kershaw)
Priority: -- → P2
Whiteboard: [necko-triaged]

Looks like it was fixed, at least on my windows machine. (macos was exibiting the same bug, havent tested if it was fixed there too yet.)

confirming this as fixed, please close this one.

Flags: needinfo?(nhnguyen)

Note that this is fixed by backing out the patches in bug 1497249, not a real fix.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Flags: needinfo?(nhnguyen)
Resolution: --- → WORKSFORME

Hi Reporter,

May I ask you to test this bug again with this build?

Thanks!

Flags: needinfo?(86ecce74)

Confirming the new build as working

Flags: needinfo?(86ecce74)

(In reply to 86ecce74 from comment #16)

Confirming the new build as working

Thank you.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: