<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi,</p>
    <p>I think I finally found a solution for this segfault. In short:
      run "<span class="blob-code-inner blob-code-marker-addition"><span
          class="pl-s">export THREADS_DAEMON_MODEL=1" before running
          maker.</span></span></p>
    <p><span class="blob-code-inner blob-code-marker-addition"><span
          class="pl-s">After looking at the debug log, I noticed that
          the segfault happened the first time the perl system()
          function was called (usually to launch a "mv" command).</span></span></p>
    <p><span class="blob-code-inner blob-code-marker-addition"><span
          class="pl-s">This + the backtrace shows that it has something
          to do with signal handling when running child process from
          threads.</span></span></p>
    <p><span class="blob-code-inner blob-code-marker-addition"><span
          class="pl-s">After a lot of trials and errors modifying the
          code, I found this page talking about this env var:
<a class="moz-txt-link-freetext" href="https://metacpan.org/pod/forks#Co-existance-with-fork-aware-modules-and-environments">https://metacpan.org/pod/forks#Co-existance-with-fork-aware-modules-and-environments</a><br>
        </span></span></p>
    <p><span class="blob-code-inner blob-code-marker-addition"><span
          class="pl-s">It seems to be enough to avoid the segfault. I
          have no idea if it could have any downside, but maker seems to
          give the same results as in non-mpi mode.<br>
        </span></span></p>
    <p><span class="blob-code-inner blob-code-marker-addition"><span
          class="pl-s"><br>
        </span></span></p>
    <p><span class="blob-code-inner blob-code-marker-addition"><span
          class="pl-s">Concerning </span></span><span
        class="blob-code-inner blob-code-marker-addition"><span
          class="pl-s">RepeatMasker not being installed correctly, it
          seems to be intended as written in the </span></span><span
        class="blob-code-inner blob-code-marker-addition"><span
          class="pl-s"><span class="blob-code-inner
            blob-code-marker-addition"><span class="pl-s">RepeatMasker</span></span>
          conda recipe:
<a class="moz-txt-link-freetext" href="https://github.com/bioconda/bioconda-recipes/blob/master/recipes/repeatmasker/build.sh#L16">https://github.com/bioconda/bioconda-recipes/blob/master/recipes/repeatmasker/build.sh#L16</a><br>
        </span></span></p>
    <p><span class="blob-code-inner blob-code-marker-addition"><span
          class="pl-s">I use the </span></span><span
        class="blob-code-inner blob-code-marker-addition"><span
          class="pl-s"><span class="pl-c">REPEATMASKER_LIB_DIR env var
            so it's not really a problem for me, and the galaxy tools is
            doing the same
(<a class="moz-txt-link-freetext" href="https://github.com/galaxyproject/tools-iuc/blob/master/tools/maker/maker.xml#L11">https://github.com/galaxyproject/tools-iuc/blob/master/tools/maker/maker.xml#L11</a>).</span></span></span></p>
    <p><span class="blob-code-inner blob-code-marker-addition"><span
          class="pl-s"><span class="pl-c"></span>I'm not a RepeatMasker
          expert, so I don't know if providing the old database would
          make more sense...</span></span></p>
    <p><span class="blob-code-inner blob-code-marker-addition"><span
          class="pl-s">I guess it's the same question for te_proteins.</span></span></p>
    <p><span class="blob-code-inner blob-code-marker-addition"><span
          class="pl-s"><br>
        </span></span></p>
    <p><span class="blob-code-inner blob-code-marker-addition"><span
          class="pl-s">Cheers</span></span></p>
    <p><span class="blob-code-inner blob-code-marker-addition"><span
          class="pl-s">Anthony<br>
        </span></span></p>
    <p><span class="blob-code-inner blob-code-marker-addition"><span
          class="pl-s"><br>
        </span></span></p>
    <p><span class="blob-code-inner blob-code-marker-addition"><span
          class="pl-s"><br>
        </span></span></p>
    <div class="moz-cite-prefix">Le 05/10/2018 à 22:37, Carson Holt a
      écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:8D151E3B-353F-4FD5-94DB-95C1125A8176@gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      I tried setting this up but there are a number of issues I run
      into.
      <div class=""><br class="">
      </div>
      <div class="">First RepeatMasker is not being installed correctly.
        The configuration step should create these files (created by
        ./configure script during RepeatMasker setup) —></div>
      <div class="">
        <div class="">RepeatMasker.lib</div>
        <div class="">RepeatMasker.lib.nhr</div>
        <div class="">RepeatMasker.lib.nin</div>
        <div class="">RepeatMasker.lib.nsq</div>
        <div class="">RepeatMaskerLib.embl</div>
      </div>
      <div class=""><br class="">
      </div>
      <div class="">But they do not exist in the share directory.</div>
      <div class=""><br class="">
      </div>
      <div class="">Also MAKER needs access to the te_proteins file in
        …/maker/data, and because you have rearranged maker’s structure
        it can’t find it.</div>
      <div class=""><br class="">
      </div>
      <div class=""><br class="">
      </div>
      <div class="">Then for the Segmentation fault, I have seen this a
        handful of times in the past where users install their own
        version of perl rather than using the system perl together with
        their own install of OpenMPI. The issue is some series of flags
        either in OpenMPi or perl (I’m not sure which). But one way
        around it is to disable the interpreter threads option when
        compiling and installing perl for yourself. Most system perl
        installs have interpreter threads enabled, so I’m not sure why
        some self-installs generate this segfault and never the system
        perl. Interestingly interpreter threads are turned off by
        default when you install perl manually as they are
        “officially discouraged". You actually have to enable it during
        the self-install process, and conda is enabling them on the
        manual install to match most system perls.</div>
      <div class=""><br class="">
      </div>
      <div class="">Another work around is don’t use OpenMPI. Try
        MPICH3.</div>
      <div class=""><br class="">
      </div>
      <div class=""><br class="">
      </div>
      <div class="">—Carson</div>
      <div class=""><br class="">
      </div>
      <div class=""><br class="">
      </div>
      <div class=""><br class="">
      </div>
      <div class=""><br class="">
      </div>
      <div class="">
        <div><br class="">
          <blockquote type="cite" class="">
            <div class="">On Sep 25, 2018, at 6:10 AM, Anthony
              Bretaudeau <<a
                href="mailto:anthony.bretaudeau@inria.fr" class=""
                moz-do-not-send="true">anthony.bretaudeau@inria.fr</a>>
              wrote:</div>
            <br class="Apple-interchange-newline">
            <div class="">
              <meta http-equiv="content-type" content="text/html;
                charset=UTF-8" class="">
              <div bgcolor="#FFFFFF" text="#000000" class="">
                <p class="">Hi,</p>
                <p class="">I've worked on the Bioconda recipe for Maker
                  (<a class="moz-txt-link-freetext"
href="https://github.com/bioconda/bioconda-recipes/tree/master/recipes/maker/"
                    moz-do-not-send="true">https://github.com/bioconda/bioconda-recipes/tree/master/recipes/maker/</a>).
                  It works well, except when using it in MPI mode. I get
                  this segfault error:</p>
                <pre class="">STATUS: Processing and indexing input FASTA files...
[cl1n022:06306] *** Process received signal ***
[cl1n022:06306] Signal: Segmentation fault (11)
[cl1n022:06306] Signal code: Address not mapped (1)
[cl1n022:06306] Failing at address: 0x514
[cl1n022:06306] [ 0] /lib64/libpthread.so.0(+0xf6d0)[0x2b9ce51026d0]
[cl1n022:06306] [ 1] /local/miniconda3/envs/maker-2.31.10/bin/perl(Perl_csighandler+0x1e)[0x4aad4e]
[cl1n022:06306] [ 2] /lib64/libpthread.so.0(+0xf6d0)[0x2b9ce51026d0]
[cl1n022:06306] [ 3] /lib64/libc.so.6(__poll+0x2d)[0x2b9ce5f5cf0d]
[cl1n022:06306] [ 4] /local/miniconda3/envs/maker-2.31.10/perl/lib/auto/Parallel/Application/MPI/../../../../../../lib/./libopen-pal.so.40(+0x869e5)[0x2b9cf05859e5]
[cl1n022:06306] [ 5] /local/miniconda3/envs/maker-2.31.10/perl/lib/auto/Parallel/Application/MPI/../../../../../../lib/./libopen-pal.so.40(opal_libevent2022_event_base_loop+0x242)[0x2b9cf057a73a]
[cl1n022:06306] [ 6] /local/miniconda3/envs/maker-2.31.10/perl/lib/auto/Parallel/Application/MPI/../../../../../../lib/./libopen-pal.so.40(+0x384de)[0x2b9cf05374de]
[cl1n022:06306] [ 7] /lib64/libpthread.so.0(+0x7e25)[0x2b9ce50fae25]
[cl1n022:06306] [ 8] /lib64/libc.so.6(clone+0x6d)[0x2b9ce5f67bad]
[cl1n022:06306] *** End of error message ***
SIGTERM received
SIGTERM received
</pre>
                <p class=""><br class="">
                </p>
                <p class="">As mentioned in older posts, I've tried
                  adding the LD_PRELOAD variable, or running mpirun with
                  the "-mca btl ^openib" option, but it didn't help.</p>
                <p class="">As this happens with the Bioconda package, I
                  guess it should be pretty reproducible on other
                  setups.</p>
                <p class="">Bioconda's Maker package uses version 5.26.2
                  of Perl and version 3.1.2 of OpenMPI, and the OpenMPI
                  recipe is on <a class="moz-txt-link-freetext"
href="https://github.com/conda-forge/openmpi-feedstock/tree/master/recipe"
                    moz-do-not-send="true">https://github.com/conda-forge/openmpi-feedstock/tree/master/recipe</a></p>
                <p class="">Any help would be highly appreciated!</p>
                <p class="">Anthony Bretaudeau<br class="">
                </p>
              </div>
              _______________________________________________<br
                class="">
              maker-devel mailing list<br class="">
              <a href="mailto:maker-devel@box290.bluehost.com" class=""
                moz-do-not-send="true">maker-devel@box290.bluehost.com</a><br
                class="">
<a class="moz-txt-link-freetext" href="http://box290.bluehost.com/mailman/listinfo/maker-devel_yandell-lab.org">http://box290.bluehost.com/mailman/listinfo/maker-devel_yandell-lab.org</a><br
                class="">
            </div>
          </blockquote>
        </div>
        <br class="">
      </div>
    </blockquote>
  </body>
</html>