[SRU] maxima frontends fail to connect

Bug #43150 reported by Nicholas Wheeler
112
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcl (Ubuntu)
Dapper
Fix Released
Undecided
William Grant
maxima (Ubuntu)
Dapper
Fix Released
Undecided
Unassigned
wxmaxima (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

ii maxima 5.9.2-2ubuntu1 A fairly complete computer algebra system--
ii wxmaxima 0.6.4-1ubuntu1 a wxWidgets GUI for the computer algebra sys

Launch wxmaxima, type 1+1;, result:

wxMaxima 0.6.4 http://wxmaxima.sourceforge.net
Maxima restarted.
(%i1) 1+1;
CLIENT: Lost socket connection ...Restart maxima with 'Maxima->Restart maxima'.

Running maxima on the commandline, entering 1+1; works fine with expected results.

Revision history for this message
Nicholas Wheeler (dragoncow2) wrote :

Confirmed by asraniel (#ubuntu+1).

Changed in wxmaxima:
status: Unconfirmed → Confirmed
Revision history for this message
Bruno S. (fischkudder-deactivatedaccount) wrote :

xmaxima is affected by this problem, too.

-> It tells "Exiting on eof" after having typed something.

Revision history for this message
augustojd (augustojd-deactivatedaccount) wrote :

I confirm that both wxmaxima and xmaxima are not able to interact with maxima.

Revision history for this message
augustojd (augustojd-deactivatedaccount) wrote :

Andrej Vodopivec, wxMaxima project admin, recommended to use another Lisp implementation:

http://sourceforge.net/forum/forum.php?thread_id=1494645&forum_id=435775

The cmucl Lisp implementation works in Mac OS X (there was a similar problem with the clisp Lisp implementation in Mac OS X):

http://sourceforge.net/forum/forum.php?thread_id=1491460&forum_id=435775

Revision history for this message
Bruno S. (fischkudder-deactivatedaccount) wrote :

did anyone try to recompile maxima with gcl?

Revision history for this message
augustojd (augustojd-deactivatedaccount) wrote :

I've just recompiled maxima with cmucl (CMU Common Lisp) and wxMaxima runs just fine.

Revision history for this message
AndreaZonca (zonca) wrote :

I've the same problem, is anyone going to fix it?

Revision history for this message
LaserJock (laserjock) wrote :

We're looking into it. As you can imagine we are all quite busy. I'd like to get this fixed for sure but we need to test to make sure switching to cmucl works as expected, etc. If all goes well it should be fixed soon.

Revision history for this message
ilbahr (ilba7r) wrote :

I had the same problem of not being able to connect using xmaima and wxmaxima to maxima 5.9.2.2. I compiled the new version of maxima, maxima-5.9.3-1 using clisp and both xmaxim and wxmaxima works fine now.

This is on an i686 architecture.

Revision history for this message
OOzyPal (oozypal) wrote :

I have the same problem.
Will this problem be fix in the next 2 months?

Revision history for this message
LaserJock (laserjock) wrote :

We tried to use cmucl/clisp to build maxima but gcl is ingrained enough in the package that we couldn't get it built and tested in time for the Dapper release. I think we can get the issue resolved relatively soon and I'd like to see it go into the dapper-updates repo. I'm a little concerned about the underlying problem though. It works fine in Debian unstable and the maxima package really hasn't been changed in dapper. I would rather find out why than just ditch gcl.

Revision history for this message
augustojd (augustojd-deactivatedaccount) wrote :

I've written a Web page with instructions for people that want to use wxMaxima while this bug is not fixed. The workaround is to use a local cmucl-enabled maxima installation.

http://www.lca.ic.unicamp.br/~augusto/maxima-cmucl.shtml

Revision history for this message
Hector Miuler Malpica Gallegos (miuler) wrote :

$ maxima -s 4002
jfa: starting server on port 4002
couldn't open socket:

ii maxima 5.9.2-2ubuntu1

Revision history for this message
Filippo Biondi (fbiondi) wrote :

confirm the issue on Dapper

$ maxima -s 4002
jfa: starting server on port 4002
couldn't open socket:

Revision history for this message
Olaf Leidinger (leidola) wrote :

works fine for me, when i build the maxima package with this patch (adds cmucl support):

--- maxima-5.9.2/debian/control 2006-07-05 16:57:17.000000000 +0200
+++ maxima-5.9.2.patch/debian/control 2006-07-05 16:07:58.000000000 +0200
@@ -2,7 +2,7 @@
 Section: math
 Priority: optional
 Maintainer: Camm Maguire <email address hidden>
-Build-Depends: gcl ( >= 2.6.7-10 ) , texinfo, libgmp3-dev, libreadline5-dev | libreadline-dev, locales, automake, debhelper ( >=4.1.0 ) , libncurses5-dev, autoconf2.13, gawk | awk, tetex-extra, sharutils
+Build-Depends: cmucl ( >= 19a ) , texinfo, libgmp3-dev, libreadline5-dev | libreadline-dev, locales, automake, debhelper ( >=4.1.0 ) , libncurses5-dev, autoconf2.13, gawk | awk, tetex-extra, sharutils
 Standards-Version: 3.6.2

 Package: maxima
--- maxima-5.9.2/debian/rules 2006-07-05 16:57:18.000000000 +0200
+++ maxima-5.9.2.patch/debian/rules 2006-07-05 16:54:38.000000000 +0200
@@ -38,8 +38,7 @@
  dh_testdir

  automake
-
- GCL_ANSI=t ./configure --enable-gcl $$(gcl -batch -eval '#-native-reloc(princ "--enable-gcl-alt-link")(bye)') \
+ GCL_ANSI=t ./configure --enable-cmucl \
   --prefix=/usr \
   --libexec=/usr/lib \
   --mandir=/usr/share/man \
@@ -49,13 +48,13 @@

 # This sets up some reasonable readline command completion by default

- cd src/binary-gcl && echo ':lisp (setq si::*readline-prefix* "maxima::$$")(when (fboundp (quote si::sgc-on)) (si::sgc-on t))(si::save-system "foo")' | ./maxima -eval '(run)' && mv foo maxima
+# cd src/binary-cmucl && echo ':lisp (setq si::*readline-prefix* "maxima::$$")(when (fboundp (quote si::sgc-on)) (si::sgc-on t))(si::save-system "foo")' | ./maxima -eval '(run)' && mv foo maxima

 # Reenable if/when gcl uses __mulsi et. al. on m68k, now configured for (020) unoptimally
 # [ "$$(dpkg --print-architecture)" != "m68k" ] || cp debian/rtest8.mac.m68k tests/rtest8.mac

- ./maxima-local --lisp=gcl --batch-string="run_testsuite(true,true);" >tmp 2>&1 & \
+ ./maxima-local --lisp=cmucl --batch-string="run_testsuite(true,true);" >tmp 2>&1 & \
   j=$$! ; echo Waiting on pid $$j ; \
   tail -f --pid=$$j --retry tests/tests-gcl.log tmp & wait $$j

Revision history for this message
Olaf Leidinger (leidola) wrote :

patches don't look good in this textbox ;-( , so I put it on my webspace:

http://leidola.newcon.de/daten/maxima-cmucl.patch

Revision history for this message
alonso gomez (alonso-raul-g) wrote :

Dapper ppc linux here; I just compiled maxima 5.9.3.99rc1, clisp 2.39 and wxmaxima 0.6.5 just to make sure.

maxima alone does work, clisp do work perfectly but if I start wxmaxima it does loose connection to maxima and displays:

(%i1)
CLIENT: Lost socket connection ...
Restart maxima with 'Maxima->Restart maxima'.

if then I go to console and type 'maxima -s 4010' wxmaxima produces a segmentation fault and both do close.

maxima alone do not have this problem neither clisp.

I think this could have todo with powerpc architecture because 386 arch seems ok compiled with clisp, both maxima and wxmaxima.

Revision history for this message
Marius (felijohn) wrote :

I have the same issue with wxmaxima/xmaxima on an AMD64 machine.

It used to work fine before the first beta (I believe) of Dapper.

Revision history for this message
Mayckol Morales (mayckol) wrote :

Why this bug is not "Assigned To" someone?
Many scientists, engineers and students use (and need ) this packages. But in every machine that Ubuntu is installed maxima, wxmaxima and xmaxima will not work.

Revision history for this message
LaserJock (laserjock) wrote :

It isn't assigned to anybody because nobody has "taken" it. That doesn't mean it isn't being worked on. Most bugs aren't assigned to any particular person. A couple people have had a stab at this one. The problem is figuring out what exactly the root issue is and what the best way to fix it is. The bug doesn't seem to show up in Debian and we haven't really changed the package so I'm not sure yet what's going on. I'll take another look and see if I can come up with something.

Revision history for this message
alex.d (alex336) wrote :

how do I recompile maxima with cmucl - step by step instructions for a linux newbie would be appreciated. Thanks.

Re: wxmaxima fails with error, can't connect to maxima from Augusto Jun Devegili at 2006-05-14 02:15:05 UTC

I've just recompiled maxima with cmucl (CMU Common Lisp) and wxMaxima runs just fine.

Revision history for this message
pyjamashark (pyjamashark) wrote :

hi, I'm with alex.d, I really need maxima for a physics course I'm doing! i've just formatted my windows partition and am a bit stuck for options, plus am a linux newbie! Please please would someone sort this out! or explain in simple terms how to compile it so it works!
thanks
joe

Revision history for this message
Bruno S. (fischkudder-deactivatedaccount) wrote :

There are other options than wxMaxima. A nice and tidy one is Axiom which is available at http://wiki.axiom-developer.org/. BTW if you need to solve integral, look at http://integrals.wolfram.com/.

Revision history for this message
Barry deFreese (bddebian) wrote :

Hi folks. I'm trying to look at this, though I am certainly no Uber hacker. I have rebuilt maxima/wxmaxima with non-stripped binaries. What is very strange to me is that attaching gdb to Maxima stops the problem from happening. I do know that the error is coming from src/wxMaxima.cpp on a call to even.GetSocketEvent() which seems to come from wxwidgets.

I'll keep trying.

Revision history for this message
RMDrake (rmdrake) wrote :

Kubuntu Dapper P4.
I think it's the server port on Maxima. Even when I run "maxima -s 4010" or any other port number, it fails with "couldn't open socket". Even sudo doesn't help. If maxima fails it's port opening, wxmaxima, xmaxima, or any of the connecting frontends will fail.

Revision history for this message
Nicholas J Kreucher (kreucher) wrote : steps to patch and fix

Personally I don't care if it uses gcl or cmucl, I just want it to work :)

So, here are the steps to rebuild maxina w/Olaf's cmucl patch. Thanks Olaf!

$ cd /tmp
$ apt-get source maxima
$ sudo apt-get build-dep maxima
$ sudo apt-get cmucl
$ cd maxima_5.9.2
$ curl http://leidola.newcon.de/daten/maxima-cmucl.patch | patch -p1
$ debuild -us -uc -b
$ dpkg -i ../maxima_5.9.2-2ubuntu1_i386.deb

Start up wxmaxima and test... should work now.

Hope this helps some newbies!

Revision history for this message
britt (thursday-ufl) wrote : Re: wxmaxima fails with error, can't connect to maxima

Nicholas,

Will this patch break TeXmacs maxima session?

Britt

Revision history for this message
alonso gomez (alonso-raul-g) wrote :

the last version of maxima. that is 5.10.0 seems to have fixed a whole lot of bugs.
I compiled it under ppc and it seems to work ok with gcl clisp(you can test other clisps, in ppc last gcl seems to work ok), but it seems the problem was not related to wxmaxima, but with maxima itself.

Revision history for this message
William Grant (wgrant) wrote :

This has been fixed with the latest upload in Edgy. It is in fact a bug in gcl.

Changed in wxmaxima:
status: Confirmed → Fix Released
status: Unconfirmed → Confirmed
Revision history for this message
William Grant (wgrant) wrote :

I've isolated the patch for gcl that fixes the problem in Edgy, and it should be in dapper-updates at some point.

Changed in gcl:
assignee: nobody → fujitsu
status: Confirmed → In Progress
Revision history for this message
Ariel Faigon (ariel.faigon) wrote :

This bug really hurts :-(

A question: I have this problem (wxmaxima can't connect to maxima) but I don't have gcl at all (I'm using 'clisp' instead).

maxima alone works just fine, it connects successfully to the lisp interpreter. It is only wxmaxima that has the problem.

Moreover, if I install gcl, and change the preferences in wxmaxima to use gcl (instead of clisp) I get exactly the same problem:
Any input to wxmaxima results in:

    CLIENT: Lost socket connection ...
    Restart maxima with 'Maxima-> Restart maxima'.

So how can this possibly be a problem with gcl? I assume William Grant was referring to a different problem in gcl.

If this helps, I'm attaching a full (13K) 'strace -f' output from wxmaxima including the failure.

Revision history for this message
Ariel Faigon (ariel.faigon) wrote :

Really sorry! plain-text attachments seem to have their newlines eaten on upload, sigh. What I uploaded is completely unreadable.

Reading more on this bug in the dups, it becomes obvious that the problem is in maxima (when called as a 'server' with -s <portnumber>) rather than in wxmaxima.

Running this simpler example, results in this failure:

    $ maxima -s 7776
    jfa: starting server on port 7776
    couldn't open socket:$

Note that there's not even a newline at the end of the error message.

The strace shows:

21650 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
21650 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
21650 connect(3, {sa_family=AF_INET, sin_port=htons(7776), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 ECONNREFUSED (Connection refused)
21650 write(2, "couldn\'t open socket:", 21) = 21
21650 exit_group(1) = ?

So it looks like a bug in maxima. Clearing all the iptables restrictions doesn't change anything. I have no restrictions on localhost connections and I still get 'connection refused'.

Revision history for this message
LaserJock (laserjock) wrote :

The version of maxima in Dapper was compiled with a gcl version that seems to have introduced this bug. It also appears to affect all maxima frontends. We are working on getting approvals for gcl and maxima for dapper-updates.

Revision history for this message
William Grant (wgrant) wrote :
Changed in gcl:
assignee: fujitsu → motu-uvf
Revision history for this message
William Grant (wgrant) wrote :

Once the gcl fix is in -updates, maxima needs to be rebuilt.

Revision history for this message
alonso gomez (alonso-raul-g) wrote :

for a detailed description of what I did after testing a bunch of Clisps (and a lot of frustration) here are some solutions for ppc architecture.

https://launchpad.net/distros/ubuntu/+source/maxima/+bug/37169

for 386 or Amd I imagine you can compile or install the same maxima version (5.10.0 recommended) and all clisps will work (assuming you use source or uptodate versions).

The real problem will be solved once everybody uses the correct maxima, wxmaxima and clisp versions.

William Grant (wgrant)
Changed in gcl:
assignee: motu-uvf → motu-sru
Revision history for this message
Reinhard Tartler (siretart) wrote :

Please don't comment things out, rather delete them. In this patch, this isn't much of a problem, because no context is stripped from the beginning to the end, but in general, I find it easier to review with the affected parts actually deleted.

otherwise the patch looks okay to me, +1 for testing this in -proposed.

Revision history for this message
Daniel T Chen (crimsun) wrote :

+1 for dapper-proposed.

Revision history for this message
StefanPotyra (sistpoty) wrote :

The debdiff looks quite sane. +1.

Revision history for this message
William Grant (wgrant) wrote :

I've upload gcl to dapper-proposed. However, it is awaiting approval by an archive admin, all of whom are currently busy with other things at UDS Mountain View. Once gcl has been accepted and built, I'll upload maxima, and we'll need to get 5 people to confirm that maxima works.

Revision history for this message
Colin Watson (cjwatson) wrote :

Accepted into dapper-proposed; please test this once it's built, ideally via Simon Law and the QA team.

Revision history for this message
William Grant (wgrant) wrote :

Actually, my maxima upload needs to be let into dapper-proposed as well. Only then can testing commence.

Revision history for this message
Colin Watson (cjwatson) wrote :

I've accepted the maxima change (which was just a rebuild with no source changes other than debian/changelog) into dapper-proposed.

Changed in maxima:
status: Unconfirmed → In Progress
Revision history for this message
Ariel Faigon (ariel.faigon) wrote :

Confirming that the two updates (gcl + the maxima pieces) fix the bug for me on 6.06 LTS.

Thank you William (and Colin :)!

Revision history for this message
William Grant (wgrant) wrote :

As maxima has now been built, we now need a number of people to confirm that wxmaxima works properly. To test, you just need to be running Dapper, install the maxima package from dapper-proposed, and then do a general functionality test of wxmaxima. When you've done that, report back here with your results, successful or otherwise.

William Grant (wgrant)
Changed in gcl:
assignee: motu-sru → fujitsu
Revision history for this message
Christine Liebig (kiki) wrote :

After updating maxima to 5.9.2-2ubuntu2 (dapper-proposed), wxmaxima now works just fine for me.

Thank you!

Revision history for this message
Paulo Gomes (pvdgomes-deactivatedaccount) wrote :

I have updated to maxima 5.9.2-2ubuntu2 (dapper-proposed). Both wxmaxima and xmaxima are now working properly. I tried most of the tests that come with the package, plus some calculus and plotting comands, with complete success. Thanks to all that helped!
For the record: Ubuntu 6.06, kernel 2.6.15-27-686.

Revision history for this message
padeco (padecodeco) wrote :

i have just installed the maxima and the front end wxmaxima from the ubuntu forum posted by -LaserJock (Maxima fix needs help testing) which suggested the apt-get, having added the source:
deb http://archive.ubuntu.com/ubuntu/ dapper-proposed main universe

and installed both with no worries and it does not loose or fail to connect no longer.
many thanks,
padeco

Revision history for this message
padeco (padecodeco) wrote :

sorry about the mess, forgot to metion above, the link where i found the suggestion by -LaserJock. it was http://www.ubuntuforums.org/showthread.php?t=305788&highlight=wxmaxima

and i am using the ubuntu 6.06 (fantastic stuff)! kernel 2.6.15-27-386
many thanks,
padeco

Revision history for this message
Rob Frohne (frohro) wrote :

Doing as LaserJock suggested fixed the problem for me.

Rob Frohne

Revision history for this message
William Grant (wgrant) wrote :

As we now have 5 confirmations, I've uploaded gcl and maxima to dapper-updates. They are now awaiting approval by an archive admin.

Revision history for this message
Colin Watson (cjwatson) wrote :

gcl accepted into dapper-updates.

Changed in gcl:
status: In Progress → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote :

(I'm waiting for gcl to build everywhere before accepting maxima.)

Revision history for this message
breakthestate (breakthestate) wrote :

I have both dapper-updates and dapper-proposed in my repositories. I simply did an apt-get update && apt-get upgrade && apt-get dist-upgrade. I am still getting the same "Not connected to maxima!" error on wxmaxima. (xmaxima does not connect to maxima either) Below is my apt-cache policy for wxmaxima, maxima and gcl. Should I still have the gcl from proposed installed?

root@jeff-laptop:~# apt-cache policy wxmaxima
wxmaxima:
  Installed: 0.6.4-1ubuntu1
  Candidate: 0.6.4-1ubuntu1
  Version table:
 *** 0.6.4-1ubuntu1 0
        500 http://us.archive.ubuntu.com dapper/universe Packages
        100 /var/lib/dpkg/status
root@jeff-laptop:~# apt-cache policy maxima
maxima:
  Installed: 5.9.2-2ubuntu2
  Candidate: 5.9.2-2ubuntu2
  Version table:
 *** 5.9.2-2ubuntu2 0
        500 http://us.archive.ubuntu.com dapper-proposed/universe Packages
        100 /var/lib/dpkg/status
     5.9.2-2ubuntu1 0
        500 http://us.archive.ubuntu.com dapper/universe Packages
root@jeff-laptop:~# apt-cache policy gcl
gcl:
  Installed: 2.6.7-14ubuntu2
  Candidate: 2.6.7-14ubuntu2
  Version table:
 *** 2.6.7-14ubuntu2 0
        500 http://us.archive.ubuntu.com dapper-updates/universe Packages
        100 /var/lib/dpkg/status
     2.6.7-14ubuntu1 0
        500 http://us.archive.ubuntu.com dapper-proposed/universe Packages
     2.6.7-14 0
        500 http://us.archive.ubuntu.com dapper/universe Packages

Revision history for this message
William Grant (wgrant) wrote : Re: [SRU] maxima frontends fail to connect

breakthestate wrote:
> I have both dapper-updates and dapper-proposed in my repositories. I
> simply did an apt-get update && apt-get upgrade && apt-get dist-upgrade.
> I am still getting the same "Not connected to maxima!" error on
> wxmaxima. (xmaxima does not connect to maxima either) Below is my apt-
> cache policy for wxmaxima, maxima and gcl. Should I still have the gcl
> from proposed installed?

What's the exact text of the error you get, and how do you trigger it?

Revision history for this message
breakthestate (breakthestate) wrote :

I trigger the error by opening wxmaxima. I try any command. In red letters appears the text in the wxmaxima window: "Not connected to maxima!"

In the bottom right-hand corner of the wxmaxima window it always says "Maxima started. Waiting for connection..."

Revision history for this message
William Grant (wgrant) wrote :

That isn't the error message that this bug gives...

If you run maxima from a terminal and type 1+1, do you get a result?

Revision history for this message
breakthestate (breakthestate) wrote :

jeff@jeff-laptop:~$ maxima
Maxima restarted.
(%i1) 1+1;

(%o1) 2

Revision history for this message
Colin Watson (cjwatson) wrote :

maxima accepted into dapper-updates. William, please follow up for a while to ensure that there are no regressions. It would be worth chasing the wxmaxima connection issue reported in recent comments; I'm content that it shouldn't block this update, but it should be diagnosed (perhaps in a separate bug report).

Changed in maxima:
status: In Progress → Fix Released
Revision history for this message
breakthestate (breakthestate) wrote :

i did a complete reinstall of dapper due to another issue, and i am not experiencing the same problems as i was before. thanks to all!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.