zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: Hang on latest kubuntu linux when built with icc
Date: Mon, 12 Jun 2006 14:07:19 +0100	[thread overview]
Message-ID: <200606121307.k5CD7JvS018060@news01.csr.com> (raw)
In-Reply-To: <20a807210606101831w3170d4aandf94ce83ac5ec8a8@mail.gmail.com>

"Vin Shelton" wrote:
> when I build the latest CVS sources with icc, the Intel C compiler,
> the shell eventually hangs after running a command but before
> returning to the prompt.  It usually takes only 1-5 commands before
> this happens.
> 
> Here's an strace of zsh -f:
>... 
> wait4(-1, 0xbfd3ac30, WNOHANG|WSTOPPED, 0xbfd3abd4) = -1 ECHILD (No
> child processes)
> sigreturn()                             = ? (mask now ~[HUP KILL CHLD
> STOP RTMIN])
> pause()                                 = ? ERESTARTNOHAND (To be restarted)
> --- SIGHUP (Hangup) @ 0 (0) ---
>...
> The SIGHUP is where I killed the shell from another window.

Unfortunately I'm not a signal expert and it really needs someone who
does this sort of thing regularly.

The pause() looks a bit fishy.  There are two explicit occurrences in
the code:  I'll assume it's one of these for now.  What strace
reports might be only distantly related to the source code; still, my
Fedora Core 4 with 2.6.14 says it's calling rt_sigsuspend(), which
sounds much more plausible.

One call is here:

#ifdef BROKEN_POSIX_SIGSUSPEND
    sigprocmask(SIG_SETMASK, &set, &oset);
    pause();
    sigprocmask(SIG_SETMASK, &oset, NULL);
#else /* not BROKEN_POSIX_SIGSUSPEND */
    ret = sigsuspend(&set);
#endif /* BROKEN_POSIX_SIGSUSPEND */

and the other is right down at the tail end where we're virtually
implementing signal suspension from scratch.

I don't think you should be getting either of those... certainly not the
second, but probably not BROKEN_POSIX_SIGSUSPEND either.  Could you
check if that's defined?  If it is, try undefining it; the test may need
tweaking.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php


  reply	other threads:[~2006-06-12 13:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-11  1:31 Vin Shelton
2006-06-12 13:07 ` Peter Stephenson [this message]
2006-06-14  3:23   ` Vin Shelton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200606121307.k5CD7JvS018060@news01.csr.com \
    --to=pws@csr.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).