Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nlp-parse is not working with child atomspace #2692

Open
andre-senna opened this issue Apr 17, 2017 · 4 comments
Open

nlp-parse is not working with child atomspace #2692

andre-senna opened this issue Apr 17, 2017 · 4 comments

Comments

@andre-senna
Copy link

The following SCM script crashes or hangs after +- 10 cycles.

If I comment the call to cog-set-atomspace! it works ok. If I comment the call to r2l-parse (inside nlp-parse) it will also work ok.

`(add-to-load-path "/usr/local/share/opencog/scm")
(add-to-load-path "/opencog/build/opencog/scm/opencog/")
(add-to-load-path ".")

(use-modules (ice-9 readline))
(activate-readline)

(use-modules (opencog))
(use-modules (opencog nlp) (opencog nlp lg-dict) (opencog nlp relex2logic) (opencog nlp chatbot))

(set-relex-server-host)
(cog-set-atomspace! (cog-new-atomspace (cog-atomspace)))
(while #t (begin
(display ".")
(nlp-parse "What is engineered hardwood flooring?")))
`

@leungmanhin
Copy link
Contributor

This is strange, I can reproduce this issue and it hangs after 5 or 6 cycles on my computer, not sure why yet... But if it's about running with a child atomspace, it might have something with the forward chainer, as the main operation r2l-parse does is to call forward chainer to apply the r2l rules. @ngeiswei any quick thoughts?

@linas
Copy link
Member

linas commented Apr 18, 2017

I assume that "hangs" == 0% cpu use, and not 100% cpu use ... I assume that stack traces show a bunch of threads in deadlock. Does it hang if you put a sleep in the nlp-parse?

@linas
Copy link
Member

linas commented Apr 18, 2017

The idea of the atomspace is that it should be impossible to make it hang, no matter how buggy r2l-parse or the forward chainer is. ...

@leungmanhin
Copy link
Contributor

I don't get any stack traces, it just stop doing anything after 6 cycles, and putting a sleep in nlp-parse doesn't help...

@linas linas added the state:bug label Jun 5, 2017
@linas linas added the nlp label Jan 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants