"Cannot allocate memory" during chromaprint fingerprinting
- Dominant language
- Python
- Stars
- 538
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
In the middle of fingerprinting ~1,700 songs, I got the following error. I had run "sudo -H pip install -U audioread" before, so the package should have been up to date.
```
Traceback (most recent call last):
File "/usr/bin/beet", line 9, in
load_entry_point('beets==1.3.8', 'console_scripts', 'beet')()
File "/usr/share/beets/beets/ui/__init__.py", line 964, in main
_raw_main(args)
File "/usr/share/beets/beets/ui/__init__.py", line 954, in _raw_main
subcommand.func(lib, suboptions, subargs)
File "/usr/share/beets/beetsplug/chroma.py", line 181, in fingerprint_cmd_func
write=config['import']['write'].get(bool))
File "/usr/share/beets/beetsplug/chroma.py", line 287, in fingerprint_item
_, fp = acoustid.fingerprint_file(item.path)
File "/usr/local/lib/python2.7/dist-packages/acoustid.py", line 321, in fingerprint_file
return _fingerprint_file_audioread(path, maxlength)
File "/usr/local/lib/python2.7/dist-packages/acoustid.py", line 262, in _fingerprint_file_audioread
with audioread.audio_open(path) as f:
File "/usr/local/lib/python2.7/dist-packages/audioread/__init__.py", line 83, in audio_open
if _ca_available():
File "/usr/local/lib/python2.7/dist-packages/audioread/__init__.py", line 57, in _ca_available
lib = ctypes.util.find_library('AudioToolbox')
File "/usr/lib/python2.7/ctypes/util.py", line 248, in find_library
return _findSoname_ldconfig(name) or _get_soname(_findLib_gcc(name))
File "/usr/lib/python2.7/ctypes/util.py", line 237, in _findSoname_ldconfig
f = os.popen('LC_ALL=C LANG=C /sbin/ldconfig -p 2>/dev/null')
OSError: [Errno 12] Cannot allocate memory
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the traceback path in audioread/__init__.py, especially _ca_available(), and compare it with Python 2.7's ctypes.util.find_library implementation. Reproduce the chromaprint fingerprinting command if possible, then determine whether the memory error is caused by audioread or the system library lookup. Done means identifying a reproducible cause and documenting or testing the appropriate fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- audio-video-rtc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100