darkdragn / lz4tools

LZ4Frame Bindings and tools for Python
90 stars 30 forks source link

Fatal Python error: deallocating None #8

Open rafaelzimmermann opened 8 years ago

rafaelzimmermann commented 8 years ago

When we try to decompress many files in a loop the process is killed by the OS.

Python 2.7.6 OS: Ubuntu 14.04.3 LTS 14.04

import lz4tools
file_name = "/tmp/file.lz4"
for i in range(1, 1000):
    print i
    file_ = lz4tools.open(file_name)
    data = file_.decomp
    file_.close()

Output

...
364
365
366
367
368
369
Fatal Python error: deallocating None

strace

16:14:39.809310 write(2, "Fatal Python error: deallocating"..., 38) = 38
16:14:39.810527 rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
16:14:39.814320 tgkill(69, 69, SIGABRT) = 0
16:14:39.814395 --- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=69, si_uid=0} ---
16:14:39.841279 +++ killed by SIGABRT +++

/cc @mspringfeldt @bixu

dpkp commented 7 years ago

I'm also seeing a free error when using lz4f.freeDecompContext:

pypy: free(): invalid pointer: 0x00007fc96e5543b0

I wonder if this is related?