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

Login with mysql client lost username will be hang #4179

Closed
wubx opened this issue Feb 16, 2022 · 6 comments · Fixed by #4317
Closed

Login with mysql client lost username will be hang #4179

wubx opened this issue Feb 16, 2022 · 6 comments · Fixed by #4317
Assignees
Labels
A-meta Area: databend meta serive C-feature Category: feature community-take

Comments

@wubx
Copy link
Member

wubx commented Feb 16, 2022

Summary

use mysql client login databend lost username will be hang.

$mysql -h127.0.0.1 -P3307

databend-query + databend-meta

mysql> select version();
+-------------------------------------------------------------------------------------+
| version()                                                                           |
+-------------------------------------------------------------------------------------+
| DatabendQuery v-0.1.0-aaeb1dc-simd(1.60.0-nightly-2022-02-14T16:33:14.231860+00:00) |
+-------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
Read 1 rows, 1 B in 0.001 sec., 1.31 thousand rows/sec., 1.31 KB/sec.

mysql> show processlist;
+--------------------------------------+-------+-----------------+------+-------+----------+------------------+--------------+------------------------+-------------------------+-------------------------+--------------------------+
| id                                   | type  | host            | user | state | database | extra_info       | memory_usage | dal_metrics_read_bytes | dal_metrics_write_bytes | scan_progress_read_rows | scan_progress_read_bytes |
+--------------------------------------+-------+-----------------+------+-------+----------+------------------+--------------+------------------------+-------------------------+-------------------------+--------------------------+
| a8eb5161-a777-481d-be8b-c304cd464837 | MySQL | 127.0.0.1:63458 | NULL | Query | default  |                  |            0 |                      0 |                       0 |                       0 |                        0 |
| f7692569-2a3d-440a-b920-c652f6448a85 | MySQL | 127.0.0.1:62881 | NULL | Query | default  |                  |            0 |                      0 |                       0 |                       0 |                        0 |
| daa50c12-dd6b-4868-a5e2-33433f149e43 | MySQL | 127.0.0.1:62811 | NULL | Query | default  |                  |            0 |                      0 |                       0 |                       0 |                        0 |
| db02d1b6-ea7f-43ef-9569-04960f81c7eb | MySQL | 127.0.0.1:62818 | root | Query | default  | show processlist |            0 |                      0 |                       0 |                       0 |                        0 |
+--------------------------------------+-------+-----------------+------+-------+----------+------------------+--------------+------------------------+-------------------------+-------------------------+--------------------------+
4 rows in set (0.00 sec)
Read 4 rows, 732 B in 0.003 sec., 1.43 thousand rows/sec., 261.5 KB/sec.

Note: User column is: NULL

Please make errors like single databend-query.

@wubx wubx added C-feature Category: feature A-meta Area: databend meta serive labels Feb 16, 2022
@flaneur2020
Copy link
Member

/assignme

@flaneur2020
Copy link
Member

it seems the process hangs at the grpc client get_kv() method:

Screen Shot 2022-03-03 at 6 40 18 PM

and the default grpc client timeout is 60 seconds

@BohuTANG
Copy link
Member

BohuTANG commented Mar 3, 2022

We can track the metasrv log to see what is said.

@flaneur2020
Copy link
Member

flaneur2020 commented Mar 3, 2022

after setting the grpc client time out as 1 second, the do_read function also get hangs.

it seems hangs at the make_client routine on getting an instance from the pool:

Screen Shot 2022-03-03 at 8 46 22 PM
Screen Shot 2022-03-03 at 8 50 08 PM

@flaneur2020
Copy link
Member

it seems get hangs in the handshake among connecting a grpc channel:
Screen Shot 2022-03-03 at 9 50 18 PM

@flaneur2020
Copy link
Member

as @zhang2014 suggested, we can not safely create tonic channel in a block_on().

this issue might relevant, let's try make the authenticate() method async.
datafuse-extras/msql-srv#21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: databend meta serive C-feature Category: feature community-take
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants