[ 
https://issues.apache.org/jira/browse/CASSANDRA-8351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14238378#comment-14238378
 ] 

Marc Drolet edited comment on CASSANDRA-8351 at 12/8/14 8:18 PM:
-----------------------------------------------------------------

I'm getting the same issue.  as well as other errors running the same cqlsh 
COPY command.

errors I'm getting:
1- err:  Segmentation fault (core dumped)
2- err: <stdin>:1:new-line character seen in unquoted field - do you need to 
open the file in universal-newline mode?
3- err: <stdin>:1:line contains NULL byte <stdin>:1:Aborting import at record 
#43. Previously-inserted values still present.

for number 2 and 3, I've edit the cqlsh script to change the copy command code 
that open the csv file:   from linesource = open(fname, 'rb')   to   linesource 
= open(fname, 'rU')
it's at line number 1378

for number 1, err:  Segmentation fault (core dumped), I don't know what's going 
wrong. I retry a couple of time the same command and it finally work.
to reproduce the problem, just trigger an cqlsh command to execute a COPY query 
in loop and you will see the error. (it's random, sometime it works, sometime 
you get the error for the same file). 

I've add some print here and there an I've found the error came from this part 
of the code:
rownum, error = \
                async_insert.insert_concurrent(self.session, enumerate(reader, 
start=1),
                                               partial(
                                                   self.create_insert_statement,
                                                   columns, nullval,
                                                   table_meta))
cqlsh code on line 1392 

versions:
Ubuntu 14.04.1 LTS, Trusty Tahr
Python 2.7.6
[cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native protocol v3]


was (Author: droletmarc):
I'm getting the same issue.  as well as other errors running the same cqlsh 
COPY command.

errors I'm getting:
1- err:  Segmentation fault (core dumped)
2- err: <stdin>:1:new-line character seen in unquoted field - do you need to 
open the file in universal-newline mode?
3- err: <stdin>:1:line contains NULL byte <stdin>:1:Aborting import at record 
#43. Previously-inserted values still present.

for number 2 and 3, I've edit the cqlsh script to change the copy command code 
that open the csv file:   from linesource = open(fname, 'rb')   to   linesource 
= open(fname, 'rU')
it's at line number 1378

for number 1, err:  Segmentation fault (core dumped), I don't know what's going 
wrong. I retry a couple of time the same command and it finally work.
to reproduce the problem, just trigger an cqlsh command to execute a COPY query 
in loop and you will see the error. (it's random, sometime it works, sometime 
you get the error for the same file). 

versions:
Ubuntu 14.04.1 LTS, Trusty Tahr
Python 2.7.6
[cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native protocol v3]

> Running COPY FROM in cqlsh aborts with errors or segmentation fault
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-8351
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8351
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Joseph Chu
>            Priority: Minor
>              Labels: cqlsh
>             Fix For: 2.1.3
>
>         Attachments: stress.cql, stress.csv
>
>
> Running Cassandra 2.1.2 binary tarball on a single instance.
> Put together a script to try to reproduce this using data generated by 
> cassandra-stress.
> Reproduction steps: Download files and run cqlsh -f stress.cql
> This may need to run a couple of times before errors are encountered. I've 
> seen this work best when running after a fresh install.
> Errors seen:
> 1.    Segmentation fault (core dumped)
> 2.    stress.cql:24:line contains NULL byte
>        stress.cql:24:Aborting import at record #0. Previously-inserted values 
> still present.
>        71 rows imported in 0.100 seconds.
> 3.   *** glibc detected *** python: corrupted double-linked list: 
> 0x0000000001121ad0 ***
> ======= Backtrace: =========
> /lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7f80fe0cdb96]
> /lib/x86_64-linux-gnu/libc.so.6(+0x7fead)[0x7f80fe0ceead]
> python[0x42615d]
> python[0x501dc8]
> python[0x4ff715]
> python[0x425d02]
> python(PyEval_EvalCodeEx+0x1c4)[0x575db4]
> python[0x577be2]
> python(PyObject_Call+0x36)[0x4d91b6]
> python(PyEval_EvalFrameEx+0x2035)[0x54d8a5]
> python(PyEval_EvalCodeEx+0x1a2)[0x575d92]
> python(PyEval_EvalFrameEx+0x7b8)[0x54c028]
> python(PyEval_EvalCodeEx+0x1a2)[0x575d92]
> python(PyEval_EvalFrameEx+0x7b8)[0x54c028]
> python(PyEval_EvalFrameEx+0xa02)[0x54c272]
> python(PyEval_EvalFrameEx+0xa02)[0x54c272]
> python(PyEval_EvalFrameEx+0xa02)[0x54c272]
> python(PyEval_EvalCodeEx+0x1a2)[0x575d92]
> python(PyEval_EvalFrameEx+0x7b8)[0x54c028]
> python(PyEval_EvalCodeEx+0x1a2)[0x575d92]
> python(PyEval_EvalFrameEx+0x7b8)[0x54c028]
> python(PyEval_EvalCodeEx+0x1a2)[0x575d92]
> python[0x577be2]
> python(PyObject_Call+0x36)[0x4d91b6]
> python(PyEval_EvalFrameEx+0x2035)[0x54d8a5]
> python(PyEval_EvalFrameEx+0xa02)[0x54c272]
> python(PyEval_EvalFrameEx+0xa02)[0x54c272]
> python(PyEval_EvalCodeEx+0x1a2)[0x575d92]
> python[0x577ab0]
> python(PyObject_Call+0x36)[0x4d91b6]
> python[0x4c91fa]
> python(PyObject_Call+0x36)[0x4d91b6]
> python(PyEval_CallObjectWithKeywords+0x36)[0x4d97c6]
> python[0x4f7f58]
> /lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a)[0x7f80ff369e9a]
> /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f80fe1433fd]
> ======= Memory map: ========
> 00400000-00672000 r-xp 00000000 08:01 1447344                            
> /usr/bin/python2.7
> 00871000-00872000 r--p 00271000 08:01 1447344                            
> /usr/bin/python2.7
> 00872000-008db000 rw-p 00272000 08:01 1447344                            
> /usr/bin/python2.7
> 008db000-008ed000 rw-p 00000000 00:00 0 
> 0090e000-01260000 rw-p 00000000 00:00 0                                  
> [heap]
> 7f80ec000000-7f80ec0aa000 rw-p 00000000 00:00 0 
> 7f80ec0aa000-7f80f0000000 ---p 00000000 00:00 0 
> 7f80f0000000-7f80f0021000 rw-p 00000000 00:00 0 
> 7f80f0021000-7f80f4000000 ---p 00000000 00:00 0 
> 7f80f4000000-7f80f4021000 rw-p 00000000 00:00 0 
> 7f80f4021000-7f80f8000000 ---p 00000000 00:00 0 
> 7f80fa713000-7f80fa714000 ---p 00000000 00:00 0 
> 7f80fa714000-7f80faf14000 rw-p 00000000 00:00 0                          
> [stack:7493]
> 7f80faf14000-7f80faf15000 ---p 00000000 00:00 0 
> 7f80faf15000-7f80fb715000 rw-p 00000000 00:00 0                          
> [stack:7492]
> 7f80fb715000-7f80fb716000 ---p 00000000 00:00 0 
> 7f80fb716000-7f80fbf16000 rw-p 00000000 00:00 0                          
> [stack:7491]
> 7f80fbf16000-7f80fbf21000 r-xp 00000000 08:01 1456254                    
> /usr/lib/python2.7/lib-dynload/_json.so
> 7f80fbf21000-7f80fc120000 ---p 0000b000 08:01 1456254                    
> /usr/lib/python2.7/lib-dynload/_json.so
> 7f80fc120000-7f80fc121000 r--p 0000a000 08:01 1456254                    
> /usr/lib/python2.7/lib-dynload/_json.so
> 7f80fc121000-7f80fc122000 rw-p 0000b000 08:01 1456254                    
> /usr/lib/python2.7/lib-dynload/_json.so
> 7f80fc122000-7f80fc133000 r-xp 00000000 08:01 1585974                    
> /usr/local/lib/python2.7/dist-packages/blist/_blist.so
> 7f80fc133000-7f80fc332000 ---p 00011000 08:01 1585974                    
> /usr/local/lib/python2.7/dist-packages/blist/_blist.so
> 7f80fc332000-7f80fc333000 r--p 00010000 08:01 1585974                    
> /usr/local/lib/python2.7/dist-packages/blist/_blist.so
> 7f80fc333000-7f80fc335000 rw-p 00011000 08:01 1585974                    
> /usr/local/lib/python2.7/dist-packages/blist/_blist.so
> 7f80fc335000-7f80fc349000 r-xp 00000000 08:01 1456262                    
> /usr/lib/python2.7/lib-dynload/datetime.so
> 7f80fc349000-7f80fc548000 ---p 00014000 08:01 1456262                    
> /usr/lib/python2.7/lib-dynload/datetime.so
> 7f80fc548000-7f80fc549000 r--p 00013000 08:01 1456262                    
> /usr/lib/python2.7/lib-dynload/datetime.so
> 7f80fc549000-7f80fc54d000 rw-p 00014000 08:01 1456262                    
> /usr/lib/python2.7/lib-dynload/datetime.so
> 7f80fc54d000-7f80fc56c000 r-xp 00000000 08:01 1456251                    
> /usr/lib/python2.7/lib-dynload/_io.so
> 7f80fc56c000-7f80fc76b000 ---p 0001f000 08:01 1456251                    
> /usr/lib/python2.7/lib-dynload/_io.so
> 7f80fc76b000-7f80fc76c000 r--p 0001e000 08:01 1456251                    
> /usr/lib/python2.7/lib-dynload/_io.so
> 7f80fc76c000-7f80fc775000 rw-p 0001f000 08:01 1456251                    
> /usr/lib/python2.7/lib-dynload/_io.so
> 7f80fc775000-7f80fc77b000 r-xp 00000000 08:01 1456263                    
> /usr/lib/python2.7/lib-dynload/_multiprocessing.so
> 7f80fc77b000-7f80fc97a000 ---p 00006000 08:01 1456263                    
> /usr/lib/python2.7/lib-dynload/_multiprocessing.so
> 7f80fc97a000-7f80fc97b000 r--p 00005000 08:01 1456263                    
> /usr/lib/python2.7/lib-dynload/_multiprocessing.so
> 7f80fc97b000-7f80fc97c000 rw-p 00006000 08:01 1456263                    
> /usr/lib/python2.7/lib-dynload/_multiprocessing.so
> 7f80fc97c000-7f80fc99e000 r-xp 00000000 08:01 1704004                    
> /lib/x86_64-linux-gnu/libtinfo.so.5.9
> 7f80fc99e000-7f80fcb9e000 ---p 00022000 08:01 1704004                    
> /lib/x86_64-linux-gnu/libtinfo.so.5.9
> 7f80fcb9e000-7f80fcba2000 r--p 00022000 08:01 1704004                    
> /lib/x86_64-linux-gnu/libtinfo.so.5.9
> 7f80fcba2000-7f80fcba3000 rw-p 00026000 08:01 1704004                    
> /lib/x86_64-linux-gnu/libtinfo.so.5.9
> 7f80fcba3000-7f80fcbdc000 r-xp 00000000 08:01 1704181                    
> /lib/x86_64-linux-gnu/libreadline.so.6.2
> 7f80fcbdc000-7f80fcddc000 ---p 00039000 08:01 1704181                    
> /lib/x86_64-linux-gnu/libreadline.so.6.2
> 7f80fcddc000-7f80fcdde000 r--p 00039000 08:01 1704181                    
> /lib/x86_64-linux-gnu/libreadline.so.6.2
> 7f80fcdde000-7f80fcde4000 rw-p 0003b000 08:01 1704181                    
> /lib/x86_64-linux-gnu/libreadline.so.6.2
> 7f80fcde4000-7f80fcde5000 rw-p 00000000 00:00 0 
> 7f80fcde5000-7f80fcdea000 r-xp 00000000 08:01 1456232                    
> /usr/lib/python2.7/lib-dynload/readline.so
> 7f80fcdea000-7f80fcfe9000 ---p 00005000 08:01 1456232                    
> /usr/lib/python2.7/lib-dynload/readline.so
> 7f80fcfe9000-7f80fcfea000 r--p 00004000 08:01 1456232                    
> /usr/lib/python2.7/lib-dynload/readline.so
> 7f80fcfea000-7f80fcfec000 rw-p 00005000 08:01 1456232                    
> /usr/lib/python2.7/lib-dynload/readline.so
> 7f80fcfec000-7f80fcff0000 r-xp 00000000 08:01 1456240                    
> /usr/lib/python2.7/lib-dynload/termios.so
> 7f80fcff0000-7f80fd1ef000 ---p 00004000 08:01 1456240                    
> /usr/lib/python2.7/lib-dynload/termios.so
> 7f80fd1ef000-7f80fd1f0000 r--p 00003000 08:01 1456240                    
> /usr/lib/python2.7/lib-dynload/termios.so
> 7f80fd1f0000-7f80fd1f2000 rw-p 00004000 08:01 1456240                    
> /usr/lib/python2.7/lib-dynload/termios.so
> 7f80fd1f2000-7f80fd1f8000 r-xp 00000000 08:01 1456257                    
> /usr/lib/python2.7/lib-dynload/_csv.so
> 7f80fd1f8000-7f80fd3f7000 ---p 00006000 08:01 1456257                    
> /usr/lib/python2.7/lib-dynload/_csv.so
> 7f80fd3f7000-7f80fd3f8000 r--p 00005000 08:01 1456257                    
> /usr/lib/python2.7/lib-dynload/_csv.so
> 7f80fd3f8000-7f80fd3fa000 rw-p 00006000 08:01 1456257                    
> /usr/lib/python2.7/lib-dynload/_csv.so
> 7f80fd3fa000-7f80fd3fd000 r-xp 00000000 08:01 1456238                    
> /usr/lib/python2.7/lib-dynload/_heapq.so
> 7f80fd3fd000-7f80fd5fc000 ---p 00003000 08:01 1456238                    
> /usr/lib/python2.7/lib-dynload/_heapq.so
> 7f80fd5fc000-7f80fd5fd000 r--p 00002000 08:01 1456238                    
> /usr/lib/python2.7/lib-dynload/_heapq.so
> 7f80fd5fd000-7f80fd5ff000 rw-p 00003000 08:01 1456238                    
> /usr/lib/python2.7/lib-dynload/_heapq.so
> 7f80fd5ff000-7f80fd6c0000 rw-p 00000000 00:00 0 
> 7f80fd6c0000-7f80fd6e1000 r-xp 00000000 08:01 1456260                    
> /usr/lib/python2.7/lib-dynload/_ctypes.so
> 7f80fd6e1000-7f80fd8e0000 ---p 00021000 08:01 1456260                    
> /usr/lib/python2.7/lib-dynload/_ctypes.so
> 7f80fd8e0000-7f80fd8e1000 r--p 00020000 08:01 1456260                    
> /usr/lib/python2.7/lib-dynload/_ctypes.so
> 7f80fd8e1000-7f80fd8e5000 rw-p 00021000 08:01 1456260                    
> /usr/lib/python2.7/lib-dynload/_ctypes.so
> 7f80fd8e5000-7f80fd968000 rw-p 00000000 00:00 0 
> 7f80fd96b000-7f80fd96f000 r-xp 00000000 08:01 1704045                    
> /lib/x86_64-linux-gnu/libuuid.so.1.3.0
> 7f80fd96f000-7f80fdb6e000 ---p 00004000 08:01 1704045                    
> /lib/x86_64-linux-gnu/libuuid.so.1.3.0
> 7f80fdb6e000-7f80fdb6f000 r--p 00003000 08:01 1704045                    
> /lib/x86_64-linux-gnu/libuuid.so.1.3.0
> 7f80fdb6f000-7f80fdb70000 rw-p 00004000 08:01 1704045                    
> /lib/x86_64-linux-gnu/libuuid.so.1.3.0
> 7f80fdb70000-7f80fde39000 r--p 00000000 08:01 1447853                    
> /usr/lib/locale/locale-archive
> 7f80fde39000-7f80fde4e000 r-xp 00000000 08:01 1703980                    
> /lib/x86_64-linux-gnu/libgcc_s.so.1
> 7f80fde4e000-7f80fe04d000 ---p 00015000 08:01 1703980                    
> /lib/x86_64-linux-gnu/libgcc_s.so.1
> 7f80fe04d000-7f80fe04e000 r--p 00014000 08:01 1703980                    
> /lib/x86_64-linux-gnu/libgcc_s.so.1
> 7f80fe04e000-7f80fe04f000 rw-p 00015000 08:01 1703980                    
> /lib/x86_64-linux-gnu/libgcc_s.so.1
> 7f80fe04f000-7f80fe204000 r-xp 00000000 08:01 1703953                    
> /lib/x86_64-linux-gnu/libc-2.15.so
> 7f80fe204000-7f80fe404000 ---p 001b5000 08:01 1703953                    
> /lib/x86_64-linux-gnu/libc-2.15.so
> 7f80fe404000-7f80fe408000 r--p 001b5000 08:01 1703953                    
> /lib/x86_64-linux-gnu/libc-2.15.so
> 7f80fe408000-7f80fe40a000 rw-p 001b9000 08:01 1703953                    
> /lib/x86_64-linux-gnu/libc-2.15.so
> 7f80fe40a000-7f80fe40f000 rw-p 00000000 00:00 0 
> 7f80fe40f000-7f80fe50a000 r-xp 00000000 08:01 1703968                    
> /lib/x86_64-linux-gnu/libm-2.15.so
> 7f80fe50a000-7f80fe709000 ---p 000fb000 08:01 1703968                    
> /lib/x86_64-linux-gnu/libm-2.15.so
> 7f80fe709000-7f80fe70a000 r--p 000fa000 08:01 1703968                    
> /lib/x86_64-linux-gnu/libm-2.15.so
> 7f80fe70a000-7f80fe70b000 rw-p 000fb000 08:01 1703968                    
> /lib/x86_64-linux-gnu/libm-2.15.so
> 7f80fe70b000-7f80fe721000 r-xp 00000000 08:01 1704165                    
> /lib/x86_64-linux-gnu/libz.so.1.2.3.4
> 7f80fe721000-7f80fe920000 ---p 00016000 08:01 1704165                    
> /lib/x86_64-linux-gnu/libz.so.1.2.3.4
> 7f80fe920000-7f80fe921000 r--p 00015000 08:01 1704165                    
> /lib/x86_64-linux-gnu/libz.so.1.2.3.4
> 7f80fe921000-7f80fe922000 rw-p 00016000 08:01 1704165                    
> /lib/x86_64-linux-gnu/libz.so.1.2.3.4
> 7f80fe922000-7f80fead3000 r-xp 00000000 08:01 1710096                    
> /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
> 7f80fead3000-7f80fecd3000 ---p 001b1000 08:01 1710096                    
> /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
> 7f80fecd3000-7f80fecee000 r--p 001b1000 08:01 1710096                    
> /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
> 7f80fecee000-7f80fecf9000 rw-p 001cc000 08:01 1710096                    
> /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
> 7f80fecf9000-7f80fecfd000 rw-p 00000000 00:00 0 
> 7f80fecfd000-7f80fed51000 r-xp 00000000 08:01 1710095                    
> /lib/x86_64-linux-gnu/libssl.so.1.0.0
> 7f80fed51000-7f80fef51000 ---p 00054000 08:01 1710095                    
> /lib/x86_64-linux-gnu/libssl.so.1.0.0
> 7f80fef51000-7f80fef54000 r--p 00054000 08:01 1710095                    
> /lib/x86_64-linux-gnu/libssl.so.1.0.0
> 7f80fef54000-7f80fef5a000 rw-p 00057000 08:01 1710095                    
> /lib/x86_64-linux-gnu/libssl.so.1.0.0
> 7f80fef5a000-7f80fef5b000 rw-p 00000000 00:00 0 
> 7f80fef5b000-7f80fef5d000 r-xp 00000000 08:01 1703952                    
> /lib/x86_64-linux-gnu/libutil-2.15.so
> 7f80fef5d000-7f80ff15c000 ---p 00002000 08:01 1703952                    
> /lib/x86_64-linux-gnu/libutil-2.15.so
> 7f80ff15c000-7f80ff15d000 r--p 00001000 08:01 1703952                    
> /lib/x86_64-linux-gnu/libutil-2.15.so
> 7f80ff15d000-7f80ff15e000 rw-p 00002000 08:01 1703952                    
> /lib/x86_64-linux-gnu/libutil-2.15.so
> 7f80ff15e000-7f80ff160000 r-xp 00000000 08:01 1703972                    
> /lib/x86_64-linux-gnu/libdl-2.15.so
> 7f80ff160000-7f80ff360000 ---p 00002000 08:01 1703972                    
> /lib/x86_64-linux-gnu/libdl-2.15.so
> 7f80ff360000-7f80ff361000 r--p 00002000 08:01 1703972                    
> /lib/x86_64-linux-gnu/libdl-2.15.so
> 7f80ff361000-7f80ff362000 rw-p 00003000 08:01 1703972                    
> /lib/x86_64-linux-gnu/libdl-2.15.so
> 7f80ff362000-7f80ff37a000 r-xp 00000000 08:01 1703966                    
> /lib/x86_64-linux-gnu/libpthread-2.15.so
> 7f80ff37a000-7f80ff579000 ---p 00018000 08:01 1703966                    
> /lib/x86_64-linux-gnu/libpthread-2.15.so
> 7f80ff579000-7f80ff57a000 r--p 00017000 08:01 1703966                    
> /lib/x86_64-linux-gnu/libpthread-2.15.so
> 7f80ff57a000-7f80ff57b000 rw-p 00018000 08:01 1703966                    
> /lib/x86_64-linux-gnu/libpthread-2.15.so
> 7f80ff57b000-7f80ff57f000 rw-p 00000000 00:00 0 
> 7f80ff57f000-7f80ff5a1000 r-xp 00000000 08:01 1703969                    
> /lib/x86_64-linux-gnu/ld-2.15.so
> 7f80ff655000-7f80ff6d7000 rw-p 00000000 00:00 0 
> 7f80ff708000-7f80ff790000 rw-p 00000000 00:00 0 
> 7f80ff79a000-7f80ff79e000 rw-p 00000000 00:00 0 
> 7f80ff79e000-7f80ff79f000 rwxp 00000000 00:00 0 
> 7f80ff79f000-7f80ff7a1000 rw-p 00000000 00:00 0 
> 7f80ff7a1000-7f80ff7a2000 r--p 00022000 08:01 1703969                    
> /lib/x86_64-linux-gnu/ld-2.15.so
> 7f80ff7a2000-7f80ff7a4000 rw-p 00023000 08:01 1703969                    
> /lib/x86_64-linux-gnu/ld-2.15.so
> 7fff01618000-7fff01639000 rw-p 00000000 00:00 0                          
> [stack]
> 7fff0174d000-7fff0174f000 r-xp 00000000 00:00 0                          
> [vdso]
> ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  
> [vsyscall]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to