sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.41k stars 475 forks source link

Unable to start pari because the command 'gp --emacs --fast --quiet --stacksize 10000000' failed #9866

Open e14f4152-4982-4ace-8c95-73a0599b109b opened 14 years ago

e14f4152-4982-4ace-8c95-73a0599b109b commented 14 years ago

Minh Nguyen gets this error on a GCC compile farm Debian 5.0 machine (gcc100.fsffrance.org, AMD Opteron(tm) Processor 252 @ 2647.708 MHz) with a trial "final" 4.5.3 (essentially the same as 4.5.3.rc0):

sage -t  -long "devel/sage/sage/schemes/elliptic_curves/heegner.py"
Exception RuntimeError: RuntimeError("Unable to start pari because the command 'gp --emacs --fast --quiet --stacksize 10000000' failed.\n",) in <bound method Dokchitser.__del__ of Dokchitser L-series of conduct
or 389 and weight 2> ignored
**********************************************************************
File "/home/mvngu/sage-4.5.3/devel/sage/sage/schemes/elliptic_curves/heegner.py", line 6831:
    sage: E.heegner_sha_an(-7)                                  # long
Exception raised:
    Traceback (most recent call last):
      File "/home/mvngu/sage-4.5.3/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/home/mvngu/sage-4.5.3/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/home/mvngu/sage-4.5.3/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_234[12]>", line 1, in <module>
        E.heegner_sha_an(-Integer(7))                                  # long###line 6831:
    sage: E.heegner_sha_an(-7)                                  # long
      File "/home/mvngu/sage-4.5.3/local/lib/python/site-packages/sage/schemes/elliptic_curves/heegner.py", line 6878, in heegner_sha_an
        L_E = E.lseries().dokchitser(prec).derivative(1, rE)
      File "/home/mvngu/sage-4.5.3/local/lib/python/site-packages/sage/schemes/elliptic_curves/lseries_ell.py", line 135, in dokchitser
        gp = L.gp()
      File "/home/mvngu/sage-4.5.3/local/lib/python/site-packages/sage/lfunctions/dokchitser.py", line 226, in gp
        g.read('computel.gp')
      File "/home/mvngu/sage-4.5.3/local/lib/python/site-packages/sage/interfaces/expect.py", line 607, in read
        self.eval(self._read_in_file_command(filename))
      File "/home/mvngu/sage-4.5.3/local/lib/python/site-packages/sage/interfaces/expect.py", line 983, in eval
        return '\n'.join([self._eval_line(L, **kwds) for L in code.split('\n') if L != ''])
      File "/home/mvngu/sage-4.5.3/local/lib/python/site-packages/sage/interfaces/gp.py", line 315, in _eval_line
        wait_for_prompt=wait_for_prompt)
      File "/home/mvngu/sage-4.5.3/local/lib/python/site-packages/sage/interfaces/expect.py", line 637, in _eval_line
        self._start()
      File "/home/mvngu/sage-4.5.3/local/lib/python/site-packages/sage/interfaces/expect.py", line 458, in _start
        self.__name, cmd, self._install_hints())
    RuntimeError: Unable to start pari because the command 'gp --emacs --fast --quiet --stacksize 10000000' failed.

**********************************************************************
File "/home/mvngu/sage-4.5.3/devel/sage/sage/schemes/elliptic_curves/heegner.py", line 6839:
    sage: E.heegner_sha_an(-56)                                 # long
Exception raised:
    Traceback (most recent call last):
      File "/home/mvngu/sage-4.5.3/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/home/mvngu/sage-4.5.3/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/home/mvngu/sage-4.5.3/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_234[14]>", line 1, in <module>
        E.heegner_sha_an(-Integer(56))                                 # long###line 6839:
    sage: E.heegner_sha_an(-56)                                 # long
      File "/home/mvngu/sage-4.5.3/local/lib/python/site-packages/sage/schemes/elliptic_curves/heegner.py", line 6878, in heegner_sha_an
        L_E = E.lseries().dokchitser(prec).derivative(1, rE)
      File "/home/mvngu/sage-4.5.3/local/lib/python/site-packages/sage/schemes/elliptic_curves/lseries_ell.py", line 135, in dokchitser
        gp = L.gp()
      File "/home/mvngu/sage-4.5.3/local/lib/python/site-packages/sage/lfunctions/dokchitser.py", line 226, in gp
        g.read('computel.gp')
      File "/home/mvngu/sage-4.5.3/local/lib/python/site-packages/sage/interfaces/expect.py", line 607, in read
        self.eval(self._read_in_file_command(filename))
      File "/home/mvngu/sage-4.5.3/local/lib/python/site-packages/sage/interfaces/expect.py", line 983, in eval
        return '\n'.join([self._eval_line(L, **kwds) for L in code.split('\n') if L != ''])
      File "/home/mvngu/sage-4.5.3/local/lib/python/site-packages/sage/interfaces/gp.py", line 315, in _eval_line
        wait_for_prompt=wait_for_prompt)
      File "/home/mvngu/sage-4.5.3/local/lib/python/site-packages/sage/interfaces/expect.py", line 637, in _eval_line
        self._start()
      File "/home/mvngu/sage-4.5.3/local/lib/python/site-packages/sage/interfaces/expect.py", line 458, in _start
        self.__name, cmd, self._install_hints())
    RuntimeError: Unable to start pari because the command 'gp --emacs --fast --quiet --stacksize 10000000' failed.

**********************************************************************
1 items had failures:
   2 of  18 in __main__.example_234
***Test Failed*** 2 failures.
Exception RuntimeError: RuntimeError('Unable to start pari',) in <bound method Dokchitser.__del__ of Dokchitser L-series of conductor 65 and weight 2> ignored
For whitespace errors, see the file /tmp/mvngu/dot_sage//tmp/.doctest_heegner.py
         [143.5 s]

Here is the test log.

Here is the only mention I found of a similar message on sage-devel.

CC: @sagetrac-mvngu

Component: interfaces

Issue created by migration from https://trac.sagemath.org/ticket/9866

jdemeyer commented 14 years ago
comment:1

Is this error reproducible, does it happen every time? What happens if you run sage -gp on that machine?

jdemeyer commented 13 years ago

Reviewer: Jeroen Demeyer

jdemeyer commented 13 years ago
comment:5

Nobody seems to care very much, so I'm closing this as invalid.

bac7d3ea-3f1b-4826-8464-f0b53d5e12d2 commented 13 years ago
comment:6

I have had this result in a doctest failure onOpenSolaris on more than one occasion. But it's not every reproducible. The test fails, then passes when rerun.

Sorry I did not comment earlier.

Dave

jdemeyer commented 13 years ago
comment:7

One "solution" to track down further this problem is to change the exception handling code in sage/interfaces/expect.py. This is the relevant code:

        try:
            if self.__remote_cleaner and self._server:
                c = 'sage-native-execute  ssh %s "nohup sage -cleaner"  &'%self._server
                os.system(c)
            self._expect = pexpect.spawn(cmd, logfile=self.__logfile)
            if self._do_cleaner():
                cleaner.cleaner(self._expect.pid, cmd)

        except (ExceptionPexpect, pexpect.EOF, IndexError):
            self._expect = None
            self._session_number = BAD_SESSION
            failed_to_start.append(self.__name)
            raise RuntimeError, "Unable to start %s because the command '%s' failed.\n%s"%(
                self.__name, cmd, self._install_hints())

The problem is that we probably lose information by catching the exception and re-raising a different exception. We only know that gp failed, but not for which reason. I'm guessing something OS-related like not enough memory, but we don't know for sure.

bac7d3ea-3f1b-4826-8464-f0b53d5e12d2 commented 13 years ago
comment:8

Replying to @jdemeyer:

One "solution" to track down further this problem is to change the exception handling code in sage/interfaces/expect.py. This is the relevant code:

        try:
            if self.__remote_cleaner and self._server:
                c = 'sage-native-execute  ssh %s "nohup sage -cleaner"  &'%self._server
                os.system(c)
            self._expect = pexpect.spawn(cmd, logfile=self.__logfile)
            if self._do_cleaner():
                cleaner.cleaner(self._expect.pid, cmd)

        except (ExceptionPexpect, pexpect.EOF, IndexError):
            self._expect = None
            self._session_number = BAD_SESSION
            failed_to_start.append(self.__name)
            raise RuntimeError, "Unable to start %s because the command '%s' failed.\n%s"%(
                self.__name, cmd, self._install_hints())

The problem is that we probably lose information by catching the exception and re-raising a different exception. We only know that gp failed, but not for which reason. I'm guessing something OS-related like not enough memory, but we don't know for sure.

I doubt it's a lack of memory. My machine has 12 GB RAM and I suspect 50-100 GB or so of swap. That said, others do use the machine, but I usually do check logs when I get doctest failures - that's why I wish the date+time of the doctests were recorded.

I know it's not normal to reopen tickets, but since this one was closed only a few hours ago, with no releases of Sage since, would it be sensible to reopen this? The problem does still exist and on more than one platform

Dave

jdemeyer commented 13 years ago

Changed reviewer from Jeroen Demeyer to none