-
Notifications
You must be signed in to change notification settings - Fork 357
webscalesqlclient cannot connect to mysql db on OSX #23
Comments
Can you give more information on the problem you see and why you are offering to add sleeping to the client code? |
This only affects Mac but not Linux. It looks like the packet is not available yet before the sleep. If the sleep is removed, Adding a sleep is only a temporary fix. A more stable fix is needed for this issue. |
The same issue on OSX for mysql/mysqli. PDO connects normally. |
The source of the bad read and error ultimately comes from here: https://github.com/webscalesql/webscalesql-5.6/blob/75b113fadf6dc9aabfedad559fec7181f03e7ad2/vio/viosocket.c#L125-L131 That block was added as part of the async mysql diff, and doesn't exist upstream. It also looks very wrong to me. My understanding of the surrounding loop is that it attempts to read from a socket, maybe getting some data, and then waiting until more data is available. This process seems like it should be the same whether the socket is blocking or not (and HHVM tends to have nonblocking sockets here, since it sets timeouts in the mysql/mysqli extensions, which cause webscalesql to mark the socket as nonblocking, since the timeout logic is done in But it's unclear why this seems to mostly (only?) affect OS X... In any event, that block looks wrong, should it be removed? cc @steaphangreene who wrote it, @chipturner and @darnaut who had some discussion about a close bit of code in |
Summary: This is fairly ugly, and can hopefully get fixed in webscalesql, but until then makes mysql and mysqli work on OS X. Upstream bug discussion at facebookarchive/webscalesql-5.6#23 Reviewed By: @paulbiss Differential Revision: D2390712
Summary: This is fairly ugly, and can hopefully get fixed in webscalesql, but until then makes mysql and mysqli work on OS X. Upstream bug discussion at facebookarchive/webscalesql-5.6#23 Reviewed By: @paulbiss Differential Revision: D2390712
Just proposed https://reviews.facebook.net/D46023 to fix this. |
Running the following script from php.net with hhvm master on Mac, I get
Warning: mysql_connect(): Lost connection to MySQL server at 'reading authorization packet', system error: 35 in mysql.php on line 2
.This is a temporary fix after basic debugging:
Link to the same issue in the hhvm project: facebook/hhvm#5558.
The text was updated successfully, but these errors were encountered: