Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: bkm@rlsaxp.bnsc.rl.ac.uk (Brian McIlwrath)
Subject: Re: BEWARE of DECunix f77 3.8 compiler!
Date: 1995/09/13	[thread overview]
Message-ID: <436d1k$1qn0@unixfe.rl.ac.uk> (raw)
In-Reply-To: DEt6AB.MII@news.cern.ch

I believe that I have also found another major (but unrelated) bug in
DEC FORTRAN 3.8!

The effect which caused me to look for this bug is that processes were
becoming impervious to SIGTERM signals and were having to be killed by
SIGKILL - thus negating some exit code.

I traced the problem down to the very simple example below. This seems to
show that the RTL is not resetting the process signal mask after altering
it during critical operations.

This was reported to DEC UK about 6 weeks ago but with little obvious
effect.

An example which shows the bug is:

Given the following f77 program

      program bkm
      call showsig
      print *, "Hello world"
      call showsig
      end

where SHOWSIG is in C and is:

#include <stdio.h>
#include <signal.h>

void showsig_(void)
{
    sigset_t curmask=0;
    if( sigprocmask(0, NULL, &curmask) <0)
	perror("sigprocmask");
    fprintf(stderr, "showsig - sigprocmask is %lx\n", curmask);
}


gives the following output when run:

showsig - sigprocmask is 0
 Hello world
showsig - sigprocmask is 3ff4c04e

Tracing calls to sigprocmask() with dbx shows that it is being called twice 
by the RTL function for__add_to_lf_table(). I speculate that it is
disabling signals for a critical operation but then failing to reenable 
them properly. 

System is:

DEC Unix (OSF) V3.2
Fortran V3.8
Fortran RTL V3.6

   -------------------------------------------------------------------------
   Brian McIlwrath, Starlink Project, Rutherford Appleton Laboratory, UK.
   Tel: +44 (0)1235 446478                      e-mail: bkm@star.rl.ac.uk
   -------------------------------------------------------------------------



  reply	other threads:[~1995-09-13  4:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-09-12  4:00 BEWARE of DECunix f77 3.8 compiler! Walter Brueckner
1995-09-13  4:00 ` Brian McIlwrath [this message]
1995-09-13  4:00   ` Steve Lionel
1995-09-19  4:00   ` Signals (was Re: BEWARE of DECunix f77 3.8 compiler!) Juergen Fuhrmann
1995-09-20  4:00     ` Steve Lionel
1995-09-21  4:00       ` 0 Bradley_Pete x9338 b-000
     [not found]   ` <1995Sep18.143529.7809@cronkite.res.utc.com>
1995-09-19  4:00     ` BEWARE of DECunix f77 3.8 compiler! Steve Lionel
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox