Bug 496124 - maxima-runtime-gcl: segfault, selinux issues
maxima-runtime-gcl: segfault, selinux issues
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: maxima (Show other bugs)
12
All Linux
low Severity low
: ---
: ---
Assigned To: Rex Dieter
Fedora Extras Quality Assurance
: Reopened, Triaged
: 509549 512972 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-16 14:57 EDT by Rand All
Modified: 2010-11-21 17:02 EST (History)
6 users (show)

See Also:
Fixed In Version: maxima-5.22.1-5.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-12-23 16:08:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rand All 2009-04-16 14:57:20 EDT
I'm running a current beta of F11.  I installed Maxima, and tried to run it.  It gives a segfault.

-bash-4.0$ maxima 
Segmentation fault

-bash-4.0$ maxima -v
+ '[' gcl = clisp ']'
+ '[' gcl = cmucl ']'
+ '[' gcl = scl ']'
+ '[' gcl = gcl ']'
+ exec /usr/lib64/maxima/5.17.1/binary-gcl/maxima -eval '(cl-user::run)' -f -- -v '' '' '' '' '' '' '' ''
Segmentation fault

-bash-4.0$ yum list maxima
Loaded plugins: refresh-packagekit
Installed Packages
maxima.x86_64                      5.17.1-7.fc11                       installed

-bash-4.0$ uname -a
Linux Ahmed.US 2.6.29.1-70.fc11.x86_64 #1 SMP Mon Apr 13 14:16:25 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
Comment 1 Rex Dieter 2009-04-16 15:12:20 EDT
Mind trying another runtime?

