Opened 8 years ago

Closed 8 years ago

#12687 closed defect (fixed)

Fix Singular doctest error on OpenSolaris

Reported by: jdemeyer Owned by: was
Priority: blocker Milestone: sage-5.0
Component: interfaces Keywords:
Cc: SimonKing Merged in: sage-5.0.beta11
Authors: Jeroen Demeyer Reviewers: Simon King
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

The following is caused by #10296. On hawk (OpenSolaris? 06.2009-32):

sage -t  --long -force_lib devel/sage/sage/interfaces/expect.py
**********************************************************************
File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/devel/sage-main/sage/interfaces/expect.py", line 717:
    sage: singular._eval_line_using_file('def a=3;', restart_if_needed=False)
Expected:
    Traceback (most recent call last):
    ...
    RuntimeError: Singular terminated unexpectedly while reading in a large line
Got:
    Traceback (most recent call last):
      File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_15[8]>", line 1, in <module>
        singular._eval_line_using_file('def a=3;', restart_if_needed=False)###line 717:
    sage: singular._eval_line_using_file('def a=3;', restart_if_needed=False)
      File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/local/lib/python/site-packages/sage/interfaces/expect.py", line 768, in _eval_line_using_file
        raise RuntimeError, '%s terminated unexpectedly while reading in a large line:\n%s'%(self,msg[0])
    RuntimeError: Singular terminated unexpectedly while reading in a large line:
    [Errno 22] Invalid argument
    Error evaluating < "/tmp/dot_so48.icq/temp/hawk/8451//interface//tmp8749"; in Singular
**********************************************************************
File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/devel/sage-main/sage/interfaces/expect.py", line 839:
    sage: singular._eval_line_using_file('def a=3;', restart_if_needed=False)
Expected:
    Traceback (most recent call last):
    ...
    RuntimeError: Singular terminated unexpectedly while reading in a large line
Got:
    Traceback (most recent call last):
      File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_16[14]>", line 1, in <module>
        singular._eval_line_using_file('def a=3;', restart_if_needed=False)###line 839:
    sage: singular._eval_line_using_file('def a=3;', restart_if_needed=False)
      File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/local/lib/python/site-packages/sage/interfaces/expect.py", line 768, in _eval_line_using_file
        raise RuntimeError, '%s terminated unexpectedly while reading in a large line:\n%s'%(self,msg[0])
    RuntimeError: Singular terminated unexpectedly while reading in a large line:
    [Errno 22] Invalid argument
    Error evaluating < "/tmp/dot_so48.icq/temp/hawk/8451//interface//tmp8806"; in Singular
**********************************************************************

Attachments (1)

12687_singular_opensolaris.patch (1.8 KB) - added by jdemeyer 8 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 follow-up: Changed 8 years ago by SimonKing

Can you remind me how I can access the skynet machines? t2 seems to be unavailable.

And what is needed to do in order to build Sage on OpenSolaris? IIRC, one needs to set some environment variables.

comment:2 in reply to: ↑ 1 ; follow-ups: Changed 8 years ago by was

Replying to SimonKing:

Can you remind me how I can access the skynet machines? t2 seems to be unavailable.

We turned t2 off again because the UPS's in the math server room were dying after the power outage, and t2 draws quite a lot of power. They are still not happy. We probably won't be able to turn t2 on until we buy new UPS's. The sysadmins are working with a company (APS) to get an estimate done.

To connect to skynet, connect to sage.math or boxen.math then ssh to skynet, e.g.,

   ssh skynet

And what is needed to do in order to build Sage on OpenSolaris? IIRC, one needs to set some environment variables.

I don't think we have any OpenSolaris? installs anywhere right now. ?

comment:3 in reply to: ↑ 2 ; follow-up: Changed 8 years ago by SimonKing

Replying to was:

To connect to skynet, connect to sage.math or boxen.math then ssh to skynet, e.g.,

   ssh skynet

Thank you!

I don't think we have any OpenSolaris? installs anywhere right now. ?

Then how can it be claimed that #10296 results in a doctest error on OpenSolaris??

comment:4 in reply to: ↑ 3 Changed 8 years ago by was

Replying to SimonKing:

I don't think we have any OpenSolaris? installs anywhere right now. ?

Then how can it be claimed that #10296 results in a doctest error on OpenSolaris??

Sorry, by "we" I meant "I". The machine "hawk" is in David Kirkby's house, I think. It has nothing to do with skynet or the sage.math cluster.

comment:5 in reply to: ↑ 2 Changed 8 years ago by SimonKing

Replying to was:

To connect to skynet, connect to sage.math or boxen.math then ssh to skynet, e.g.,

   ssh skynet

Too bad. I do have a skynet account (I have already built sage on some of the skynet machines), but apparently I can not recall my login data.

I am quite puzzled about that error. It seems to me that the patch does work, even on Solaris. Note that in the failing doc test, it is expected that a RuntimeError be raised with the error message Singular terminated unexpectedly while reading in a large line, and in fact it is raised.

However, on OpenSolaris, but apparently not on other machines, it seems that the underlying error in Singular is displayed as well. Any idea why?

comment:6 follow-up: Changed 8 years ago by jdemeyer

Well, #10296 has several code paths to raise the exception. In some cases, the singular error message is added, in other cases not. I don't think this is a big deal. I would be happy to solve this using "..."

comment:7 in reply to: ↑ 6 ; follow-up: Changed 8 years ago by SimonKing

Replying to jdemeyer:

Well, #10296 has several code paths to raise the exception. In some cases, the singular error message is added, in other cases not. I don't think this is a big deal. I would be happy to solve this using "..."

You mean these lines?

sage/interfaces/expect.py

diff --git a/sage/interfaces/expect.py b/sage/interfaces/expect.py

        735                 elif restart_if_needed==True: # the subprocess might have crashed 
        736                     try: 
        737                         self._synchronize() 
        738                         return self._post_process_from_file(self._eval_line_using_file(line, restart_if_needed=False)) 
        739                     except RuntimeError, msg: 
        740                         raise RuntimeError, '%s terminated unexpectedly while reading in a large line:\n%s'%(self,msg[0]) 
        741                     except TypeError: 
        742                         pass 
659     743                 raise RuntimeError, '%s terminated unexpectedly while reading in a large line'%self 

That would mean: On some machines Singular raises a RuntimeError, while in the same setting on OpenSolaris it is raising a TypeError. Odd.

comment:8 in reply to: ↑ 7 Changed 8 years ago by SimonKing

Replying to SimonKing:

That would mean: On some machines Singular raises a RuntimeError, while in the same setting on OpenSolaris it is raising a TypeError. Odd.

The other way around, I mean.

Changed 8 years ago by jdemeyer

comment:9 Changed 8 years ago by jdemeyer

  • Authors set to Jeroen Demeyer
  • Status changed from new to needs_review

comment:10 follow-up: Changed 8 years ago by SimonKing

I can not test on openSolaris. But just for the record: The patch looks ok to me, as we have seen that the only difference was what kind of error Singular raises.

comment:11 in reply to: ↑ 10 ; follow-up: Changed 8 years ago by jdemeyer

  • Reviewers set to Simon King
  • Status changed from needs_review to positive_review

Replying to SimonKing:

The patch looks ok to me, as we have seen that the only difference was what kind of error Singular raises.

So, positive_review then?

comment:12 in reply to: ↑ 11 Changed 8 years ago by SimonKing

Replying to jdemeyer:

Replying to SimonKing:

The patch looks ok to me, as we have seen that the only difference was what kind of error Singular raises.

So, positive_review then?

Well, I can not test on openSolaris. From that perspective, I am not entitled to review it. I can only say that it looks ok. If the build bot does not complain, it is a positive review.

comment:13 Changed 8 years ago by jdemeyer

  • Merged in set to sage-5.0.beta11
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.