mtallis314 / alchemy-2

Automatically exported from code.google.com/p/alchemy-2
Other
0 stars 0 forks source link

Segmentation fault (core dumped) on uniform example #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. make (ubuntu 12.10)
2. follow tutorial from the pdf
$ cat uniform.mln 
flip = {1,...,20}

Heads(flip)

$ cat empty.db 
$

3. run alchemy
$ ./bin/infer -i uniform.mln -r uniform.result -e empty.db -q Heads

What is the expected output? What do you see instead?
----------------- parameters ----------------
-i = uniform.mln
-cw = 
-ow = 
-queryEvidence = 0
-m = 0
-a = 0
-p = 0
-ms = 0
-bp = 0
-efbp = 0
-decision = 0
-simtp = 0
-outputNetwork = 0
-counts = 0
-seed = -1
-lazy = 0
-lazyNoApprox = 0
-memLimit = -1
-PrintSamplePerIteration = 0
-SAInterval = 100
-MaxSeconds = 
-SATempDownRatio = 0.9
-SA = 0
-hybrid = 0
-propstdev = tmp.sd
-contSamples = 
-mwsMaxSteps = 1000000
-tries = 1
-targetWt = 0
-breakHardClauses = 0
-heuristic = 2
-tabuLength = 10
-lazyLowState = 0
-burnMinSteps = 100
-burnMaxSteps = 100
-minSteps = -1
-maxSteps = 1000
-maxSeconds = -1
-subInterval = 2
-numRuns = 3
-numSwap = 10
-lifted = 0
-useHC = 0
-useCT = 0
-convThresh = 0.0001
-convIterations = 20
-explicitRep = 0
-hcCreateType = 0
-hcCreateNoise = 0
-lncIter = 0
-noHC = 
-numSolutions = 10
-saRatio = 50
-saTemperature = 80
-lateSa = 1
-numChains = 10
-delta = 0.05
-epsilonError = 0.01
-fracConverged = 0.95
-walksatType = 1
-testConvergence = 0
-samplesPerTest = 100
-e = empty.db
-r = uniform.result
-q = Heads
-f = 
----------------- end of parameters ----------------
Reading formulas and evidence predicates...
uniform.mln10843_tmpalchemy.mln
Adding clauses to MLN...
converting to CNF:
Segmentation fault (core dumped)

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by lucio.to...@gmail.com on 30 Jan 2013 at 3:57

GoogleCodeExporter commented 8 years ago
Right, I have this same problem, too. It happens both on fedora 15 & debian 
wheezy when using 'infer' in alchemy-2. But when I run 'liftedinfer' there is 
no problem anymore.

Original comment by Dai.WZ...@gmail.com on 12 Mar 2013 at 7:24

GoogleCodeExporter commented 8 years ago
Same here. Here is valgrind output: 

:~/alchemy/alchemy-2/bin$ valgrind ./infer -i base.mln -r 
uniform.result -e empty.db -q Heads

==8431==    at 0x8073311: Clause::getPredicate(int const&) const (clause.h:301)
==8431==    by 0x819AB45: buildInference(Inference*&, Domain*&, bool const&, 
Array<Predicate*>&, Array<TruthValue>&) (infer.h:1257)
==8431==    by 0x819CAD8: main (infer.cpp:620)
==8431==  Address 0x8 is not stack'd, malloc'd or (recently) free'd
==8431== Process terminating with default action of signal 11 (SIGSEGV)
==8431==  Access not within mapped region at address 0x8
==8431==    at 0x8073311: Clause::getPredicate(int const&) const (clause.h:301)
==8431==    by 0x819AB45: buildInference(Inference*&, Domain*&, bool const&, 
Array<Predicate*>&, Array<TruthValue>&) (infer.h:1257)
==8431==    by 0x819CAD8: main (infer.cpp:620)
==8431==  If you believe this happened as a result of a stack
==8431==  overflow in your program's main thread (unlikely but
==8431==  possible), you can try to increase the size of the
==8431==  main thread stack using the --main-stacksize= flag.
==8431==  The main thread stack size used in this run was 8388608.
==8431== 
==8431== HEAP SUMMARY:
==8431==     in use at exit: 79,569 bytes in 509 blocks
==8431==   total heap usage: 1,017 allocs, 508 frees, 116,164 bytes allocated
==8431== 
==8431== LEAK SUMMARY:
==8431==    definitely lost: 0 bytes in 0 blocks
==8431==    indirectly lost: 0 bytes in 0 blocks
==8431==      possibly lost: 13,251 bytes in 48 blocks
==8431==    still reachable: 66,318 bytes in 461 blocks
==8431==         suppressed: 0 bytes in 0 blocks
==8431== Rerun with --leak-check=full to see details of leaked memory
==8431== 
==8431== For counts of detected and suppressed errors, rerun with: -v
==8431== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)

So the problem occurs at line 301 of clause.h file. (the predicate[idx] is 
invalid read)

Original comment by evgenii....@gmail.com on 20 Aug 2013 at 8:36

GoogleCodeExporter commented 8 years ago
Same problem here

Original comment by Rein...@gmail.com on 15 Sep 2014 at 7:36

GoogleCodeExporter commented 8 years ago
Does anyone know how to solve this problem?

Original comment by xu.nick1...@gmail.com on 10 Oct 2014 at 1:10