* Hang on latest kubuntu linux when built with icc
@ 2006-06-11 1:31 Vin Shelton
2006-06-12 13:07 ` Peter Stephenson
0 siblings, 1 reply; 3+ messages in thread
From: Vin Shelton @ 2006-06-11 1:31 UTC (permalink / raw)
To: zsh-workers
Greetings -
On my new kubuntu box - uname -a reports:
Linux samwise 2.6.15-23-386 #1 PREEMPT Tue May 23 13:49:40 UTC 2006
i686 GNU/Linux
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:
write(10, "\r\n", 2) = 2
alarm(0) = 0
ioctl(10, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig -icanon
-echo ...}) = 0
ioctl(10, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig icanon echo ...}) = 0
ioctl(10, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon
echo ...}) = 0
time(NULL) = 1149988783
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0
pipe([3, 4]) = 0
gettimeofday({1149988783, 119463}, {240, 0}) = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb7b8c708) = 18370
close(4) = 0
read(3, "", 1) = 0
close(3) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[HUP CHLD RTMIN RT_1], [CHLD], 8) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], ~[HUP KILL STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[HUP KILL STOP RTMIN RT_1], ~[KILL STOP
RTMIN RT_1], 8) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED,
{ru_utime={0, 999}, ru_stime={0, 999}, ...}) = 18370
gettimeofday({1149988783, 123302}, {240, 0}) = 0
ioctl(10, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon
echo ...}) = 0
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) ---
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], ~[KILL CHLD STOP RTMIN RT_1], 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[KILL CHLD STOP RTMIN RT_1], ~[KILL STOP
RTMIN RT_1], 8) = 0
exit_group(1) = ?
The SIGHUP is where I killed the shell from another window. The shell
hangs at the pause just before there. Is there a race condition on
handling the signals?
Let me know what other info I can provide.
- Vin
--
Whoever you are, no matter how lonely,
the world offers itself to your imagination,
calls to you like the wild geese, harsh and exciting--
over and over announcing your place
in the family of things. Mary Oliver
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Hang on latest kubuntu linux when built with icc
2006-06-11 1:31 Hang on latest kubuntu linux when built with icc Vin Shelton
@ 2006-06-12 13:07 ` Peter Stephenson
2006-06-14 3:23 ` Vin Shelton
0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2006-06-12 13:07 UTC (permalink / raw)
To: Zsh hackers list
"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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Hang on latest kubuntu linux when built with icc
2006-06-12 13:07 ` Peter Stephenson
@ 2006-06-14 3:23 ` Vin Shelton
0 siblings, 0 replies; 3+ messages in thread
From: Vin Shelton @ 2006-06-14 3:23 UTC (permalink / raw)
To: Peter Stephenson; +Cc: Zsh hackers list
On 6/12/06, Peter Stephenson <pws@csr.com> wrote:
> "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,
Thanks for your help. I'm slightly embarrassed to admit that the
problem was that my system was misconfigured - because I had not added
/opt/intel/compiler/9.0/lib to /etc/ld.so.conf, a dynamic lib could
not be found. I fixed this in the executable by setting
LD_LIBRARY_PATH before running Src/zsh, by I didn't think that this
would affect the configure tests, too. Once I added
/opt/intel/compiler/9.0/lib to /etc/ld.so.conf and re-ran ldconfig,
everything worked fine. Previously, BROKEN POSIX_SIGSUSPEND was set,
and no it is not. Zsh is now working fine.
Thanks,
Vin
--
Whoever you are, no matter how lonely,
the world offers itself to your imagination,
calls to you like the wild geese, harsh and exciting--
over and over announcing your place
in the family of things. Mary Oliver
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-06-14 3:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-11 1:31 Hang on latest kubuntu linux when built with icc Vin Shelton
2006-06-12 13:07 ` Peter Stephenson
2006-06-14 3:23 ` Vin Shelton
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).