yum install maxima-runtime-sbcl
maxima -l sbcl
Comment 2 Rand All 2009-04-16 16:17:27 EDT
Ah ha!
I installed SBCL and Maxima works.  I didn't even have to pass Maxima the option to specify the runtime.  SBCL seems to be the default.
Comment 3 Rex Dieter 2009-04-26 17:57:55 EDT
Can't reproduce here on my newly installed f11/rawhide box, hopefully it was just a transient error (rawhide being rawhide).
Comment 4 Rand All 2009-04-26 18:33:45 EDT
(In reply to comment #3)
> Can't reproduce here on my newly installed f11/rawhide box, hopefully it was
> just a transient error (rawhide being rawhide).  

Oops.  Sorry, but I still get the error.  Do you have SBCL installed?  If so, you won't see the error.  The problem only happens when you are using GNU Common Lisp as the runtime.  Try uninstalling SBCL and then run Maxima again.
Comment 5 Rex Dieter 2009-04-26 18:46:16 EDT
I tried all available runtimes, and they all worked fine for me.

If it makes you feel better to keep this open, fine, but until we have a way to reproduce this, or more/new information, there's not much to do.

In the meantime, I'll test out the i386 builds.
Comment 6 Rand All 2009-04-26 18:54:17 EDT
(In reply to comment #5)
> I tried all available runtimes, and they all worked fine for me.
> 
> If it makes you feel better to keep this open, fine, but until we have a way to
> reproduce this, or more/new information, there's not much to do.
> 
> In the meantime, I'll test out the i386 builds.  

He he.  Never mind.  We can close it.
Comment 7 Rex Dieter 2009-04-26 18:59:13 EDT
Rats, I had selinux in permissive mode, with it enabled I can reproduce the failure to run: 
maxima -l gcl

Reassigning to gcl for input/advice.
Comment 8 Rand All 2009-04-26 19:05:46 EDT
(In reply to comment #7)
> Rats, I had selinux in permissive mode, with it enabled I can reproduce the
> failure to run: 
> maxima -l gcl
> 
> Reassigning to gcl for input/advice.  

Oh yeah.  I forgot to mention: there's an SELinux error that comes with the segfault.  That probably would have been good to include in my original post.
Comment 9 Rex Dieter 2009-04-26 19:46:32 EDT
confirmed reproducible on both i586, x86_64 (I'd venture this is independant of arch).
Comment 10 Jerry James 2009-04-27 10:38:36 EDT
Dealing with the SELinux issues took me much longer than any of the other problems I had to solve to get GCL building on Fedora again.  It looks like I'm still not done...

To get the GCL binary to run, I created a type gcl_exec_t.  My intention was that all GCL images would use this type.  However, I foolishly did not separate out the SELinux definitions into a separate gcl-selinux package.  So to solve the maxima problem, you'd have to install the gcl package just to get the gcl_exec_t type.

I tried "chcon -t gcl_exec_t %{_libdir}/maxima/5.17.1/binary-gcl/maxima".  That got it to run.  Now I worry about the original type, lib_t, of that file, though.  Do I need to make a gcl_lib_t type that combines the lib_t permissions with gcl_exec_t?  (I haven't looked at lib_t yet, so I don't know.)  It's probably okay, since maxima seems to be functioning with gcl_exec_t.

So I'll push a new GCL build ASAP that will contain a gcl-selinux subpackage.  You'll need to require that, and either use semanage to give the image the gcl_exec_t type or produce your own SELinux policy file.

For which distributions do you need this?  Just F-11 & Rawhide?
Comment 11 Rex Dieter 2009-04-27 10:41:40 EDT
awesome, F-11+ only for now, but had partial intentions to re-introduce the gcl runtime for prior releases at some date in the future (no rush though).
Comment 12 Rex Dieter 2009-04-27 10:54:34 EDT
just peeked into /usr/share/selinux/ , noticed gcl seems to be the only one using packages/ (and that dir is unowned), and all other policy lives in targeted/ (and is bzipped).  Is this expected?
Comment 13 Jerry James 2009-04-27 11:02:07 EDT
That was supposed to have been fixed.  See the thread rooted here:

https://www.redhat.com/archives/fedora-selinux-list/2009-January/msg00053.html

If it still isn't fixed, I guess I'd better file a bug.
Comment 14 Fedora Update System 2009-04-27 13:29:34 EDT
gcl-2.6.8-0.3.20090303cvs.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/gcl-2.6.8-0.3.20090303cvs.fc11
Comment 15 Fedora Update System 2009-04-27 13:29:38 EDT
gcl-2.6.8-0.3.20090303cvs.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/gcl-2.6.8-0.3.20090303cvs.fc10
Comment 16 Fedora Update System 2009-04-27 17:39:59 EDT
gcl-2.6.8-0.3.20090303cvs.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gcl'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-4053
Comment 17 Fedora Update System 2009-05-06 19:26:50 EDT
gcl-2.6.8-0.3.20090303cvs.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 18 Rex Dieter 2009-05-07 09:40:27 EDT
Per comment #10, I'll need to also make appropriate changes to maxima , re-opening and re-assigning there (sorry for bz noise, I guess I should've made 2 bugs)
Comment 19 Jerry James 2009-05-07 11:39:56 EDT
I probably shouldn't have set this bug to autoclose when the new gcl build was pushed.  What do you want to do about F-11?  You can't build with the new gcl because it is a pending zero-day update.  Do you want me to ask rel-eng to tag it for F-11 final?
Comment 20 Rex Dieter 2009-05-07 12:11:15 EDT
I'll figure something out.  I'm on the rel-eng team, so can do any necessary tagging.  (Just need to carve out some time to do the work).
Comment 21 Fedora Update System 2009-05-09 00:19:38 EDT
gcl-2.6.8-0.3.20090303cvs.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 22 Bug Zapper 2009-06-09 09:57:06 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 23 Rex Dieter 2009-06-28 15:09:55 EDT
FYI, until I find the time to fix this properly, I'm going to omit the broken -runtime-gcl support here (patches welcome though).
Comment 24 Jerry James 2009-06-29 10:09:08 EDT
What needs to be done?  Just setting the appropriate SELinux type, or is there something more?
Comment 25 Rex Dieter 2009-06-29 10:31:27 EDT
yeah, selinux love, testing, per comment #20
Comment 26 Rex Dieter 2009-07-02 09:42:50 EDT
OK, there's an ulterior motive too, I want/prefer the -sbcl backend to be used by default, but yum's current algorithm for choosing which -runtime-* to install by default picks the one with the shortest name, so most users get -gcl instead.
Comment 27 Rex Dieter 2009-07-03 10:22:52 EDT
*** Bug 509549 has been marked as a duplicate of this bug. ***
Comment 28 Rex Dieter 2009-07-21 14:13:25 EDT
*** Bug 512972 has been marked as a duplicate of this bug. ***
Comment 29 Rex Dieter 2009-10-03 19:03:50 EDT
Jerry, sorry for the delay, been looking at this today finally, and I was about to jump in with some semanage scriptlets, when it occurred to me, is there some reason we can't just add the maxima-gcl related files to gcl.fc when generating gcl-selinux ? something like:

/usr/lib/maxima/[^/]+/binary-gcl -- gen_context(system_u:object:r:gcl_exec_t,s0)
/usr/lib64/maxima/[^/]+/binary-gcl -- gen_context(system_u:object:r:gcl_exec_t,s0)

(or am I missing something)?
Comment 30 Jerry James 2009-10-05 13:54:24 EDT
Sure, that should be fine.  For what branches do you want this?
Comment 31 Rex Dieter 2009-10-06 00:33:48 EDT
cool.

More the merrier, but start with devel/F-12 first, then we can maybe think about F-11 eventually too.
Comment 32 Fedora Update System 2009-10-06 11:19:19 EDT
gcl-2.6.8-0.5.20090701cvs.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/gcl-2.6.8-0.5.20090701cvs.fc12
Comment 33 Jerry James 2009-10-06 11:20:39 EDT
It's built in F-13 and is ready to go to F-12 testing as soon as that is possible.
Comment 34 Rex Dieter 2009-10-19 11:25:37 EDT
Saw this upgrading today (on F-11), didn't look into details yet,

  Updating       : gcl-selinux-2.6.8-0.3.20090701cvs.fc11.x86_64                                           17/45
libsepol.context_from_record: role object is not defined
libsepol.context_from_record: could not create context structure
libsepol.context_from_string: could not create context structure
libsepol.sepol_context_to_sid: could not convert system_u:object:r:gcl_exec_t:s0 to sid
invalid context system_u:object:r:gcl_exec_t:s0
libsemanage.semanage_install_active: setfiles returned error code 1.
libsepol.context_from_record: role object is not defined
libsepol.context_from_record: could not create context structure
libsepol.context_from_string: could not create context structure
libsepol.sepol_context_to_sid: could not convert system_u:object:r:gcl_exec_t:s0 to sid
invalid context system_u:object:r:gcl_exec_t:s0
libsemanage.semanage_install_active: setfiles returned error code 1.
/usr/sbin/semodule:  Failed!
  Updating       : gcl-2.6.8-0.3.20090701cvs.fc11.x86_64
Comment 35 Jerry James 2009-10-20 18:18:16 EDT
That was a fat fingers error.  Dan Walsh asked me to make another change to the policy anyway, so I'm building new packages now.  Sorry about that...
Comment 36 Fedora Update System 2009-10-20 18:46:59 EDT
gcl-2.6.8-0.6.20090701cvs.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/gcl-2.6.8-0.6.20090701cvs.fc12
Comment 37 Fedora Update System 2009-10-20 18:47:12 EDT
gcl-2.6.8-0.4.20090701cvs.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/gcl-2.6.8-0.4.20090701cvs.fc11
Comment 38 Rex Dieter 2009-10-20 19:55:55 EDT
regarding F-12, you can still request inclusion in F-12 final, just do a 'make tag-request' instead of 'make update'.

See also,
https://www.redhat.com/archives/fedora-devel-announce/2009-October/msg00006.html
Comment 39 Fedora Update System 2009-11-04 07:17:58 EST
gcl-2.6.8-0.4.20090701cvs.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 40 Bug Zapper 2009-11-16 04:55:28 EST
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 41 Rex Dieter 2009-12-23 16:08:05 EST
Closing, let's consider the issue closed.

At some future, date, when I collect enough round-tuits, maxima-runtime-gcl will be re-introduced.
Comment 42 Fedora Update System 2010-11-05 11:56:35 EDT
maxima-5.22.1-5.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/maxima-5.22.1-5.fc13
Comment 43 Fedora Update System 2010-11-05 11:58:53 EDT
maxima-5.22.1-5.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/maxima-5.22.1-5.fc14
Comment 44 Fedora Update System 2010-11-21 16:53:14 EST
maxima-5.22.1-5.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 45 Fedora Update System 2010-11-21 17:02:07 EST
maxima-5.22.1-5.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.