Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-1057

LP #1661488: Assertion `user_stats->concurrent_connections > 0' failed.

    XMLWordPrintable

    Details

      Description

      **Reported in Launchpad by Roel Van de Paar last update 21-06-2017 07:14:51

      2017-02-02T20:32:10.706414Z 0 [Note] /sda/PS300117-percona-server-5.7.17-11-linux-x86_64-debug/bin/mysqld: ready for connections.
      Version: '5.7.17-11-debug' socket: '/sda/PS300117-percona-server-5.7.17-11-linux-x86_64-debug/socket.sock' port: 12438 MySQL Community Server (GPL)
      mysqld: /git/PS-5.7.17_dbg/sql/sql_connect.cc:575: void update_global_user_stats_with_user(THD*, USER_STATS*, time_t): Assertion `user_stats->concurrent_connections > 0' failed.
      20:32:38 UTC - mysqld got signal 6 ;

      1. Start server (no special arguments)
      2. open 2 client connection to same server (c1, c2)
      3. Through one client connection (say c1)
      execute "set global userstat=1; FLUSH CLIENT_STATISTICS;"
      4. Now quit the other client connection (c2)
      6. Now quit the client c1 and see server crash.

      Credit for testcase & original bug find goes to Krunal

      Core was generated by `/sda/PS300117-percona-server-5.7.17-11-linux-x86_64-debug/bin/mysqld --no-defau'.
      Program terminated with signal 6, Aborted.
      #0 0x00007fbe74b17741 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
      61 val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
      (gdb) bt
      #0 0x00007fbe74b17741 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
      #1 0x000000000185027e in my_write_core (sig=6) at /git/PS-5.7.17_dbg/mysys/stacktrace.c:249
      #2 0x0000000000e81bc1 in handle_fatal_signal (sig=6) at /git/PS-5.7.17_dbg/sql/signal_handler.cc:223
      #3 <signal handler called>
      #4 0x00007fbe72eab1d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
      #5 0x00007fbe72eac8c8 in __GI_abort () at abort.c:90
      #6 0x00007fbe72ea4146 in __assert_fail_base (fmt=0x7fbe72ff53a8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
      assertion=assertion@entry=0x203ac80 "user_stats->concurrent_connections > 0", file=file@entry=0x203ab18 "/git/PS-5.7.17_dbg/sql/sql_connect.cc", line=line@entry=575,
      function=function@entry=0x203b080 <update_global_user_stats_with_user(THD*, st_user_stats*, long)::_PRETTY_FUNCTION_> "void update_global_user_stats_with_user(THD*, USER_STATS*, time_t)") at assert.c:92
      #7 0x00007fbe72ea41f2 in _GI__assert_fail (assertion=0x203ac80 "user_stats->concurrent_connections > 0", file=0x203ab18 "/git/PS-5.7.17_dbg/sql/sql_connect.cc", line=575,
      function=0x203b080 <update_global_user_stats_with_user(THD*, st_user_stats*, long)::_PRETTY_FUNCTION_> "void update_global_user_stats_with_user(THD*, USER_STATS*, time_t)")
      at assert.c:101
      #8 0x00000000014c4ebf in update_global_user_stats_with_user (thd=0x7fbe2f419000, user_stats=0x7fbe2f4223a0, now=1486067558) at /git/PS-5.7.17_dbg/sql/sql_connect.cc:575
      #9 0x00000000014c5240 in update_global_user_stats (thd=0x7fbe2f419000, create_user=false, now=1486067558) at /git/PS-5.7.17_dbg/sql/sql_connect.cc:628
      #10 0x00000000014c693a in end_connection (thd=0x7fbe2f419000) at /git/PS-5.7.17_dbg/sql/sql_connect.cc:1355
      #11 0x0000000001656e20 in handle_connection (arg=0x7fbe5981f6a0) at /git/PS-5.7.17_dbg/sql/conn_handler/connection_handler_per_thread.cc:315
      #12 0x000000000187ee4d in pfs_spawn_thread (arg=0x7fbe68f91420) at /git/PS-5.7.17_dbg/storage/perfschema/pfs.cc:2188
      #13 0x00007fbe74b12dc5 in start_thread (arg=0x7fbe75104700) at pthread_create.c:308
      #14 0x00007fbe72f6d73d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                lpjirasync lpjirasync (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: