Skip to content
This repository was archived by the owner on Feb 3, 2023. It is now read-only.
This repository was archived by the owner on Feb 3, 2023. It is now read-only.

malloc() memory corruption error #14

Description

@willyspinner

Hi reaper,
I was running parallel reaper processes as worker processes spawned by python's multiprocessing Pool to speed up generation of .f0 files from multiple single-channel .wav files. In each worker process, I call

os.system("reaper -i FILENAME.wav -f FILENAME.f0 -e 0.02 -a")

which executes the reaper command processing that filename in a subshell (Obviously I made sure that no two reaper workers access the same FILENAME).
All of a sudden, I got an unexpected malloc error below.

(FYI I am running Ubuntu 16.04 LTS, but have confirmed this error persists on Mac OSX as well...)

Residual symmetry: P:837.185303  N:803.405762  MEAN:-0.159036
Inverting signal
*** Error in `reaper': malloc(): memory corruption: 0x0000000006212a70 ***

======= Backtrace: =========

/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7ff4097747e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8213e)[0x7ff40977f13e]
/lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x54)[0x7ff409781184]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(_Znwm+0x18)[0x7ff40a073e78]
reaper(_Z12MakeF0OutputR12EpochTrackerfPP5Track+0x82)[0x415fcf]
reaper(_Z18ComputeEpochsAndF0R12EpochTrackerffPP5TrackS3_S3_+0x119)[0x416361]
reaper(main+0x4c1)[0x416879]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7ff40971d830]
reaper(_start+0x29)[0x415ce9]
======= Memory map: ========
00400000-0043c000 r-xp 00000000 08:01 794191                             /usr/bin/reaper
0063b000-0063c000 r--p 0003b000 08:01 794191                             /usr/bin/reaper
0063c000-0063d000 rw-p 0003c000 08:01 794191                             /usr/bin/reaper
01686000-06230000 rw-p 00000000 00:00 0                                  [heap]
7ff404000000-7ff404021000 rw-p 00000000 00:00 0
7ff404021000-7ff408000000 ---p 00000000 00:00 0
7ff40945b000-7ff40961c000 rw-p 00000000 00:00 0
7ff4096fd000-7ff4098bd000 r-xp 00000000 08:01 394095                     /lib/x86_64-linux-gnu/libc-2.23.so
7ff4098bd000-7ff409abd000 ---p 001c0000 08:01 394095                     /lib/x86_64-linux-gnu/libc-2.23.so
7ff409abd000-7ff409ac1000 r--p 001c0000 08:01 394095                     /lib/x86_64-linux-gnu/libc-2.23.so
7ff409ac1000-7ff409ac3000 rw-p 001c4000 08:01 394095                     /lib/x86_64-linux-gnu/libc-2.23.so
7ff409ac3000-7ff409ac7000 rw-p 00000000 00:00 0
7ff409ac7000-7ff409add000 r-xp 00000000 08:01 394116                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7ff409add000-7ff409cdc000 ---p 00016000 08:01 394116                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7ff409cdc000-7ff409cdd000 rw-p 00015000 08:01 394116                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7ff409cdd000-7ff409de5000 r-xp 00000000 08:01 394127                     /lib/x86_64-linux-gnu/libm-2.23.so
7ff409de5000-7ff409fe4000 ---p 00108000 08:01 394127                     /lib/x86_64-linux-gnu/libm-2.23.so
7ff409fe4000-7ff409fe5000 r--p 00107000 08:01 394127                     /lib/x86_64-linux-gnu/libm-2.23.so
7ff409fe5000-7ff409fe6000 rw-p 00108000 08:01 394127                     /lib/x86_64-linux-gnu/libm-2.23.so
7ff409fe6000-7ff40a158000 r-xp 00000000 08:01 394983                     /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7ff40a158000-7ff40a358000 ---p 00172000 08:01 394983                     /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7ff40a358000-7ff40a362000 r--p 00172000 08:01 394983                     /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7ff40a362000-7ff40a364000 rw-p 0017c000 08:01 394983                     /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7ff40a364000-7ff40a368000 rw-p 00000000 00:00 0
7ff40a368000-7ff40a38e000 r-xp 00000000 08:01 394075                     /lib/x86_64-linux-gnu/ld-2.23.so
7ff40a3e6000-7ff40a4b1000 rw-p 00000000 00:00 0
7ff40a517000-7ff40a582000 rw-p 00000000 00:00 0
7ff40a58a000-7ff40a58d000 rw-p 00000000 00:00 0
7ff40a58d000-7ff40a58e000 r--p 00025000 08:01 394075                     /lib/x86_64-linux-gnu/ld-2.23.so
7ff40a58e000-7ff40a58f000 rw-p 00026000 08:01 394075                     /lib/x86_64-linux-gnu/ld-2.23.so
7ff40a58f000-7ff40a590000 rw-p 00000000 00:00 0
7ffd8caad000-7ffd8cace000 rw-p 00000000 00:00 0                          [stack]
7ffd8cbee000-7ffd8cbf0000 r--p 00000000 00:00 0                          [vvar]
7ffd8cbf0000-7ffd8cbf2000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted

Could there be something I'm doing wrong? Or could Reaper be thread-unsafe? I just recently started using REAPER, and would really like to use this simple and powerful command-line tool frequently in the future.

Thank you for reading my issue :)
Best,

Wilson

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions