Bug 1279014 - Crash in _nc_init_acs_sp
Summary: Crash in _nc_init_acs_sp
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gap-pkg-browse
Version: 24
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jerry James
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-07 05:57 UTC by Jerry James
Modified: 2016-04-15 03:19 UTC (History)
3 users (show)

Fixed In Version: gap-pkg-browse-1.8.6-6.fc24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-15 03:19:30 UTC


Attachments (Terms of Use)

Description Jerry James 2015-11-07 05:57:10 UTC
Description of problem:
GAP occasionally crashes while running in a mock environment.  I have never seen it happen under normal circumstances, so maybe something about the mock environment is triggering it.  Anyway, I finally managed to catch it happening in GDB.  Here is what I got:

Program received signal SIGSEGV, Segmentation fault.
_nc_init_acs_sp (sp=0x555555dae5d0) at ../../ncurses/tinfo/lib_acs.c:95
95		    real_map[j] = 0;
(gdb) bt
#0  _nc_init_acs_sp (sp=0x555555dae5d0) at ../../ncurses/tinfo/lib_acs.c:95
#1  0x00007ffff6c0bfff in _nc_init_acs () at ../../ncurses/tinfo/lib_acs.c:249
#2  0x00007ffff63c58ca in _nc_setupscreen (slines=50, scolumns=80, 
    output=output@entry=0x7ffff71eb640 <_IO_2_1_stdout_>, 
    filtered=<optimized out>, slk_format=slk_format@entry=0)
    at ../../ncurses/base/lib_set_term.c:581
#3  0x00007ffff63c276e in newterm (name=name@entry=0x7fffffffe8e6 "vt100", 
    ofp=<optimized out>, ifp=<optimized out>)
    at ../../ncurses/base/lib_newterm.c:223
#4  0x00007ffff63beb33 in initscr () at ../../ncurses/base/lib_initscr.c:87
#5  0x00007ffff67e21ec in PostRestore ()
   from /usr/lib/gap/pkg/Browse/bin/x86_64-redhat-linux-gnu-gcc-default64/ncurses.so
#6  0x00007ffff67e23e9 in InitLibrary ()
   from /usr/lib/gap/pkg/Browse/bin/x86_64-redhat-linux-gnu-gcc-default64/ncurses.so
...

(gdb) print real_map
$1 = (chtype *) 0x0

So apparently it is possible that SP_PARM != 0, but SP_PARM->_acs_map == 0.  If this means that GAP is somehow misusing the interface, please let me know and I will attempt to fix this from the GAP side.

Version-Release number of selected component (if applicable):
ncurses-6.0-1.20150810.fc24.x86_64

How reproducible:
Sometimes, probably having something to do with the phase of the moon.

Steps to Reproduce:
1. Install one of the gap-pkg-* packages.  Sometimes you'll see a segfault when GAP runs to generate the workspace.  Sometimes you won't.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Miroslav Lichvar 2015-11-09 14:32:56 UTC
I tried building gap-pkg-io in mock in a loop for an hour and running update-gap-workspace couple times, but it didn't seem to trigger the crash.
From the backtrace it's not obvious to me what's happening.

I'm CCing the upstream maintainer.

Comment 2 Thomas E. Dickey 2015-11-10 01:34:08 UTC
I don't see a cause.

The _acs_map data should be nonzero at that point,
because it is allocated earlier in _nc_setupscreen,
on line 309 of lib_set_term.c

There might be some faulty error-return which corrupts
the sp-parameter.  Are we talking about this

https://admin.fedoraproject.org/pkgdb/package/gap-pkg-io/

or some other component (so I could read the source...)

Comment 3 Miroslav Lichvar 2015-11-12 07:51:23 UTC
The cause of the crash seems to be mixing incompatible ncurses/tinfo libraries in the same process. The gap binary is linked with libncurses6/libtinfo6, but the ncurses.so module from the gap-pkg-browse package is still linked with libncurses5/libtinfo5, which is now provided by the ncurses-compat-libs subpackage of ncurses.

Rebuild of the gap-pkg-browse package should fix it.

Comment 4 Jan Kurik 2016-02-24 15:31:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 5 Fedora Update System 2016-04-10 04:46:51 UTC
sagemath-6.8-8.fc24 gap-pkg-gpd-1.43-1.fc24 gap-pkg-semigroups-2.7.4-1.fc24 gap-pkg-genss-1.6.4-1.fc24 gap-pkg-spinsym-1.5-5.fc24 gap-pkg-orb-4.7.6-1.fc24 gap-pkg-ctbllib-1.2.2-7.fc24 gap-pkg-tomlib-1.2.5-7.fc24 gap-pkg-radiroot-2.7-5.fc24 gap-pkg-atlasrep-1.5.1-1.fc24 gap-pkg-nq-2.5.3-1.fc24 gap-pkg-browse-1.8.6-6.fc24 gap-pkg-alnuth-3.0.0-6.fc24 gap-pkg-polycyclic-2.11-6.fc24 gap-pkg-io-4.4.6-1.fc24 gap-pkg-crystcat-1.1.6-4.fc24 xgap-4.23-13.fc24 libgap-4.8.3-1.fc24 gap-pkg-sonata-2.8-4.fc24 gap-pkg-smallsemi-0.6.10-1.fc24 gap-pkg-polymaking-0.8.1-5.fc24 gap-pkg-grape-4.7-3.fc24 gap-pkg-fga-1.3.1-1.fc24 gap-pkg-edim-1.3.2-5.fc24 gap-pkg-cryst-4.1.12-4.fc24 gap-pkg-congruence-1.1.1-4.fc24 gap-pkg-carat-2.1.4-4.fc24 gap-pkg-autpgrp-1.6-5.fc24 gap-pkg-autodoc-2016.03.08-1.fc24 gap-pkg-aclib-1.2-5.fc24 GAPDoc-1.5.1-10.fc24 tth-4.08-4.fc24 gap-4.8.3-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-204ca75c8d

Comment 6 Fedora Update System 2016-04-10 15:51:11 UTC
GAPDoc-1.5.1-10.fc24, gap-4.8.3-1.fc24, gap-pkg-aclib-1.2-5.fc24, gap-pkg-alnuth-3.0.0-6.fc24, gap-pkg-atlasrep-1.5.1-1.fc24, gap-pkg-autodoc-2016.03.08-1.fc24, gap-pkg-autpgrp-1.6-5.fc24, gap-pkg-browse-1.8.6-6.fc24, gap-pkg-carat-2.1.4-4.fc24, gap-pkg-congruence-1.1.1-4.fc24, gap-pkg-cryst-4.1.12-4.fc24, gap-pkg-crystcat-1.1.6-4.fc24, gap-pkg-ctbllib-1.2.2-7.fc24, gap-pkg-edim-1.3.2-5.fc24, gap-pkg-fga-1.3.1-1.fc24, gap-pkg-genss-1.6.4-1.fc24, gap-pkg-gpd-1.43-1.fc24, gap-pkg-grape-4.7-3.fc24, gap-pkg-io-4.4.6-1.fc24, gap-pkg-nq-2.5.3-1.fc24, gap-pkg-orb-4.7.6-1.fc24, gap-pkg-polycyclic-2.11-6.fc24, gap-pkg-polymaking-0.8.1-5.fc24, gap-pkg-radiroot-2.7-5.fc24, gap-pkg-semigroups-2.7.4-1.fc24, gap-pkg-smallsemi-0.6.10-1.fc24, gap-pkg-sonata-2.8-4.fc24, gap-pkg-spinsym-1.5-5.fc24, gap-pkg-tomlib-1.2.5-7.fc24, libgap-4.8.3-1.fc24, sagemath-6.8-8.fc24, tth-4.08-4.fc24, xgap-4.23-13.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-204ca75c8d

Comment 7 Fedora Update System 2016-04-15 03:19:12 UTC
GAPDoc-1.5.1-10.fc24, gap-4.8.3-1.fc24, gap-pkg-aclib-1.2-5.fc24, gap-pkg-alnuth-3.0.0-6.fc24, gap-pkg-atlasrep-1.5.1-1.fc24, gap-pkg-autodoc-2016.03.08-1.fc24, gap-pkg-autpgrp-1.6-5.fc24, gap-pkg-browse-1.8.6-6.fc24, gap-pkg-carat-2.1.4-4.fc24, gap-pkg-congruence-1.1.1-4.fc24, gap-pkg-cryst-4.1.12-4.fc24, gap-pkg-crystcat-1.1.6-4.fc24, gap-pkg-ctbllib-1.2.2-7.fc24, gap-pkg-edim-1.3.2-5.fc24, gap-pkg-fga-1.3.1-1.fc24, gap-pkg-genss-1.6.4-1.fc24, gap-pkg-gpd-1.43-1.fc24, gap-pkg-grape-4.7-3.fc24, gap-pkg-io-4.4.6-1.fc24, gap-pkg-nq-2.5.3-1.fc24, gap-pkg-orb-4.7.6-1.fc24, gap-pkg-polycyclic-2.11-6.fc24, gap-pkg-polymaking-0.8.1-5.fc24, gap-pkg-radiroot-2.7-5.fc24, gap-pkg-semigroups-2.7.4-1.fc24, gap-pkg-smallsemi-0.6.10-1.fc24, gap-pkg-sonata-2.8-4.fc24, gap-pkg-spinsym-1.5-5.fc24, gap-pkg-tomlib-1.2.5-7.fc24, libgap-4.8.3-1.fc24, sagemath-6.8-8.fc24, tth-4.08-4.fc24, xgap-4.23-13.fc24 has been pushed to the Fedora 24 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.