{"action":"created","issue":{"url":"https://api.github.com/repos/Blosc/bcolz/issues/166","labels_url":"https://api.github.com/repos/Blosc/bcolz/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/Blosc/bcolz/issues/166/comments","events_url":"https://api.github.com/repos/Blosc/bcolz/issues/166/events","html_url":"https://github.com/Blosc/bcolz/pull/166","id":63598934,"number":166,"title":"Remove with nogil statement to avoid segfault","user":{"login":"mrocklin","id":306380,"avatar_url":"https://avatars.githubusercontent.com/u/306380?v=3","gravatar_id":"","url":"https://api.github.com/users/mrocklin","html_url":"https://github.com/mrocklin","followers_url":"https://api.github.com/users/mrocklin/followers","following_url":"https://api.github.com/users/mrocklin/following{/other_user}","gists_url":"https://api.github.com/users/mrocklin/gists{/gist_id}","starred_url":"https://api.github.com/users/mrocklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrocklin/subscriptions","organizations_url":"https://api.github.com/users/mrocklin/orgs","repos_url":"https://api.github.com/users/mrocklin/repos","events_url":"https://api.github.com/users/mrocklin/events{/privacy}","received_events_url":"https://api.github.com/users/mrocklin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":30,"created_at":"2015-03-23T01:29:47Z","updated_at":"2015-03-26T17:06:54Z","closed_at":"2015-03-26T17:01:37Z","pull_request":{"url":"https://api.github.com/repos/Blosc/bcolz/pulls/166","html_url":"https://github.com/Blosc/bcolz/pull/166","diff_url":"https://github.com/Blosc/bcolz/pull/166.diff","patch_url":"https://github.com/Blosc/bcolz/pull/166.patch"},"body":"Concurrent reads sometimes trigger a segfault somewhere within `blosc_decompress`. \r\n\r\nIn principle the old bcolz code seems correct; presumably there is some issue lower down?  For now a cheap solution seems to be to hold on to the GIL.\r\n\r\nFull trace is here:\r\n\r\n```\r\nProgram received signal SIGSEGV, Segmentation fault.\r\n[Switching to Thread 0x7fffd9c7d700 (LWP 28826)]\r\n_int_malloc (av=0x7fffa4000020, bytes=568) at malloc.c:3489\r\n3489\tmalloc.c: No such file or directory.\r\n(gdb) bt\r\n#0  _int_malloc (av=0x7fffa4000020, bytes=568) at malloc.c:3489\r\n#1  0x00007ffff70907b0 in __GI___libc_malloc (bytes=568) at malloc.c:2891\r\n#2  0x00007ffff707c44d in __fopen_internal (\r\n    filename=0x7fffa4031e90 \"/home/mrocklin/data/trip3.bcolz/rate_code/data/__445.blp\", \r\n    mode=0x7fff3fc8bf80 \"rb\", is32=1) at iofopen.c:73\r\n#3  0x00007ffff7a66717 in open_the_file (f=0x7fffdc338e40, \r\n    name=0x7fffa4031e90 \"/home/mrocklin/data/trip3.bcolz/rate_code/data/__445.blp\", \r\n    mode=0x7ffff7ecddc4 \"rb\") at Objects/fileobject.c:374\r\n#4  0x00007ffff7a68b52 in file_init (self=0x7fffdc338e40, args=0x7fffa0776098, kwds=0x0)\r\n    at Objects/fileobject.c:2430\r\n#5  0x00007ffff7aa3208 in type_call (type=<optimized out>, args=0x7fffa0776098, kwds=0x0)\r\n    at Objects/typeobject.c:745\r\n#6  0x00007ffff7a40323 in PyObject_Call (func=0x7ffff7d9c820 <PyFile_Type>, arg=<optimized out>, \r\n    kw=<optimized out>) at Objects/abstract.c:2529\r\n#7  0x00007fffe1d7dac1 in __Pyx_PyObject_Call (func=0x7ffff7fcda70, arg=arg@entry=0x7fffa0776098, \r\n    kw=0x0) at bcolz/carray_ext.c:37718\r\n#8  0x00007fffe1dc70b6 in __pyx_f_5bcolz_10carray_ext_6chunks_read_chunk (\r\n    __pyx_v_self=<optimized out>, __pyx_v_nchunk=0x11fce10) at bcolz/carray_ext.c:9434\r\n#9  0x00007fffe1d8532d in __pyx_pf_5bcolz_10carray_ext_6chunks_2__getitem__ (\r\n    __pyx_v_nchunk=0x11fce10, __pyx_v_self=0x7fffe1b40ad0) at bcolz/carray_ext.c:9867\r\n#10 __pyx_pw_5bcolz_10carray_ext_6chunks_3__getitem__ (__pyx_v_self=0x7fffe1b40ad0, \r\n    __pyx_v_nchunk=0x11fce10) at bcolz/carray_ext.c:9809\r\n#11 0x00007fffe1d7a07a in __pyx_sq_item_5bcolz_10carray_ext_chunks (o=0x7fffe1b40ad0, \r\n    i=<optimized out>) at bcolz/carray_ext.c:34563\r\n#12 0x00007fffe1dba1d0 in __Pyx_GetItemInt_Fast (is_list=0, wraparound=1, boundscheck=1, i=445, \r\n    o=<optimized out>) at bcolz/carray_ext.c:38415\r\n#13 __pyx_pf_5bcolz_10carray_ext_6carray_38__getitem__ (__pyx_v_key=<optimized out>, \r\n    __pyx_v_self=<optimized out>) at bcolz/carray_ext.c:24885\r\n#14 __pyx_pw_5bcolz_10carray_ext_6carray_39__getitem__ (__pyx_v_self=<optimized out>, \r\n    __pyx_v_key=<optimized out>) at bcolz/carray_ext.c:23217\r\n#15 0x00007fffe1db8ab3 in __pyx_pf_5bcolz_10carray_ext_6carray_38__getitem__ (\r\n    __pyx_v_key=0x7fffdb406d10, __pyx_v_self=0x7fffe2969bd0) at bcolz/carray_ext.c:23668\r\n#16 __pyx_pw_5bcolz_10carray_ext_6carray_39__getitem__ (__pyx_v_self=0x7fffe2969bd0, \r\n    __pyx_v_key=0x7fffdb406d10) at bcolz/carray_ext.c:23217\r\n#17 0x00007ffff54a3b3d in op_getitem (s=<optimized out>, a=<optimized out>)\r\n    at -------src-dir-------/Python-2.7.9/Modules/operator.c:130\r\n#18 0x00007ffff7af022f in ext_do_call (nk=-1742972520, na=<optimized out>, flags=<optimized out>, \r\n    pp_stack=0x7fffd9c7b408, func=0x7ffff5f09f38) at Python/ceval.c:4343\r\n#19 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:2718\r\n#20 0x00007ffff7af1c6e in PyEval_EvalCodeEx (co=0x7fffdc3b27b0, globals=<optimized out>, \r\n    locals=<optimized out>, args=<optimized out>, argcount=2, kws=0x7fffc4004910, kwcount=0, \r\n    defs=0x7fffdc3b3a28, defcount=1, closure=0x0) at Python/ceval.c:3265\r\n#21 0x00007ffff7af02aa in fast_function (nk=<optimized out>, na=2, n=<optimized out>, \r\n    pp_stack=0x7fffd9c7b608, func=0x7fffdc32b050) at Python/ceval.c:4129\r\n#22 call_function (oparg=<optimized out>, pp_stack=0x7fffd9c7b608) at Python/ceval.c:4054\r\n#23 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:2679\r\n#24 0x00007ffff7a6421c in gen_send_ex (gen=0x7fffdb3f8820, arg=0x0, exc=<optimized out>)\r\n    at Objects/genobject.c:85\r\n#25 0x00007ffff7a3f62b in PyIter_Next (iter=<optimized out>) at Objects/abstract.c:3103\r\n#26 0x00007ffff7ae44da in builtin_zip (self=<optimized out>, args=<optimized out>)\r\n    at Python/bltinmodule.c:2555\r\n#27 0x00007ffff7af022f in ext_do_call (nk=-1603221672, na=<optimized out>, flags=<optimized out>, \r\n    pp_stack=0x7fffd9c7b7f8, func=0x7ffff7fcdea8) at Python/ceval.c:4343\r\n---Type <return> to continue, or q <return> to quit---\r\n#28 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:2718\r\n#29 0x00007ffff7af1c6e in PyEval_EvalCodeEx (co=0x7fffdc3b27b0, globals=<optimized out>, \r\n    locals=<optimized out>, args=<optimized out>, argcount=2, kws=0x7fffa40398f0, kwcount=0, \r\n    defs=0x7fffdc3b3a28, defcount=1, closure=0x0) at Python/ceval.c:3265\r\n#30 0x00007ffff7af02aa in fast_function (nk=<optimized out>, na=2, n=<optimized out>, \r\n    pp_stack=0x7fffd9c7b9f8, func=0x7fffdc32b050) at Python/ceval.c:4129\r\n#31 call_function (oparg=<optimized out>, pp_stack=0x7fffd9c7b9f8) at Python/ceval.c:4054\r\n#32 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:2679\r\n#33 0x00007ffff7af1c6e in PyEval_EvalCodeEx (co=0x7fffdc3b27b0, globals=<optimized out>, \r\n    locals=<optimized out>, args=<optimized out>, argcount=2, kws=0x7fffc0002c90, kwcount=0, \r\n    defs=0x7fffdc3b3a28, defcount=1, closure=0x0) at Python/ceval.c:3265\r\n#34 0x00007ffff7af02aa in fast_function (nk=<optimized out>, na=2, n=<optimized out>, \r\n    pp_stack=0x7fffd9c7bbf8, func=0x7fffdc32b050) at Python/ceval.c:4129\r\n#35 call_function (oparg=<optimized out>, pp_stack=0x7fffd9c7bbf8) at Python/ceval.c:4054\r\n#36 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:2679\r\n#37 0x00007ffff7af1c6e in PyEval_EvalCodeEx (co=0x7fffdc3b27b0, globals=<optimized out>, \r\n    locals=<optimized out>, args=<optimized out>, argcount=2, kws=0x7fffa4003750, kwcount=0, \r\n    defs=0x7fffdc3b3a28, defcount=1, closure=0x0) at Python/ceval.c:3265\r\n#38 0x00007ffff7af02aa in fast_function (nk=<optimized out>, na=2, n=<optimized out>, \r\n    pp_stack=0x7fffd9c7bdf8, func=0x7fffdc32b050) at Python/ceval.c:4129\r\n#39 call_function (oparg=<optimized out>, pp_stack=0x7fffd9c7bdf8) at Python/ceval.c:4054\r\n#40 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:2679\r\n#41 0x00007ffff7af1c6e in PyEval_EvalCodeEx (co=0x7fffdc3b27b0, globals=<optimized out>, \r\n    locals=<optimized out>, args=<optimized out>, argcount=2, kws=0x7fffb4064210, kwcount=0, \r\n    defs=0x7fffdc3b3a28, defcount=1, closure=0x0) at Python/ceval.c:3265\r\n#42 0x00007ffff7af02aa in fast_function (nk=<optimized out>, na=2, n=<optimized out>, \r\n    pp_stack=0x7fffd9c7bff8, func=0x7fffdc32b050) at Python/ceval.c:4129\r\n#43 call_function (oparg=<optimized out>, pp_stack=0x7fffd9c7bff8) at Python/ceval.c:4054\r\n#44 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:2679\r\n#45 0x00007ffff7af1c6e in PyEval_EvalCodeEx (co=0x7fffdc3b27b0, globals=<optimized out>, \r\n    locals=<optimized out>, args=<optimized out>, argcount=2, kws=0x7fffa4003968, kwcount=0, \r\n    defs=0x7fffdc3b3a28, defcount=1, closure=0x0) at Python/ceval.c:3265\r\n#46 0x00007ffff7af02aa in fast_function (nk=<optimized out>, na=2, n=<optimized out>, \r\n    pp_stack=0x7fffd9c7c1f8, func=0x7fffdc32b050) at Python/ceval.c:4129\r\n#47 call_function (oparg=<optimized out>, pp_stack=0x7fffd9c7c1f8) at Python/ceval.c:4054\r\n#48 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:2679\r\n#49 0x00007ffff7af1c6e in PyEval_EvalCodeEx (co=0x7fffdc3b28b0, globals=<optimized out>, \r\n    locals=<optimized out>, args=<optimized out>, argcount=5, kws=0x7ffff7f92068, kwcount=0, \r\n    defs=0x7fffdc3b3b68, defcount=1, closure=0x0) at Python/ceval.c:3265\r\n#50 0x00007ffff7a6f958 in function_call (func=0x7fffdc32b0c8, arg=0x7fffdbcae4d0, kw=0x7fffdbed2910)\r\n    at Objects/funcobject.c:526\r\n#51 0x00007ffff7a40323 in PyObject_Call (func=0x7fffdc32b0c8, arg=<optimized out>, \r\n    kw=<optimized out>) at Objects/abstract.c:2529\r\n#52 0x00007ffff7aee865 in ext_do_call (nk=-607460144, na=<optimized out>, flags=<optimized out>, \r\n    pp_stack=0x7fffd9c7c4c8, func=0x7fffdc32b0c8) at Python/ceval.c:4346\r\n#53 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:2718\r\n#54 0x00007ffff7af1c6e in PyEval_EvalCodeEx (co=0x7fffdbece830, globals=<optimized out>, \r\n    locals=<optimized out>, args=<optimized out>, argcount=5, kws=0x7ffff7f92068, kwcount=0, \r\n    defs=0x7fffdc349f68, defcount=3, closure=0x0) at Python/ceval.c:3265\r\n#55 0x00007ffff7a6f958 in function_call (func=0x7fffdbed3b90, arg=0x7fffdbcae050, kw=0x7fffdbee15c8)\r\n    at Objects/funcobject.c:526\r\n#56 0x00007ffff7a40323 in PyObject_Call (func=0x7fffdbed3b90, arg=<optimized out>, \r\n    kw=<optimized out>) at Objects/abstract.c:2529\r\n```\r\n\r\nRelevant line numbers often point to [this carray_ext.c file](https://gist.githubusercontent.com/mrocklin/60fd4f914198bea3b863/raw/carray_ext.c)"},"comment":{"url":"https://api.github.com/repos/Blosc/bcolz/issues/comments/86627238","html_url":"https://github.com/Blosc/bcolz/pull/166#issuecomment-86627238","issue_url":"https://api.github.com/repos/Blosc/bcolz/issues/166","id":86627238,"user":{"login":"FrancescAlted","id":314521,"avatar_url":"https://avatars.githubusercontent.com/u/314521?v=3","gravatar_id":"","url":"https://api.github.com/users/FrancescAlted","html_url":"https://github.com/FrancescAlted","followers_url":"https://api.github.com/users/FrancescAlted/followers","following_url":"https://api.github.com/users/FrancescAlted/following{/other_user}","gists_url":"https://api.github.com/users/FrancescAlted/gists{/gist_id}","starred_url":"https://api.github.com/users/FrancescAlted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrancescAlted/subscriptions","organizations_url":"https://api.github.com/users/FrancescAlted/orgs","repos_url":"https://api.github.com/users/FrancescAlted/repos","events_url":"https://api.github.com/users/FrancescAlted/events{/privacy}","received_events_url":"https://api.github.com/users/FrancescAlted/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T17:06:54Z","updated_at":"2015-03-26T17:06:54Z","body":"Ok.  At any rate, I will use current master against c-blosc 1.5 and report my results too."}}