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

Crash reporter often fails to show the query that caused the crash

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1(EOL)
    • 10.1.16, 10.0.27
    • OTHER
    • None

    Description

      For example, see

      The first example has:

      Query (0x7f97ab53b020): is an invalid pointer
      Connection ID (thread ID): 591
      Status: NOT_KILLED

      The second one has:

      Nov 18 16:22:21 thorstenknbl1 mysqld: Query (0x7f4ecd82d020): is an invalid pointer
      Nov 18 16:22:21 thorstenknbl1 mysqld: Connection ID (thread ID): 6
      Nov 18 16:22:21 thorstenknbl1 mysqld: Status: NOT_KILLED

      Note that the second one is just an assertion failure. Stack or THD structure
      are not corrupted. However, the query pointer is still not printed.

      Attachments

        Activity

          About debug info not being available for some packages: see MDEV-4646 (for RPMs) and MDEV-658 (for debs).

          The issue with debug info is, however, orthogonal to the problem of why we keep getting Query (0x...): is an invalid pointer so often.

          psergei Sergei Petrunia added a comment - About debug info not being available for some packages: see MDEV-4646 (for RPMs) and MDEV-658 (for debs). The issue with debug info is, however, orthogonal to the problem of why we keep getting Query (0x...): is an invalid pointer so often.
          cvicentiu Vicențiu Ciorbaru added a comment - - edited

          Hi Sergei,

          Can you review a patch for this problem? The fix is targeted for 10.0. But I think it should work for any version as we're not introducing anything that is "unstable".

          http://lists.askmonty.org/pipermail/commits/2016-May/009405.html

          Thanks!

          CC: psergey

          cvicentiu Vicențiu Ciorbaru added a comment - - edited Hi Sergei, Can you review a patch for this problem? The fix is targeted for 10.0. But I think it should work for any version as we're not introducing anything that is "unstable". http://lists.askmonty.org/pipermail/commits/2016-May/009405.html Thanks! CC: psergey
          cvicentiu Vicențiu Ciorbaru added a comment - Fixed with: 7d4a7d8c5861e6587176052ea71c30ab12a49084

          I don't see any improvement, we are still getting the same "invalid pointer" in reports from the real-life world:

          Server version: 10.1.16-MariaDB-1~trusty
          key_buffer_size=16777216
          read_buffer_size=131072
          max_used_connections=23
          max_threads=502
          thread_count=13
          It is possible that mysqld could use up to 
          key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1118998 K  bytes of memory
          Hope that's ok; if not, decrease some variables in the equation.
           
          Thread pointer: 0x0x7f57a83d6008
          Attempting backtrace. You can use the following information to find out
          where mysqld died. If you see no messages after this, something went
          terribly wrong...
          stack_bottom = 0x7f61375fedf0 thread_stack 0x80000
          /usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x7f65391b28fe]
          /usr/sbin/mysqld(handle_fatal_signal+0x2d5)[0x7f6538cd9e75]
          /lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x7f653722f330]
          /usr/sbin/mysqld(+0x4812d4)[0x7f6538baa2d4]
          /usr/sbin/mysqld(_ZN13st_select_lex5printEP3THDP6String15enum_query_type+0x4b2)[0x7f6538baac02]
          /usr/sbin/mysqld(_ZN14Item_subselect5printEP6String15enum_query_type+0x5f)[0x7f6538d69faf]
          /usr/sbin/mysqld(_ZN22Item_func_conv_charset5printEP6String15enum_query_type+0x44)[0x7f6538d57e64]
          /usr/sbin/mysqld(_ZN9Item_func10print_argsEP6Stringj15enum_query_type+0x4f)[0x7f6538d3a9df]
          /usr/sbin/mysqld(_ZN9Item_func5printEP6String15enum_query_type+0x4d)[0x7f6538d3aabd]
          /usr/sbin/mysqld(_ZN9Item_func10print_argsEP6Stringj15enum_query_type+0x4f)[0x7f6538d3a9df]
          /usr/sbin/mysqld(_ZN9Item_func5printEP6String15enum_query_type+0x4d)[0x7f6538d3aabd]
          /usr/sbin/mysqld(_ZN4Item17print_item_w_nameEP6String15enum_query_type+0x1c)[0x7f6538cf0fdc]
          /usr/sbin/mysqld(_ZN13st_select_lex5printEP3THDP6String15enum_query_type+0x226)[0x7f6538baa976]
          /usr/sbin/mysqld(_ZN18st_select_lex_unit5printEP6String15enum_query_type+0x57)[0x7f6538b4c267]
          /usr/sbin/mysqld(_Z29mysqld_show_create_get_fieldsP3THDP10TABLE_LISTP4ListI4ItemEP6String+0x302)[0x7f6538bb9eb2]
          /usr/sbin/mysqld(_Z18mysqld_show_createP3THDP10TABLE_LIST+0xc0)[0x7f6538bba8e0]
          /usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x3fbc)[0x7f6538b5aecc]
          /usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x26d)[0x7f6538b6073d]
          /usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x2460)[0x7f6538b63a80]
          /usr/sbin/mysqld(_Z10do_commandP3THD+0x169)[0x7f6538b64239]
          /usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x18a)[0x7f6538c2889a]
          /usr/sbin/mysqld(handle_one_connection+0x40)[0x7f6538c28a70]
          /lib/x86_64-linux-gnu/libpthread.so.0(+0x8184)[0x7f6537227184]
          /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f653674637d]
           
          Trying to get some variables.
          Some pointers may be invalid and cause the dump to abort.
          Query (0x7f57a70fe020): is an invalid pointer
          Connection ID (thread ID): 478
          

          elenst Elena Stepanova added a comment - I don't see any improvement, we are still getting the same "invalid pointer" in reports from the real-life world: Server version: 10.1.16-MariaDB-1~trusty key_buffer_size=16777216 read_buffer_size=131072 max_used_connections=23 max_threads=502 thread_count=13 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1118998 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x0x7f57a83d6008 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 0x7f61375fedf0 thread_stack 0x80000 /usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x7f65391b28fe] /usr/sbin/mysqld(handle_fatal_signal+0x2d5)[0x7f6538cd9e75] /lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x7f653722f330] /usr/sbin/mysqld(+0x4812d4)[0x7f6538baa2d4] /usr/sbin/mysqld(_ZN13st_select_lex5printEP3THDP6String15enum_query_type+0x4b2)[0x7f6538baac02] /usr/sbin/mysqld(_ZN14Item_subselect5printEP6String15enum_query_type+0x5f)[0x7f6538d69faf] /usr/sbin/mysqld(_ZN22Item_func_conv_charset5printEP6String15enum_query_type+0x44)[0x7f6538d57e64] /usr/sbin/mysqld(_ZN9Item_func10print_argsEP6Stringj15enum_query_type+0x4f)[0x7f6538d3a9df] /usr/sbin/mysqld(_ZN9Item_func5printEP6String15enum_query_type+0x4d)[0x7f6538d3aabd] /usr/sbin/mysqld(_ZN9Item_func10print_argsEP6Stringj15enum_query_type+0x4f)[0x7f6538d3a9df] /usr/sbin/mysqld(_ZN9Item_func5printEP6String15enum_query_type+0x4d)[0x7f6538d3aabd] /usr/sbin/mysqld(_ZN4Item17print_item_w_nameEP6String15enum_query_type+0x1c)[0x7f6538cf0fdc] /usr/sbin/mysqld(_ZN13st_select_lex5printEP3THDP6String15enum_query_type+0x226)[0x7f6538baa976] /usr/sbin/mysqld(_ZN18st_select_lex_unit5printEP6String15enum_query_type+0x57)[0x7f6538b4c267] /usr/sbin/mysqld(_Z29mysqld_show_create_get_fieldsP3THDP10TABLE_LISTP4ListI4ItemEP6String+0x302)[0x7f6538bb9eb2] /usr/sbin/mysqld(_Z18mysqld_show_createP3THDP10TABLE_LIST+0xc0)[0x7f6538bba8e0] /usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x3fbc)[0x7f6538b5aecc] /usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x26d)[0x7f6538b6073d] /usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x2460)[0x7f6538b63a80] /usr/sbin/mysqld(_Z10do_commandP3THD+0x169)[0x7f6538b64239] /usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x18a)[0x7f6538c2889a] /usr/sbin/mysqld(handle_one_connection+0x40)[0x7f6538c28a70] /lib/x86_64-linux-gnu/libpthread.so.0(+0x8184)[0x7f6537227184] /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f653674637d] Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (0x7f57a70fe020): is an invalid pointer Connection ID (thread ID): 478

          Hi elenst,

          Can you paste the full crash message? The added string printing is at the end. No change in behaviour is done at the Query (address): <string>.

          cvicentiu Vicențiu Ciorbaru added a comment - Hi elenst , Can you paste the full crash message? The added string printing is at the end. No change in behaviour is done at the Query (address): <string>.

          People

            cvicentiu Vicențiu Ciorbaru
            psergei Sergei Petrunia
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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