STACK/Maxima errors after upgrade

STACK/Maxima errors after upgrade

by Tom Smith -
Number of replies: 11

Hi all

Before the summer holidays, we upgraded our moodle to 3.9 and we also updated to Ubuntu 20.04, with the most recent packages as of July 17 2020.

I noticed several students getting problems of STACK questions not working for their summer homework. Today, on running the healthcheck scripts, I got some errors. I updated plugin to the latest STACK version, and still the same errors. Any pointers would be appreciated:


1. In STACK plugin settings, the highest Maxima version I can set is 5.42.2 but I have Maxima 5.43.2

Health check script output:

Unpacked result as

Array
(
    [0] => Array
        (
            [key] => CASresult
            [value] => n*x^(n-1)
            [dispvalue] => n*x^(n-1)
            [display] => stack_disp(n*x^(n-1),"")
            [error] => 
        )

    [1] => Array
        (
            [key] => STACKversion
            [value] => stackmaximaversion
            [dispvalue] => stackmaximaversion
            [display] => stack_disp(stackmaximaversion,"")
            [error] => 
        )

    [2] => Array
        (
            [key] => MAXIMAversion
            [value] => "5.43.2"
            [dispvalue] => "5.43.2"
            [display] => stack_disp("5.43.2","")
            [error] => 
        )

    [3] => Array
        (
            [key] => MAXIMAversionnum
            [value] => 43.2
            [dispvalue] => 43.2
            [display] => stack_disp(43.2,"")
            [error] => 
        )

    [4] => Array
        (
            [error] => There is no settable external format.
            [key] => externalformat
            [value] => false
            [dispvalue] => false
            [display] => stack_disp(false,"")
        )

    [5] => Array
        (
            [key] => CAStime
            [value] => "2020-09-01 13:07:53"
            [dispvalue] => Unrecoverable error: Segmentation violation..timeout: the monitored command dumped coreAborted
            [error] => 
        )

)

Errors

CASText failed validation. (%i2) length: argument cannot be a symbol; found %ERR -- an error. (%i3)

Debug info

(%i2) length: argument cannot be a symbol; found %ERR -- an error. (%i3)

Average of ratings: Useful (1)
In reply to Tom Smith

Re: STACK/Maxima errors after upgrade

by Thorsten Bartel -
Picture of Core developers

1. In STACK plugin settings, the highest Maxima version I can set is 5.42.2 but I have Maxima 5.43.2

This might sound condescending, but rest assured it is not:
Why don't you simply install an older version of Maxima with a version number that is supported by STACK?

In reply to Thorsten Bartel

Re: STACK/Maxima errors after upgrade

by Tom Smith -
Hmm, I suppose that is possible. The server is running Ubuntu 20.04 and uses the APT repositories to get its software... I shall research if it is possible to downgrade a package to an older version...
In reply to Tom Smith

Re: STACK/Maxima errors after upgrade

by Madhu Avasarala -
I am on Moodle 3.10 with latest STACK and Ubuntu 20 LTS and I am also seeing some problems. In my case connection to CAS fails with error 'unable to find shared library libreadline.so.7. When I installed the R package for Ubuntu focal it uses libreadline.so.8. I too have 5.43 version of Maxima that came with Focal. Did you find a solution by downgrading to 5.42? Thanks
Average of ratings: Useful (1)
In reply to Madhu Avasarala

Re: STACK/Maxima errors after upgrade

by Tom Smith -
I looked a little at how to 'downgrade' the Maxima package but decided with it being a production server I didn't want to mess around too much with packages lest I end up breaking APT and having major issues, so I didn't downgrade and the problem still persists...
Average of ratings: Useful (1)
In reply to Tom Smith

Re: STACK/Maxima errors after upgrade

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
In the past I have built maxima packages for various package managers, but I would recommend actually compiling maxima from source on a production server if you want to use a specific maxima version. Download the desired maxima source code from https://sourceforge.net/projects/maxima/files/Maxima-source/ and extract it. Follow the generic install instructions. Use package manager to install any missing requirements. You may have options to choose from several lisp implementations. The binary should be installed in /usr/local/bin/maxima which will not interfere with the package manager which installs to /usr/bin.
In reply to Madhu Avasarala

Re: STACK/Maxima errors after upgrade

by Christopher Sangwin -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Ok, sorry about this. It looks like a problem with the version of Maxima you have on your system.
The current Travis is using 5.41.0 (e.g. line 513 of https://travis-ci.org/github/maths/moodle-qtype_stack/jobs/743905785) but I'm determined to support all the newer versions of Maxima.

I've installed Maxima 5.43.2, and while I've not run all the unit tests it certainly doesn't seem to be the issue here. I'm using Debian, so this may be a specific problem with Maxima on Ubuntu. I've also installed Maxima 5.44.0, and I'll make sure we support future versions of Maxima.
In reply to Christopher Sangwin

Re: STACK/Maxima errors after upgrade

by Madhu Avasarala -
Dr. Sangwin, you don't have to be sorry smile you are ever on the side of helping people out and I for one am grateful for your support. It looks like the libreadline.so.7 is needed and 20.04LTS installs libreadline.so.8, and the only way around is to have that installed and available. I am going to see how to it without breaking the packages.
In reply to Madhu Avasarala

Re: STACK/Maxima errors after upgrade

by Christopher Sangwin -
Picture of Particularly helpful Moodlers Picture of Plugin developers
I've been looking into this, i.e. I've installed Maxima 5.43.2, and 5.44.0, then run all the unit tests. There is a subtle change in the behaviour which was causing a significant loss of performance. This is not something you'd notice running Maxima on the desktop, but it was killing the interconnection with STACK. This has taken me a lot longer to sort out than I expected, so thank you for the advanced warning there might be a problem. Much appreciated!

I normally try to be proactive in keeping up with Maxima versions but the last couple of months have been rather busy getting questions working and helping colleagues. I'm fairly sure I've solved the problem, and maxima up to 5.44.0 will be supported in the next release. I'm trying to get this done in time to upgrade our own severs for semester 2, i.e. Jan 2021.

Chris
Average of ratings: Useful (1)
In reply to Christopher Sangwin

Re: STACK/Maxima errors after upgrade

by Madhu Avasarala -
Dear Dr. Sangwin, Regarding the issue I posted above, I solved the problem by installing libreadline-dev and sudo ln -s libreadline.so.8.o libreadline.so.7. Now CAS talks but the issue is the mismatched version (4.32 I have by default in 20.04 Ubuntu) vs the max I can go in STACK being 5.42. So if 5.43. were to be an option in the dropdown I should probably solve my problem of creating the Maxima Image. However, I am unsure about the performance issues you speak of. Any update on this?
In reply to Madhu Avasarala

Re: STACK/Maxima errors after upgrade

by Madhu Avasarala -
I also tried to install a different version of Maxima (5.42.2) in 2 different ways on my Ubuntu 20.04 install: 1) Source code and make, This went almost to the end and quit with an error that is too obtuse for me and 2) Using .deb packages. Even with 5.42.2 installed this way, I get an error from CAS stating that LISP version could not be detected and image cannot be created. So it seems that the only way is to work with the default 5.43 and somehow get it to work.