Bug 578665

Summary: "help" command hangs because SIGCHLD handler is not async-signal-safe
Product: [Fedora] Fedora Reporter: Matt McCutchen <matt>
Component: octaveAssignee: Rakesh Pandit <rpandit>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: alex, dasergatskov, mmahut, rpandit, susi.lehtola
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-27 15:22:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Backtrace
none
"rpm -qa" output
none
Demo of forcing the bug to occur using gdb none

Description Matt McCutchen 2010-04-01 01:50:32 UTC
Created attachment 403844 [details]
Backtrace

Description of problem:
Octave's SIGCHLD handler calls operator new, which is not async-signal-safe.  This can cause the "help" command to hang if the SIGCHLD from the info subprocess arrives while octave was already in a call to operator new.

Version-Release number of selected component (if applicable):
octave-3.2.3-4.fc12.x86_64

How reproducible:
Rarely and randomly.  I haven't found any tricks to make it happen more often.

Steps to Reproduce:
1. Start octave.
2. help clear
  
Actual results:
Octave hangs (see attached backtrace).

Expected results:
The "help" command completes.

Comment 1 Alex Lancaster 2010-07-17 20:08:30 UTC
Can you reproduce this with latest octave and/or octave-forge in either F-13 or F-12?

Comment 2 Matt McCutchen 2010-07-17 21:36:07 UTC
I just reproduced the problem with octave-3.2.4-2.fc13.x86_64 on F13.  I got lucky: the hang occurred on my very first try.

Comment 3 Alex Lancaster 2010-07-18 04:33:58 UTC
(In reply to comment #2)
> I just reproduced the problem with octave-3.2.4-2.fc13.x86_64 on F13.  I got
> lucky: the hang occurred on my very first try.    

Do you have octave-forge installed?  If so, what version?  Also any other possible third-party octave packages, also it might help to move aside your ~/.octaverc file if you have one.    I can't reproduce a hang using the "help" command at all.  It might be useful to report this upstream and post a link to the upstream bug on this bugzilla entry.

Comment 4 Matt McCutchen 2010-07-18 16:02:30 UTC
Created attachment 432710 [details]
"rpm -qa" output

(In reply to comment #3)
> Do you have octave-forge installed?  If so, what version?  Also any other
> possible third-party octave packages,

I don't have octave-forge installed, and I didn't intentionally install any third-party octave packages.  See the attached "rpm -qa" output.

> also it might help to move aside your
> ~/.octaverc file if you have one.

I don't have one.

> I can't reproduce a hang using the "help"
> command at all.

This is a timing-dependent bug.  It's entirely possible that it will never present for you due to differences between your system and mine.  You should still be able to trigger it by artificially forcing the proper sequence of events using gdb; I will attach a typescript demonstrating this.

Comment 5 Matt McCutchen 2010-07-18 16:02:54 UTC
Created attachment 432711 [details]
Demo of forcing the bug to occur using gdb

Comment 6 Alex Lancaster 2010-07-18 19:26:04 UTC
(In reply to comment #5)
> Created an attachment (id=432711) [details]
> Demo of forcing the bug to occur using gdb    

Hmm, still can't seem to reproduce myself using those steps, but I filed the bug with upstream Octave on GNU Savannah and Cc'ed you on the bug:

https://savannah.gnu.org/bugs/index.php?30477

Hopefully upstream will know more about how to tackle this.

Comment 7 Dmitri A. Sergatskov 2010-07-20 02:27:12 UTC
I can reproduce it with both fedora's package and (much more "reliably")
with self-compiled 3.3.51. For me it works almost 100% if I do (in 3.3.51)
help junk111
(or any other non-existing entry). With existing functions it is 
still hit-or-miss. If I set "more off" then bug happens not as often.

Dmitri.

Comment 8 Matt McCutchen 2011-01-18 01:54:39 UTC
Upstream fix:

http://hg.savannah.gnu.org/hgweb/octave/rev/f359cfc6e24d

Comment 9 Bug Zapper 2011-06-02 15:45:44 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 10 Bug Zapper 2011-06-27 15:22:43 UTC
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.