Skip to content

[Bug]: unexpected result of SHOW PROCESSLIST #11025

Closed

Description

@aylei

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Environment

- Version or commit-id (e.g. v0.1.0 or 8b23a93): dea31688
- Hardware parameters: 
- OS type:
- Others:

Actual Behavior

  1. SHOW PROCESSLIST does not show the process list:
mysql> show backend servers;
+--------------------------------------+------------------+------------+----------------+
| UUID                                 | Address          | Work State | Labels         |
+--------------------------------------+------------------+------------+----------------+
| 61336432-3136-6136-6434-613130366637 | 10.0.157.55:6001 | Working    | account:aylei; |
+--------------------------------------+------------------+------------+----------------+
1 row in set (0.09 sec)

mysql> show processlist;
Empty set (0.17 sec)

mysql> show processlist;
+--------------------------------------+---------+--------------------------------------+---------+-------------+------------------+------+----------------------------+-----------+------------------+----------------------------------+--------------------------------------+------------------+------------+-----------------+----------------------------+
| node_id                              | conn_id | session_id                           | account | user        | host             | db   | session_start              | command   | info             | txn_id                           | statement_id                         | statement_type   | query_type | sql_source_type | query_start                |
+--------------------------------------+---------+--------------------------------------+---------+-------------+------------------+------+----------------------------+-----------+------------------+----------------------------------+--------------------------------------+------------------+------------+-----------------+----------------------------+
| 61336432-3136-6136-6434-613130366637 | 2023501 | dbd13c61-3280-11ee-a712-4efbe8649147 | aylei   | aylei:admin | 10.0.157.55:6001 |      | 2023-08-04 04:39:12.018852 | COM_QUERY | show processlist | 695b8f6759c3429a80d2fae4323f0c2d | dc6e2978-3280-11ee-a712-4efbe8649147 | Show Processlist | Other      | external_sql    | 2023-08-04 04:39:13.047359 |
+--------------------------------------+---------+--------------------------------------+---------+-------------+------------------+------+----------------------------+-----------+------------------+----------------------------------+--------------------------------------+------------------+------------+-----------------+----------------------------+
1 row in set (1.07 sec)

The second SHOW PROCESSLIST call returns empty set.

  1. SHOW PROCESSLIST called in sys account does not show sessions of all Accounts:
mysql> select node_id, account from processlist() a where account != "sys";
+--------------------------------------+--------------------------------------+
| node_id                              | account                              |
+--------------------------------------+--------------------------------------+
| 33326235-3933-3965-6237-353962616631 | a5dda643_c84c_4f81_be06_4cdedb4796c0 |
+--------------------------------------+--------------------------------------+
1 row in set (0.18 sec)

Session of a5dda643_c84c_4f81_be06_4cdedb4796c0 is displayed, but actually there are other sessions in the system that can be observed when connected using other account:

mysql> select node_id, account from processlist() a where account != "sys";
+--------------------------------------+---------------+
| node_id                              | account       |
+--------------------------------------+---------------+
| 66663035-3563-6430-6538-336636633461 | mocloud_mo_ob |
| 66663035-3563-6430-6538-336636633461 | mocloud_mo_ob |
+------------------------

Expected Behavior

SHOW PROCESSLIST should return correct result.

Steps to Reproduce

No response

Additional information

No response

Activity

  1. added
    kind/bug
    on Aug 4, 2023
  2. added
    severity/s1
    on Aug 4, 2023
  3. aylei commented on Aug 4, 2023

    @aylei
    ContributorAuthor
  4. volgariver6 commented on Aug 21, 2023

    @volgariver6
    Contributor

    cannot repro the problem.

  5. added this to the 1.0.0 milestone on Aug 27, 2023
  6. volgariver6 commented on Sep 18, 2023

    @volgariver6
    Contributor

    这个命令是获取当前集群中所有节点上的session信息,获取集群中节点是调用 clusterservice 模块,该模块是异步更新,有一定的延迟,当集群刚启动或者发生cn扩容时,新启动的cn节点还没有获取到,是正常的。 @aylei

  7. aylei commented on Sep 25, 2023

    @aylei
    ContributorAuthor

    目前这个延迟比较大

  8. aylei commented on Sep 29, 2023

    @aylei
    ContributorAuthor

    等待验证

  9. modified the milestones: 1.0.0, 1.1.0 on Oct 7, 2023
  10. aylei commented on Nov 20, 2023

    @aylei
    ContributorAuthor

    similar issue: #12829

  11. aylei commented on Dec 29, 2023

    @aylei
    ContributorAuthor

    verified in 1.1-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/buglevel/hard-to-reproseverity/s1

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions