Segmentation fault, memory error? [There appear to be 1 leaked semaphore objects]

See original GitHub issue

Hey there! First of all, thanks for your fantastic work here. Really love this project 😄

I’m trying to run the python library of argos, something like doing this in my code:

installed_languages = translate.get_installed_languages()
print([str(lang) for lang in installed_languages])

print("Installed argos languages:")
fr = [lang for lang in installed_languages if lang.name == "French"][-1]
en = [lang for lang in installed_languages if lang.name == "English"][-1]
es = [lang for lang in installed_languages if lang.name == "Spanish"][-1]
breakpoint()
translation_fr_en = fr.get_translation(en)
print(translation_fr_en.translate("Bonjour monde!"))

But I’m facing some issues.

To be more specific, I’m actually running with the Kedro framework inside of a pipeline module.

When running the above code, I got the following error:

23642 segmentation fault  kedro run --pipeline translate

Upon closer inspection, when setting up breakpoints, the following happens:

(Pdb) print(translation_fr_en.translate("Bonjour monde!"))
[1]    23698 segmentation fault  kedro run --pipeline translate_news
/Users/--/python/3.8.9/lib/python3.8/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown              
  warnings.warn('resource_tracker: There appear to be %d '

Do you have any idea of what this could be? I’ve bashed my head quite a lot, but figuring there’s something wrong?

In a notebook, I can run the following code no problem…

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
duarteocarmocommented, Nov 8, 2021

Hey guys! @PJ-Finlay , @guillaumekln , and @datajoely, thanks for the amazing help!

I’m stripping out a minimum reproducible example from my code base, will post it here very soon 😃

0reactions
datajoelycommented, Nov 8, 2021

If it is a 3.8 issue perhaps downgrading to 3.7 may help? Unfortunately Kedro can’t release 3.9 support until our next 0.18.0 release (early 2022) as it’s a breaking change.

Although @antonymilneqb has suggested a way of getting it running here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Model training on cpu (Intel) throws seg fault · Issue #19 - GitHub
In my case, on a MacBook Air with Intel chips, the backend seems to choose the CPU by default and then throws the...
Read more >
There appear to be 6 leaked semaphore objects to clean up at ...
In my case, this was caused by using multiprocessing.Queue without a reasonable maximum size. Too much data was being put into the queue...
Read more >
Issue with multiprocessing semaphore tracking
Hi I am facing an issue with semaphore tracking while using pytorch ... semaphore_tracker: There appear to be 1 leaked semaphores to clean ......
Read more >
Identify what's causing segmentation faults (segfaults)
A segmentation fault (aka segfault) is a common condition that causes programs to crash; they are often associated with a file named core...
Read more >
C++ Tutorial: Debugging Crash & Memory Leak - BogoToBogo
C++ Tutorial: Debugging Crash & Memory Leak, core dump, segmentation fault, gdb, dangling pointer, uninitialized memory, and buffer overflow.
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