Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 111062 - on ppc quitting xmaxima (maxima-5.9.1-r5) also quit the X server.
Summary: on ppc quitting xmaxima (maxima-5.9.1-r5) also quit the X server.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: High normal
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 126254
  Show dependency tree
 
Reported: 2005-10-31 15:03 UTC by François Bissey
Modified: 2006-04-11 23:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fix getpid function to work with modern versions of clisp (maxima-5.9.1-fix-clisp-getpid.patch,473 bytes, patch)
2006-04-06 23:34 UTC, Wormo (RETIRED)
Details | Diff
maxima CMkill function checks for pid > 1 (maxima-5.9.1-no-kill-minus-one.patch,871 bytes, patch)
2006-04-06 23:36 UTC, Wormo (RETIRED)
Details | Diff
updated maxima ebuild that applies the above patches (maxima-5.9.1-r6.ebuild,2.51 KB, text/plain)
2006-04-06 23:38 UTC, Wormo (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description François Bissey 2005-10-31 15:03:59 UTC
Annoyed by the fact http://bugs.gentoo.org/show_bug.cgi?id=82000 is not 
solved on ppc or ~ppc I added 
sci-mathematics/maxima ~x86 in my /etc/portage/package.keywords
and emerged maxima-5.9.1-r5. 
I can now start xmaxima without problems (5.9.1 complains about not
finding the documentation and exit immediately).
The problem is that when I quit xmaxima my xserver is shutdown as well
and I am back to the kdm logging screen. 

Reproducible: Always
Steps to Reproduce:
1.Add sci-mathematics/maxima ~x86 to /etc/portage/package.keywords
2.emerge maxima with the following use flags: +auctex +clisp (-cmucl) -emacs
-gcl +tetex 
3.start xmaxima
4. quit xmaxima

Actual Results:  
My Xserver died.

Expected Results:  
quitted gracefully without taking my Xsession away with it.

merge info
Portage 2.0.51.22-r3 (default-linux/ppc/2005.0, gcc-3.4.4, glibc-2.3.5-r2,
2.6.12-gentoo-r6 ppc)
=================================================================
System uname: 2.6.12-gentoo-r6 ppc 7450, altivec supported
Gentoo Base System version 1.6.13
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="ppc"
AUTOCLEAN="yes"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=7450 -pipe -maltivec -mabi=altivec -mpowerpc-gfxopt
-fsigned-char -frename-registers -fweb -fno-strict-aliasing"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=7450 -pipe -maltivec -mabi=altivec -mpowerpc-gfxopt
-fsigned-char -frename-registers -fweb -fno-strict-aliasing"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks fixpackages sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.vic.keypoint.com.au http://mirrors.tds.net/gentoo
ftp://mirrors.tds.net/gentoo http://mirror.tucdemonic.org/gentoo/"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="ppc X a52 aac aalib alsa altivec arts berkdb bitmap-fonts cairo cddb cdf
cdparanoia cdr crypt cups curl dts dv dvd dvdr dvdread emboss encode esd f77 fam
fbcon ffmpeg flac foomaticdb fortran gd gdbm ggi gif gpm graphviz gstreamer gtk
gtk2 hal ieee1394 imagemagick imlib imlib2 ipv6 java jbig jpeg jpeg2k kde
kdexdeltas lcms libwww live lzo mad mikmod mjpeg motif mp3 mpeg ncurses netcdf
network nls nptl ogg oggvorbis openexr opengl oss pam pdflib perl plotutils png
ppds python qt rdesktop readline samba sdl slang slp spell ssl szip tcltk tcpd
tetex theora tiff truetype truetype-fonts type1-fonts udev unicode vorbis wmf
xine xml xml2 xmms xv xvid zeroconf zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTDIR_OVERLAY
Comment 1 François Bissey 2005-10-31 16:48:25 UTC
Actually after applying the symlink fix from Bug 82000 I have
the same problem with xmaxima 5.9.1. I cannot find any log of 
what is wrong. I remember trying maxima some time ago probably
5.9.0 and it didn't have these problems. 
Comment 2 Carsten Lohrke (RETIRED) gentoo-dev 2005-10-31 16:56:09 UTC
Has the ppc keyword been dropped accidentally? Couldn't find anythin in the
ChangeLog...
Comment 3 José de Paula Rodrigues 2005-11-01 20:02:06 UTC
I have the same problem on AMD64 using clisp (instead of the default gcl) as a
backend. I didn't test with gcl.
Comment 4 José de Paula Rodrigues 2005-11-01 20:33:09 UTC
Yes, xmaxima doesn't take the X session down on exiting if gcl is used as the
backend (AMD64)
Comment 5 François Bissey 2005-11-01 21:00:47 UTC
I tried the gcl backend on ppc and on my system at least xmaxima
effectively doesn't take X down. The problem is that maxima segfault
on the comand line which means that all I have is an empty xmaxima 
window with no prompt.
Comment 6 Wormo (RETIRED) gentoo-dev 2006-04-06 22:52:17 UTC
I tracked down the clisp crash problem, and have a couple of patches to fix it.

1. maxima has clisp-specific code to get pid, which is broken for recent versions of clisp with maxima-5.9.1 -- it instead returns instead '-1'

2. the maxima CMkill function checks only that pid is an int -- it accepts '-1' as a valid pid

Put the two together, and you have the reported problem -- SIGTERM sent to every process, and killing everything the user running maxima has permissions to kill. 

The first issue has been fixed since maxima-5.9.2
(http://cvs.sourceforge.net/viewcvs.py/maxima/maxima/src/server.lisp?rev=1.11&view=log)

This is enough to prevent xmaxima from going trigger-happy in this case, but I like to be conservative and added a second patch that makes CMkill refuse to kill pid <= 1.
Comment 7 Wormo (RETIRED) gentoo-dev 2006-04-06 23:34:29 UTC
Created attachment 84107 [details, diff]
fix getpid function to work with modern versions of clisp
Comment 8 Wormo (RETIRED) gentoo-dev 2006-04-06 23:36:03 UTC
Created attachment 84108 [details, diff]
maxima CMkill function checks for pid > 1
Comment 9 Wormo (RETIRED) gentoo-dev 2006-04-06 23:38:48 UTC
Created attachment 84109 [details]
updated maxima ebuild that applies the above patches
Comment 10 Wormo (RETIRED) gentoo-dev 2006-04-11 23:22:52 UTC
Patches committed after nerdboy from sci team tried and approved. I left the ebuild rev at r5 so that x86 maxima users happily using gcl or cmucl won't have to rebuild unnecessarily.