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

connect.tbl fails sporadically in buildbot with result mismatch

Details

    Description

      http://buildbot.askmonty.org/buildbot/builders/kvm-bintar-quantal-x86/builds/4208/steps/test/logs/stdio

      @@ -155,7 +155,7 @@
       CREATE TABLE total (v BIGINT(20) UNSIGNED NOT NULL) ENGINE=CONNECT TABLE_TYPE=TBL TABLE_LIST='t1,t2' OPTION_LIST='thread=yes,port=PORT';;
       SELECT * FROM total order by v desc;
       v
      -22
      +11
       11
       DROP TABLE total;
       DROP TABLE t1;
      

      http://buildbot.askmonty.org/buildbot/builders/kvm-deb-precise-amd64/builds/6333/steps/test_5/logs/stdio

      @@ -156,7 +156,7 @@
       SELECT * FROM total order by v desc;
       v
       22
      -11
      +22
       DROP TABLE total;
       DROP TABLE t1;
       DROP TABLE t2;
      

      http://buildbot.askmonty.org/buildbot/builders/kvm-deb-trusty-amd64/builds/2812/steps/test_5/logs/stdio

      @@ -155,8 +155,8 @@
       CREATE TABLE total (v BIGINT(20) UNSIGNED NOT NULL) ENGINE=CONNECT TABLE_TYPE=TBL TABLE_LIST='t1,t2' OPTION_LIST='thread=yes,port=PORT';;
       SELECT * FROM total order by v desc;
       v
      -22
      -11
      +21
      +21
       DROP TABLE total;
       DROP TABLE t1;
       DROP TABLE t2;
      

      Attachments

        Issue Links

          Activity

            alice Alice Sherepa added a comment -

            sorry, forgot to write about it. I tested on Ubuntu 16.04, 10.2.10-MariaDB-debug, commit b94a62b5dfa48; --repeat=200

            alice Alice Sherepa added a comment - sorry, forgot to write about it. I tested on Ubuntu 16.04, 10.2.10-MariaDB-debug, commit b94a62b5dfa48; --repeat=200

            I got his today with latest 10.2.12:

            CURRENT_TEST: connect.tbl_thread
            — /usr/local/mariadb-10.2.12-linux-i686/mysql-test/plugin/connect/connect/r/tbl_thread.result 2018-01-02 13:30:39.000000000 +0000
            +++ /usr/local/mariadb-10.2.12-linux-i686/mysql-test/plugin/connect/connect/r/tbl_thread.reject 2018-01-02 14:07:46.835927257 +0000
            @@ -90,17 +90,17 @@
            set connect_xtrace=1;
            SELECT * FROM total order by a desc;
            a b
            -19 test19
            -18 test18
            -17 test17
            -16 test16
            15 test15
            14 test14
            13 test13
            12 test12
            11 test11
            +11 test11
            +10 test10
            10 test10
            9 test09
            +9 test09
            +8 test08
            8 test08
            7 test07
            6 test06

            This is in buildbot on kvm-bintar-trusty-x86 (note 32 bit)

            monty Michael Widenius added a comment - I got his today with latest 10.2.12: CURRENT_TEST: connect.tbl_thread — /usr/local/mariadb-10.2.12-linux-i686/mysql-test/plugin/connect/connect/r/tbl_thread.result 2018-01-02 13:30:39.000000000 +0000 +++ /usr/local/mariadb-10.2.12-linux-i686/mysql-test/plugin/connect/connect/r/tbl_thread.reject 2018-01-02 14:07:46.835927257 +0000 @@ -90,17 +90,17 @@ set connect_xtrace=1; SELECT * FROM total order by a desc; a b -19 test19 -18 test18 -17 test17 -16 test16 15 test15 14 test14 13 test13 12 test12 11 test11 +11 test11 +10 test10 10 test10 9 test09 +9 test09 +8 test08 8 test08 7 test07 6 test06 This is in buildbot on kvm-bintar-trusty-x86 (note 32 bit)

            When running "mysql-test-run --repeat=100 connect.tbl_thread" I got after a while:

            CURRENT_TEST: connect.tbl_thread
            mysqltest: At line 60: query 'SELECT * FROM total order by a desc' failed: 1296: Got error 174 '(1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 [SELECT ]' from CONNECT

            monty Michael Widenius added a comment - When running "mysql-test-run --repeat=100 connect.tbl_thread" I got after a while: CURRENT_TEST: connect.tbl_thread mysqltest: At line 60: query 'SELECT * FROM total order by a desc' failed: 1296: Got error 174 '(1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 [SELECT ] ' from CONNECT

            More information that I hope is helpful:

            CURRENT_TEST: connect.tbl_thread
            mysqltest: At line 60: query 'SELECT * FROM total order by a desc' failed: 1296: Got error 122 '(1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '`, `b` FROM `rt3``, `b` FROM `rt2`' at line 1 [SELECT `S' from CONNECT

            In the mysqld.1.

            In var/log/connect.tbl_thread/mysqld.1/mysqld.log I found the following
            that may explain the problem:

            697 Query CREATE TABLE total (a int, b char(10))
            ENGINE=CONNECT TABLE_TYPE=TBL TABLE_LIST='t1,t2,t3,t4,t5'
            OPTION_LIST='thread=yes,port=16040'
            697 Query set connect_xtrace=1
            697 Query SELECT * FROM total order by a desc
            701 Connect root@localhost as anonymous on test
            701 Query SELECT `a`, `b` FROM `t1`
            701 Quit
            702 Connect root@localhost as anonymous on test
            702 Query SELECT `SELECT `a`, `b` FROM `rt3``, `b` FROM `rt2`
            702 Quit

            The problem is probably the extra SELECT` that was added first in the query.

            When the above test goes right, then it log file looks like:

            4 Query CREATE TABLE total (a int, b char(10))
            ENGINE=CONNECT TABLE_TYPE=TBL TABLE_LIST='t1,t2,t3,t4,t5'
            OPTION_LIST='thread=yes,port=16040'
            4 Query set connect_xtrace=1
            4 Query SELECT * FROM total order by a desc
            8 Connect root@localhost as anonymous on test
            8 Query SELECT `a`, `b` FROM `t1`
            8 Quit
            9 Connect root@localhost as anonymous on test
            9 Query SELECT `a`, `b` FROM `rt2`
            9 Quit

            So it's clear that the problem is the extra garbage in front the query or
            alternative connect things that the name of the first column is
            "SELECT `a`, `b` FROM `rt3`"

            After looking at how the query is generated in TDBMYSQL::MakeSelect()
            I am inclined to think that the problem is that the field name somehow
            gets wrong if the table object is used many times.

            While running tests in a loop, I also got an error at:

            #4 0x0000000000bd09e6 in STRING::GetNext (this=0x7fb150001ad0)
            at /my/maria-10.2/storage/connect/xobject.h:153
            153

            {return ((char*)G->Sarea)+((PPOOLHEADER)G->Sarea)->To_Free;}

            (gdb) p G
            $1 = (PGLOBAL) 0x20606260202c6061
            (gdb) p G->Sarea
            Cannot access memory at address 0x20606260202c6061

            This could also mean that you have a memory overrun somewhere

            monty Michael Widenius added a comment - More information that I hope is helpful: CURRENT_TEST: connect.tbl_thread mysqltest: At line 60: query 'SELECT * FROM total order by a desc' failed: 1296: Got error 122 '(1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '`, `b` FROM `rt3``, `b` FROM `rt2`' at line 1 [SELECT `S' from CONNECT In the mysqld.1. In var/log/connect.tbl_thread/mysqld.1/mysqld.log I found the following that may explain the problem: 697 Query CREATE TABLE total (a int, b char(10)) ENGINE=CONNECT TABLE_TYPE=TBL TABLE_LIST='t1,t2,t3,t4,t5' OPTION_LIST='thread=yes,port=16040' 697 Query set connect_xtrace=1 697 Query SELECT * FROM total order by a desc 701 Connect root@localhost as anonymous on test 701 Query SELECT `a`, `b` FROM `t1` 701 Quit 702 Connect root@localhost as anonymous on test 702 Query SELECT `SELECT `a`, `b` FROM `rt3``, `b` FROM `rt2` 702 Quit The problem is probably the extra SELECT` that was added first in the query. When the above test goes right, then it log file looks like: 4 Query CREATE TABLE total (a int, b char(10)) ENGINE=CONNECT TABLE_TYPE=TBL TABLE_LIST='t1,t2,t3,t4,t5' OPTION_LIST='thread=yes,port=16040' 4 Query set connect_xtrace=1 4 Query SELECT * FROM total order by a desc 8 Connect root@localhost as anonymous on test 8 Query SELECT `a`, `b` FROM `t1` 8 Quit 9 Connect root@localhost as anonymous on test 9 Query SELECT `a`, `b` FROM `rt2` 9 Quit So it's clear that the problem is the extra garbage in front the query or alternative connect things that the name of the first column is "SELECT `a`, `b` FROM `rt3`" After looking at how the query is generated in TDBMYSQL::MakeSelect() I am inclined to think that the problem is that the field name somehow gets wrong if the table object is used many times. While running tests in a loop, I also got an error at: #4 0x0000000000bd09e6 in STRING::GetNext (this=0x7fb150001ad0) at /my/maria-10.2/storage/connect/xobject.h:153 153 {return ((char*)G->Sarea)+((PPOOLHEADER)G->Sarea)->To_Free;} (gdb) p G $1 = (PGLOBAL) 0x20606260202c6061 (gdb) p G->Sarea Cannot access memory at address 0x20606260202c6061 This could also mean that you have a memory overrun somewhere
            bertrandop Olivier Bertrand added a comment - See MDEV-14214

            People

              bertrandop Olivier Bertrand
              elenst Elena Stepanova
              Votes:
              1 Vote for this issue
              Watchers:
              5 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.