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

[VarDumper] Server socket problem on OS X #46145

Open
FabienPapet opened this issue Apr 22, 2022 · 5 comments
Open

[VarDumper] Server socket problem on OS X #46145

FabienPapet opened this issue Apr 22, 2022 · 5 comments

Comments

@FabienPapet
Copy link

@FabienPapet FabienPapet commented Apr 22, 2022

Symfony version(s) affected

6.0

Description

I have a small code project (cf reproducer) that works fine on Dell XPS intel with ubuntu and breaks on last M1 mac.

Looks like I have a stream_socket_sendto(): Socket is not connected error when I tried to figure it out. What is weird is that the script can work "sometimes" which means that IMHO it can't be a configuration error.

This bug may be present on older versions as well, but I didn't test it on older versions.

How to reproduce

I created a reproducer

https://github.com/FabienPapet/test-php with all installation instructions

Possible Solution

No response

Additional Context

No response

@FabienPapet
Copy link
Author

@FabienPapet FabienPapet commented Apr 22, 2022

image

@ogizanagi
Copy link

@ogizanagi ogizanagi commented Apr 22, 2022

Thx @FabienPapet for the report and the reproducer. I don't own a M1 yet, but I tried your reproducer on my Intel MacBook and actually, I do get the "stream_socket_sendto(): Socket is not connected (by adding the var_dump) systematically, despite receiving the dump on the server 🤔

EDIT: well, actually it's because of the non-blocking mode (STREAM_CLIENT_ASYNC_CONNECT flag). Do you still encounter the issue with it?

@FabienPapet
Copy link
Author

@FabienPapet FabienPapet commented Apr 22, 2022

Oh I didn't test the var_dump() debug on intel, because it works to be honest :)

Looks like removing the STREAM_CLIENT_ASYNC_CONNECT flag solves the issue.

EDIT:

I guess the non-blocking should be somehow configurable, should I create a PR to add a blocking mode ?

@ogizanagi
Copy link

@ogizanagi ogizanagi commented Apr 22, 2022

I originally had issues with this flag as well on OS X when introducing the VarDumper server feature. Might be the time to re-consider the change, or at least introduce a way to configure it indeed.

@FabienPapet
Copy link
Author

@FabienPapet FabienPapet commented Apr 22, 2022

I also had confirmation that this also appends on previous mac version (M1 & intel).

@FabienPapet FabienPapet changed the title [VarDumper] Server socket problem with on mac M1 pro 2021 [VarDumper] Server socket problem with on OS X Apr 22, 2022
@FabienPapet FabienPapet changed the title [VarDumper] Server socket problem with on OS X [VarDumper] Server socket problem on OS X Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants