This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1001187 - SIGSEGV signal handler calls functions that are not signal-safe
SIGSEGV signal handler calls functions that are not signal-safe
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
20
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Anaconda Maintenance Team
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-26 12:18 EDT by Steve Tyler
Modified: 2013-10-16 17:21 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-16 17:21:09 EDT
Type: Bug
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 Steve Tyler 2013-08-26 12:18:02 EDT
Description of problem:
anaconda installs a SIGSEGV signal handler, doSegvHandler(), which calls printf(), free(), and exit(), none of which are on the list of signal-safe functions:

POSIX:
2.4 Signal Concepts
2.4.3 Signal Actions
http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html#tag_02_04_03

SIGNAL(7)
http://man7.org/linux/man-pages/man7/signal.7.html

Version-Release number of selected component (if applicable):
anaconda-20.8-1

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
See also: Bug 983319, Comment 24.

For reference:
$ less -N anaconda-20.8-1/pyanaconda/isys/isys.c
...
    219 static PyObject * doSegvHandler(PyObject *s, PyObject *args) {
    220     void *array[20];
    221     size_t size;
    222     char **strings;
    223     size_t i;
    224 
    225     signal(SIGSEGV, SIG_DFL); /* back to default */
    226     
    227     size = backtrace (array, 20);
    228     strings = backtrace_symbols (array, size);
    229     
    230     printf ("Anaconda received SIGSEGV!.  Backtrace:\n");
    231     for (i = 0; i < size; i++)
    232         printf ("%s\n", strings[i]);
    233      
    234     free (strings);
    235     exit(1);
    236 }
...
Comment 1 Steve Tyler 2013-08-26 12:19:51 EDT
[Comment copied from Bug 983319, Comment 24]
Ales Kozumplik 2013-08-26 12:11:30 UTC

(In reply to Brian C. Lane from comment #14)
> Created attachment 789669 [details]
> strace after hitting 'reclaim space'
> 
> Note the end, where it does this forever:
> 
> --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0} ---
> rt_sigreturn()                          = 20651408

this could be caused by Anaconda trying to catch the sigsegv and write out some useful information about it via isys.handleSegv. That's a naive thing to try.
Comment 2 Steve Tyler 2013-08-26 12:40:14 EDT
[Comment copied from Bug 983319, Comment 29]
Ales Kozumplik 2013-08-26 16:29:10 UTC

(In reply to Steve Tyler from comment #25)
> Thanks for pointing that out, Ales. I was wondering about that SIGSEGV
> handler too. Do you think it could be removed?
> 

It should, definitely. It was written for a different Anaconda:)

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