Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-1183

Incorrectly formatted file can cause cpimport to crash and leave behind locks

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Cannot Reproduce
    • 1.1.2
    • 1.1.7
    • cpimport
    • None
    • 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12, 2018-13, 2018-14, 2018-15, 2018-16, 2018-17, 2018-18, 2018-19, 2018-20, 2018-21

    Description

      A user tried to load some incorrectly formatted tab-delimited files using cpimport.

      gdb says that the crash was the following:

      Program terminated with signal 11, Segmentation fault.
      #0  0x00007f0e40940cf4 in WriteEngine::WEFileReadThread::getNextRow (this=this@entry=0x7fff11bb0018, ifs=...,
          pBuf=pBuf@entry=0x7fff11bb03a4 "...redacted..."..., MaxLen=MaxLen@entry=1048575)
          at /home/builder/mariadb-columnstore-server/mariadb-columnstore-engine/writeengine/splitter/we_filereadthread.cpp:495
      

      After cpimport crashed, ColumnStore also did not clear the table locks originally taken by cpimport, so those had to be cleared with cleartablelock.

      Core dumps and log files will be provided privately.

      Attachments

        Activity

          GeoffMontee Geoff Montee (Inactive) created issue -

          Many thanks for the gdb output. Whilst I haven't been able to mock up a way of reproducing this yet it does look like the buffer is blown when scanning for the end enclosing character once one is found.

          The user is outputting data using:

          mysql --defaults-extra-file=<.cnf file> -h <server> --compress --quick --skip-column-names --default-character-set=utf8 -Ns -D $schema --execute="select * from $table" > $table.txt
          

          Then importing with:

          cpimport -E '\"' -e 1 -n1 -s '\t' $schema $table $file
          

          The user has been told to use -B on the export instead.

          My guess is we need to create a table that will spit out at least 1MB of data once a quote is in the output so that there is enough data to blow the buffer.

          LinuxJedi Andrew Hutchings (Inactive) added a comment - Many thanks for the gdb output. Whilst I haven't been able to mock up a way of reproducing this yet it does look like the buffer is blown when scanning for the end enclosing character once one is found. The user is outputting data using: mysql --defaults-extra-file=<.cnf file> -h <server> --compress --quick --skip-column-names --default-character-set=utf8 -Ns -D $schema --execute="select * from $table" > $table.txt Then importing with: cpimport -E '\"' -e 1 -n1 -s '\t' $schema $table $file The user has been told to use -B on the export instead. My guess is we need to create a table that will spit out at least 1MB of data once a quote is in the output so that there is enough data to blow the buffer.
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Field Original Value New Value
          Fix Version/s 1.1.4 [ 22918 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Assignee Andrew Hutchings [ linuxjedi ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Sprint 2018-05 [ 232 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Sprint 2018-05 [ 232 ] 2018-05, 2018-06 [ 232, 234 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Sprint 2018-05, 2018-06 [ 232, 234 ] 2018-05, 2018-06, 2018-07 [ 232, 234, 238 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Sprint 2018-05, 2018-06, 2018-07 [ 232, 234, 238 ] 2018-05, 2018-06, 2018-07, 2018-08 [ 232, 234, 238, 242 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Fix Version/s 1.1.5 [ 23013 ]
          Fix Version/s 1.1.4 [ 22918 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Sprint 2018-05, 2018-06, 2018-07, 2018-08 [ 232, 234, 238, 242 ] 2018-05, 2018-06, 2018-07, 2018-08, 2018-09 [ 232, 234, 238, 242, 244 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Sprint 2018-05, 2018-06, 2018-07, 2018-08, 2018-09 [ 232, 234, 238, 242, 244 ] 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10 [ 232, 234, 238, 242, 244, 248 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Sprint 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10 [ 232, 234, 238, 242, 244, 248 ] 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11 [ 232, 234, 238, 242, 244, 248, 252 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Fix Version/s 1.1.6 [ 23121 ]
          Fix Version/s 1.1.5 [ 23013 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Sprint 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11 [ 232, 234, 238, 242, 244, 248, 252 ] 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12 [ 232, 234, 238, 242, 244, 248, 252, 256 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Sprint 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12 [ 232, 234, 238, 242, 244, 248, 252, 256 ] 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12, 2018-13 [ 232, 234, 238, 242, 244, 248, 252, 256, 260 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Sprint 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12, 2018-13 [ 232, 234, 238, 242, 244, 248, 252, 256, 260 ] 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12, 2018-13, 2018-14 [ 232, 234, 238, 242, 244, 248, 252, 256, 260, 263 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Sprint 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12, 2018-13, 2018-14 [ 232, 234, 238, 242, 244, 248, 252, 256, 260, 263 ] 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12, 2018-13, 2018-14, 2018-15 [ 232, 234, 238, 242, 244, 248, 252, 256, 260, 263, 267 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Fix Version/s 1.1.7 [ 23136 ]
          Fix Version/s 1.1.6 [ 23121 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Sprint 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12, 2018-13, 2018-14, 2018-15 [ 232, 234, 238, 242, 244, 248, 252, 256, 260, 263, 267 ] 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12, 2018-13, 2018-14, 2018-15, 2018-16 [ 232, 234, 238, 242, 244, 248, 252, 256, 260, 263, 267, 269 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Sprint 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12, 2018-13, 2018-14, 2018-15, 2018-16 [ 232, 234, 238, 242, 244, 248, 252, 256, 260, 263, 267, 269 ] 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12, 2018-13, 2018-14, 2018-15, 2018-16, 2018-17 [ 232, 234, 238, 242, 244, 248, 252, 256, 260, 263, 267, 269, 276 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Sprint 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12, 2018-13, 2018-14, 2018-15, 2018-16, 2018-17 [ 232, 234, 238, 242, 244, 248, 252, 256, 260, 263, 267, 269, 276 ] 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12, 2018-13, 2018-14, 2018-15, 2018-16, 2018-17, 2018-18 [ 232, 234, 238, 242, 244, 248, 252, 256, 260, 263, 267, 269, 276, 278 ]
          dthompson David Thompson (Inactive) made changes -
          Assignee Andrew Hutchings [ linuxjedi ] Jens Röwekamp [ jens.rowekamp ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Sprint 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12, 2018-13, 2018-14, 2018-15, 2018-16, 2018-17, 2018-18 [ 232, 234, 238, 242, 244, 248, 252, 256, 260, 263, 267, 269, 276, 278 ] 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12, 2018-13, 2018-14, 2018-15, 2018-16, 2018-17, 2018-18, 2018-19 [ 232, 234, 238, 242, 244, 248, 252, 256, 260, 263, 267, 269, 276, 278, 283 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Sprint 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12, 2018-13, 2018-14, 2018-15, 2018-16, 2018-17, 2018-18, 2018-19 [ 232, 234, 238, 242, 244, 248, 252, 256, 260, 263, 267, 269, 276, 278, 283 ] 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12, 2018-13, 2018-14, 2018-15, 2018-16, 2018-17, 2018-18, 2018-19, 2018-20 [ 232, 234, 238, 242, 244, 248, 252, 256, 260, 263, 267, 269, 276, 278, 283, 288 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Sprint 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12, 2018-13, 2018-14, 2018-15, 2018-16, 2018-17, 2018-18, 2018-19, 2018-20 [ 232, 234, 238, 242, 244, 248, 252, 256, 260, 263, 267, 269, 276, 278, 283, 288 ] 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12, 2018-13, 2018-14, 2018-15, 2018-16, 2018-17, 2018-18, 2018-19, 2018-20, 2018-21 [ 232, 234, 238, 242, 244, 248, 252, 256, 260, 263, 267, 269, 276, 278, 283, 288, 295 ]
          jens.rowekamp Jens Röwekamp (Inactive) made changes -
          Resolution Cannot Reproduce [ 5 ]
          Status Open [ 1 ] Closed [ 6 ]
          mariadb-jira-automation Jira Automation (IT) made changes -
          Zendesk Related Tickets 188888

          People

            jens.rowekamp Jens Röwekamp (Inactive)
            GeoffMontee Geoff Montee (Inactive)
            Votes:
            0 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.