Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server crashes on the 32767th connection. #1449

Open
QUICTester opened this issue Jul 7, 2023 · 3 comments
Open

Server crashes on the 32767th connection. #1449

QUICTester opened this issue Jul 7, 2023 · 3 comments

Comments

@QUICTester
Copy link

There is a hardcoded value in an assertion statement ("target/debug/build/neqo-crypto-a4be3db97961b0ce/out/nspr/pr/src/io/prlayer.c:619") causing the Neqo server only able to accepts up to 32767 connections (including the closed connections). After the 36767th connection, the server will crash with an assertion error. We know that the PRIntn data type used for PRDescIdentity is guaranteed to be 16-bits long. However, the PRIntn data type on our architecture is 32 bits long. Therefore, instead of using a hardcoded value, the assertion statement should use a dynamic value that follows the architecture (reference: https://firefox-source-docs.mozilla.org/nspr/reference/printn.html).

@larseggert
Copy link
Collaborator

larseggert commented Mar 27, 2024

This is the crash
https://github.com/nss-dev/nspr/blob/dead7133d4535bf4fade1814dd8c261c01b76635/pr/src/io/prlayer.c#L619

Called from

let id = unsafe { prio::PR_GetUniqueIdentity(label.as_ptr()) };

@martinthomson
Copy link
Member

I'm surprised that we can handle that many connections, but maybe we can tweak NSPR. The 16 bit era is long gone.

@larseggert
Copy link
Collaborator

Patch to NSPR in https://bugzilla.mozilla.org/show_bug.cgi?id=1890927

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants