question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

speech 0.32.0 causing memory leak

See original GitHub issue
  1. Specify the API google-cloud-speech 0.32.0

  2. OS type and version Ubuntu and CentOS

  3. Python version 2.7.3

  4. Step to reproduce I have a chatbot program where it let user speaks to the computer and computer will response back. The program will call speech to text module from time to time. I notice that after few minutes, the program crash with OSError: [Errno 12] Cannot allocate memory. I ran the program again along side top command and I notice that the memory usage is gradually increasing. After several debugging process, I found out that the problem came from the google-cloud-speech usage. I downgrade the library to the one that I used before (0.29.0) and run the program again. I notice that this time, the memory usage is not that high and it didn’t increase over time.

top output when I’m running the program with google-cloud-speech 0.32.0
top-0 32 0

top output when I’m running the program with google-cloud-speech 0.29.0 top-0 29 0

Here’s the code that I used for this test. memory_leak_test.txt

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
akmalmzamricommented, Apr 18, 2018

@crwilcox I have yet to updated my grpcio but updating google-cloud-speech to 0.33.0 seems to fix the issue as well

0reactions
crwilcoxcommented, Apr 17, 2018

@akmalhakimi1991, this should be resolved as we believe the root of the issue was fixed in a recent update to grpcio. If you update grpcio by running pip install grpcio --upgrade your issue should be resolved. This will get version 1.11.0 which has the fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Constant Memory Leak in SpeechSynthesizer - Stack Overflow
This is a know issue in the Speak method. A structure called SPVTEXTFRAG gets created and never destroyed.
Read more >
How we find and fix OOM and memory leaks in Java Services
A memory leak is a type of resource leak that occurs when there is a failure in a program to release discarded memory,...
Read more >
Falco 0.20.0 is released
Memory leaks in Kubernetes Audit Events. Upgrading is particularly important because the versions above are subject to a memory leak that has ...
Read more >
Memory leak - Wikipedia
In computer science, a memory leak is a type of resource leak that occurs when a computer program incorrectly manages memory allocations in...
Read more >
Memory leak mustgather — ihsdiag documentation
64-bit IHS builds on AIX mistakenly shipped with a default MAXDATA setting in bin/envvars that limits overall heap size to around 2GB. While...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found