{"action":"created","issue":{"url":"https://api.github.com/repos/opencog/opencog/issues/1710","labels_url":"https://api.github.com/repos/opencog/opencog/issues/1710/labels{/name}","comments_url":"https://api.github.com/repos/opencog/opencog/issues/1710/comments","events_url":"https://api.github.com/repos/opencog/opencog/issues/1710/events","html_url":"https://github.com/opencog/opencog/issues/1710","id":100159508,"number":1710,"title":"Global segmentation fault on PLN computation","user":{"login":"SamuelHassine","id":1334279,"avatar_url":"https://avatars.githubusercontent.com/u/1334279?v=3","gravatar_id":"","url":"https://api.github.com/users/SamuelHassine","html_url":"https://github.com/SamuelHassine","followers_url":"https://api.github.com/users/SamuelHassine/followers","following_url":"https://api.github.com/users/SamuelHassine/following{/other_user}","gists_url":"https://api.github.com/users/SamuelHassine/gists{/gist_id}","starred_url":"https://api.github.com/users/SamuelHassine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamuelHassine/subscriptions","organizations_url":"https://api.github.com/users/SamuelHassine/orgs","repos_url":"https://api.github.com/users/SamuelHassine/repos","events_url":"https://api.github.com/users/SamuelHassine/events{/privacy}","received_events_url":"https://api.github.com/users/SamuelHassine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-10T20:17:55Z","updated_at":"2015-08-13T18:26:31Z","closed_at":null,"body":"Hello,\r\n\r\nAfter a fresh compilation and installation (with the last sources), I got a global segmentation fault on the Cog Server during a specific PLN operation.\r\n\r\nSteps to reproduce:\r\n\r\nJust in case: \r\n- Here is the opencog.conf : http://paste.ubuntu.com/12050852/.\r\n- The only custom scm file is pln-config.scm : http://paste.ubuntu.com/12050873/\r\n\r\nRun the server:\r\n\r\n``` sh\r\n./opencog/server/cogserver -c lib/opencog.conf\r\nlink-grammar: Info: Dictionary found at /usr/local/share/link-grammar/en/4.0.dict\r\nListening on port 17001\r\n```\r\n\r\nGoing into the shell:\r\n\r\n``` sh\r\n$ telnet localhost 17001\r\nopencog>\r\nopencog> scm\r\nguile> (load \"reasoning/pln/rules/deduction.scm\")\r\nguile> (load \"tests/reasoning/engine/simple-assertions.scm\")\r\n```\r\n\r\nEverything is working until this point, just a quick check:\r\n\r\n``` sh\r\n$ guile> (cog-node 'ConceptNode \"man\")\r\n(ConceptNode \"man\" (stv 0,0099999998 0,89999998))\r\n```\r\n\r\nConcept nodes are correctly created.\r\n\r\nAnd when I put the command:\r\n\r\n``` sh\r\nguile> (cog-bind find-humans)\r\nConnection closed by foreign host.\r\n```\r\n\r\nThe CogServer just crashed with the output:\r\n\r\n>\r\n[2015-08-10 20:14:50:941] [ERROR] Caught signal 11 (Segmentation fault) on thread 140369210648320\r\n        Stack Trace:\r\n        2: basic_string.h:293     std::string::_M_data() const\r\n        3: ??:0 killpg()\r\n        4: Handle.cc:37   opencog::Handle::Handle(std::shared_ptr<opencog::Atom> const&)\r\n        5: shared_ptr_base.h:665          opencog::AtomSpace::add_atom(std::shared_ptr<opencog::Atom>, bool)\r\n        6: shared_ptr_base.h:665          opencog::Instantiator::instantiate(opencog::Handle const&, std::map<opencog::Handle, opencog::Handle, std::less<opencog::Handle>, std::allocator<std::pair<opencog::Handle const, opencog::Handle> > > const&)\r\n        7: Implicator.cc:48       opencog::Implicator::grounding(std::map<opencog::Handle, opencog::Handle, std::less<opencog::Handle>, std::allocator<std::pair<opencog::Handle const, opencog::Handle> > > const&, std::map<opencog::Handle, opencog::Handle, std::less<opencog::Handle>, std::allocator<std::pair<opencog::Handle const, opencog::Handle> > > const&)\r\n        8: PatternMatchEngine.cc:1298     opencog::PatternMatchEngine::do_next_clause()\r\n        9: PatternMatchEngine.cc:1278     opencog::PatternMatchEngine::clause_accept(opencog::Handle const&, opencog::Handle const&, opencog::Handle const&)\r\n        10: PatternMatchEngine.cc:1107    opencog::PatternMatchEngine::do_term_up(opencog::Handle const&, opencog::Handle const&, opencog::Handle const&)\r\n        11: PatternMatchEngine.cc:1051    opencog::PatternMatchEngine::explore_single_branch(opencog::Handle const&, opencog::Handle const&, opencog::Handle const&)\r\n        12: InitiateSearchCB.cc:287       opencog::InitiateSearchCB::neighbor_search(opencog::PatternMatchEngine*)\r\n        13: InitiateSearchCB.cc:482       opencog::InitiateSearchCB::disjunct_search(opencog::PatternMatchEngine*)\r\n        14: PatternMatch.cc:341   opencog::PatternLink::satisfy(opencog::PatternMatchCallback&) const\r\n        15: stl_vector.h:655      std::vector<opencog::Handle, std::allocator<opencog::Handle> >::size() const\r\n        16: DefaultImplicator.h:36        opencog::bindlink(opencog::AtomSpace*, opencog::Handle const&)\r\n        17: SchemeModule.cc:41    opencog::FunctionWrap::wrapper(opencog::Handle)\r\n        18: shared_ptr_base.h:665         opencog::SchemePrimitive<opencog::FunctionWrap>::invoke(scm_unused_struct*)\r\n        19: SchemePrimitive.cc:158        opencog::PrimitiveEnviron::do_call(scm_unused_struct*, scm_unused_struct*)\r\n        20: ??:0        scm_effective_version()\r\n        21: ??:0        scm_effective_version()\r\n        22: ??:0        scm_call_1()\r\n        23: ??:0        scm_call_with_input_string()\r\n        24: ??:0        scm_effective_version()\r\n        25: ??:0        scm_effective_version()\r\n        26: ??:0        scm_call_3()\r\n        27: ??:0        scm_eval_string_in_module()\r\n        28: ??:0        scm_eval_string()\r\n        29: ??:0        scm_throw()\r\n        30: ??:0        scm_smob_print()\r\n        31: ??:0        scm_effective_version()\r\n        32: ??:0        scm_effective_version()\r\n        33: ??:0        scm_call_4()\r\n        34: ??:0        scm_catch_with_pre_unwind_handler()\r\n        35: ??:0        scm_c_catch()\r\n        36: SchemeEval.cc:612     opencog::SchemeEval::do_eval(std::string const&)\r\n        37: SchemeEval.cc:541     opencog::SchemeEval::c_wrap_eval(void*)\r\n        38: ??:0        scm_at_abort()\r\n        39: ??:0        scm_throw()\r\n        40: ??:0        scm_smob_print()\r\n        41: ??:0        scm_effective_version()\r\n        42: ??:0        scm_effective_version()\r\n        43: ??:0        scm_call_4()\r\n        44: ??:0        scm_catch_with_pre_unwind_handler()\r\n        45: ??:0        scm_c_catch()\r\n        46: ??:0        scm_at_abort()\r\n        47: ??:0        scm_c_with_continuation_barrier()\r\n        48: ??:0        scm_init_guile()\r\n        49: ??:0        GC_call_with_gc_active()\r\n>\r\n\r\nAvailable if need further tests/debug.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/opencog/opencog/issues/comments/130790004","html_url":"https://github.com/opencog/opencog/issues/1710#issuecomment-130790004","issue_url":"https://api.github.com/repos/opencog/opencog/issues/1710","id":130790004,"user":{"login":"linas","id":94368,"avatar_url":"https://avatars.githubusercontent.com/u/94368?v=3","gravatar_id":"","url":"https://api.github.com/users/linas","html_url":"https://github.com/linas","followers_url":"https://api.github.com/users/linas/followers","following_url":"https://api.github.com/users/linas/following{/other_user}","gists_url":"https://api.github.com/users/linas/gists{/gist_id}","starred_url":"https://api.github.com/users/linas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linas/subscriptions","organizations_url":"https://api.github.com/users/linas/orgs","repos_url":"https://api.github.com/users/linas/repos","events_url":"https://api.github.com/users/linas/events{/privacy}","received_events_url":"https://api.github.com/users/linas/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T18:26:31Z","updated_at":"2015-08-13T18:26:31Z","body":"Good catch!  I just pushed a fix for this. If you find more crashes, please open new bug reports for each."}}