Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-11703

InnoDB background threads show up in the processlist

Details

    Description

      10.2 f2fe65106f, debug build, default configuration

      MariaDB [test]> show processlist;
      +----+-------------+-----------------+------+---------+------+--------------------------+------------------+----------+
      | Id | User        | Host            | db   | Command | Time | State                    | Info             | Progress |
      +----+-------------+-----------------+------+---------+------+--------------------------+------------------+----------+
      |  1 | system user |                 | NULL | Daemon  | NULL | InnoDB background thread | NULL             |    0.000 |
      |  2 | system user |                 | NULL | Daemon  | NULL | InnoDB background thread | NULL             |    0.000 |
      |  4 | system user |                 | NULL | Daemon  | NULL | InnoDB background thread | NULL             |    0.000 |
      |  3 | system user |                 | NULL | Daemon  | NULL | InnoDB background thread | NULL             |    0.000 |
      |  5 | system user |                 | NULL | Daemon  | NULL | InnoDB background thread | NULL             |    0.000 |
      | 10 | root        | localhost:39009 | test | Query   |    0 | init                     | show processlist |    0.000 |
      +----+-------------+-----------------+------+---------+------+--------------------------+------------------+----------+
      6 rows in set (0.00 sec)
      

      I don't think they should be there

      Attachments

        Issue Links

          Activity

            serg Sergei Golubchik added a comment - - edited

            wlad, negative id would be a separate feature, a easy way to distinguish visually internal from user threads. It cannot be done as a bug fix and is not part of this issue.

            Skipping internal threads in PROCESSLIST and KILL can be done based on something like thd->is_internal_thread() (or whatever), I'll do that.

            serg Sergei Golubchik added a comment - - edited wlad , negative id would be a separate feature, a easy way to distinguish visually internal from user threads. It cannot be done as a bug fix and is not part of this issue. Skipping internal threads in PROCESSLIST and KILL can be done based on something like thd->is_internal_thread() (or whatever), I'll do that.

            serg, fine with me, too.
            marko, does not matter how many threads there are. Even if there is one purge, and one "shutdown proxy", it is still bad enough as user experience.

            wlad Vladislav Vaintroub added a comment - serg , fine with me, too. marko , does not matter how many threads there are. Even if there is one purge, and one "shutdown proxy", it is still bad enough as user experience.

            There is a kind-of-a middle ground between "client connections" and "system threads" – replication-related threads: Binlog Dump on master and all those Slave_IO, Slave_SQL and Slave_worker threads on the slave. Unlike other system threads, they actually show states which make sense to the user and might be important to them; AFAIR they can also be meaningfully killed under some circumstances. I am not really sure how it can and should be treated, I think if we lose them for the sake of cosmetical improvements, users might be unhappy about it.

            elenst Elena Stepanova added a comment - There is a kind-of-a middle ground between "client connections" and "system threads" – replication-related threads: Binlog Dump on master and all those Slave_IO , Slave_SQL and Slave_worker threads on the slave. Unlike other system threads, they actually show states which make sense to the user and might be important to them; AFAIR they can also be meaningfully killed under some circumstances. I am not really sure how it can and should be treated, I think if we lose them for the sake of cosmetical improvements, users might be unhappy about it.

            The complete list of system threads:

            • replication slave io and sql
            • event scheduler and workers
            • delayed insert
            • binlog background thread
            • InnoDB shutdown handler, purge coordinator and workers
              Which of those should be hidden from SHOW PROCESSLIST? Only the last item? It's kind of inconsistent.
              One point of listing every THD in the process list is, that a THD can hold locks, so it can participate in a deadlock or can block, say, ALTER TABLE or FLUSH TABLES WITH READ LOCK, so there might be a need to kill it.
            serg Sergei Golubchik added a comment - The complete list of system threads: replication slave io and sql event scheduler and workers delayed insert binlog background thread InnoDB shutdown handler, purge coordinator and workers Which of those should be hidden from SHOW PROCESSLIST ? Only the last item? It's kind of inconsistent. One point of listing every THD in the process list is, that a THD can hold locks, so it can participate in a deadlock or can block, say, ALTER TABLE or FLUSH TABLES WITH READ LOCK , so there might be a need to kill it.

            MDEV-18698 seems to be loosely related to this.

            GeoffMontee Geoff Montee (Inactive) added a comment - MDEV-18698 seems to be loosely related to this.

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.