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

Enabling -sSOCKET_DEBUG= spams console with all kinds of debugging unrelated to sockets debugging. #22551

Open
juj opened this issue Sep 10, 2024 · 1 comment

Comments

@juj
Copy link
Collaborator

juj commented Sep 10, 2024

I am investigating a bug in our code regarding __syscall_send in pthreads proxied builds. Code works in singlethreaded builds, but doesn't in multithreaded. To quickly be able to figure out what is the discrepancy between ST and MT builds, I want to enable -sSOCKET_DEBUG=1 to be able to dump the WebSockets comms in each.

However, when I do that, I get a build that spams to me all sorts of other debug info and the interesting information that I want to debug with WebSockets is drowned in the noise:

image

making it impossible to find the actual sockets debug prints.

I see there's this construct:

image

and hence

image

Locally I can get rid of this by deleting the line

image

but it doesn't seem that SOCKET_DEBUG (or any of those xxx_DEBUGs for that matter?) should imply RUNTIME_DEBUG, that is counterproductive?

@sbc100
Copy link
Collaborator

sbc100 commented Sep 10, 2024

I've found it useful to enable RUNTIME_DEBUG automatically whenever I enable any of the other kinds of debugging.

The idea is that RUNTIME_DEBUG includes core stuff that its always useful to see.

However, I guess for some applications it doesn't make sense to include maybeExit or checkStackCookie since they seems to be happening so much.

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

2 participants