Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.5.32
    • Fix Version/s: 5.5.34
    • Component/s: None
    • Labels:

      Description

      At least bytes_received can be wrong. In function update_global_user_stats_with_user:

      user_stats->bytes_received+= (thd->org_status_var.bytes_received-
                                      thd->start_bytes_received);
      

      thd->start_bytes_received is set in do_command(), but it is not called if thd_prepare_connection() fails.

      cpu_time looks strange also...

      select USER, CONNECTED_TIME, BUSY_TIME, CPU_TIME, BYTES_RECEIVED from information_schema.user_statistics where user = 'cacti';
      +-------+----------------+--------------------+-------------------+---------------------+
      | USER  | CONNECTED_TIME | BUSY_TIME          | CPU_TIME          | BYTES_RECEIVED      |
      +-------+----------------+--------------------+-------------------+---------------------+
      | cacti |             46 | 0.3571019999999954 | 692552.4628808994 | 9223372036854775807 |
      +-------+----------------+--------------------+-------------------+---------------------+
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            pomyk Patryk Pomykalski added a comment -

            Also found valgrind warnings when running ./mtr main.connect -valgrind --mysqld=-userstat

            ==7422== Thread 5:
            ==7422== Conditional jump or move depends on uninitialised value(s)
            ==7422== at 0x81F30EA: THD::update_all_stats() (sql_class.cc:1314)
            ==7422== by 0x822E580: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1462)
            ==7422== by 0x822C467: do_command(THD*) (sql_parse.cc:794)
            ==7422== by 0x833033D: do_handle_one_connection(THD*) (sql_connect.cc:1266)
            ==7422== by 0x832FE84: handle_one_connection (sql_connect.cc:1181)
            ==7422== by 0x858B6BF: pfs_spawn_thread (pfs.cc:1015)
            ==7422== by 0x404296D: start_thread (pthread_create.c:300)
            ==7422== by 0x42B4A4D: clone (clone.S:130)
            ==7422== Conditional jump or move depends on uninitialised value(s)
            ==7422== at 0x81F311A: THD::update_all_stats() (sql_class.cc:1316)
            ==7422== by 0x822E580: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1462)
            ==7422== by 0x822C467: do_command(THD*) (sql_parse.cc:794)
            ==7422== by 0x833033D: do_handle_one_connection(THD*) (sql_connect.cc:1266)
            ==7422== by 0x832FE84: handle_one_connection (sql_connect.cc:1181)
            ==7422== by 0x858B6BF: pfs_spawn_thread (pfs.cc:1015)
            ==7422== by 0x404296D: start_thread (pthread_create.c:300)
            ==7422== by 0x42B4A4D: clone (clone.S:130)

            Show
            pomyk Patryk Pomykalski added a comment - Also found valgrind warnings when running ./mtr main.connect - valgrind --mysqld= -userstat ==7422== Thread 5: ==7422== Conditional jump or move depends on uninitialised value(s) ==7422== at 0x81F30EA: THD::update_all_stats() (sql_class.cc:1314) ==7422== by 0x822E580: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1462) ==7422== by 0x822C467: do_command(THD*) (sql_parse.cc:794) ==7422== by 0x833033D: do_handle_one_connection(THD*) (sql_connect.cc:1266) ==7422== by 0x832FE84: handle_one_connection (sql_connect.cc:1181) ==7422== by 0x858B6BF: pfs_spawn_thread (pfs.cc:1015) ==7422== by 0x404296D: start_thread (pthread_create.c:300) ==7422== by 0x42B4A4D: clone (clone.S:130) ==7422== Conditional jump or move depends on uninitialised value(s) ==7422== at 0x81F311A: THD::update_all_stats() (sql_class.cc:1316) ==7422== by 0x822E580: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1462) ==7422== by 0x822C467: do_command(THD*) (sql_parse.cc:794) ==7422== by 0x833033D: do_handle_one_connection(THD*) (sql_connect.cc:1266) ==7422== by 0x832FE84: handle_one_connection (sql_connect.cc:1181) ==7422== by 0x858B6BF: pfs_spawn_thread (pfs.cc:1015) ==7422== by 0x404296D: start_thread (pthread_create.c:300) ==7422== by 0x42B4A4D: clone (clone.S:130)
            Hide
            elenst Elena Stepanova added a comment -

            The valgrind warning is reproducible as described on the current 5.5 tree built with BUILD/compile-pentium-valgrind-max-no-ndb. If it turns out to be unrelated to the wrong values problem, I can try to create a test case for that one.

            Show
            elenst Elena Stepanova added a comment - The valgrind warning is reproducible as described on the current 5.5 tree built with BUILD/compile-pentium-valgrind-max-no-ndb. If it turns out to be unrelated to the wrong values problem, I can try to create a test case for that one.

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                pomyk Patryk Pomykalski
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 30 minutes
                  30m