* Re: Signal 18 (CONT) caught by ps (procps-ng version 3.3.9)
@ 2014-01-14 11:33 Craig Small
2014-01-14 12:05 ` Peter Stephenson
0 siblings, 1 reply; 5+ messages in thread
From: Craig Small @ 2014-01-14 11:33 UTC (permalink / raw)
To: zsh-workers
Hi,
One of the procps maintainers here.
Axel Beckert reported the SIGCONT problem into the Debian BTS and I've
now patched ps upstream so it uses the default behaviour for SIGCONT.
https://gitorious.org/procps/procps/commit/d06aaaaf2bd8f3b5f0235e75f4f04c0ad69c7d6d
May take a while to filter through, but this should fix it.
- Craig
--
Craig Small (@smallsees) http://enc.com.au/ csmall at : enc.com.au
Debian GNU/Linux http://www.debian.org/ csmall at : debian.org
GPG fingerprint: 5D2F B320 B825 D939 04D2 0519 3938 F96B DF50 FEA5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Signal 18 (CONT) caught by ps (procps-ng version 3.3.9)
2014-01-14 11:33 Signal 18 (CONT) caught by ps (procps-ng version 3.3.9) Craig Small
@ 2014-01-14 12:05 ` Peter Stephenson
0 siblings, 0 replies; 5+ messages in thread
From: Peter Stephenson @ 2014-01-14 12:05 UTC (permalink / raw)
To: Craig Small, zsh-workers
On Tue, 14 Jan 2014 22:33:26 +1100
Craig Small <csmall@enc.com.au> wrote:
> One of the procps maintainers here.
> Axel Beckert reported the SIGCONT problem into the Debian BTS and I've
> now patched ps upstream so it uses the default behaviour for SIGCONT.
>
> https://gitorious.org/procps/procps/commit/d06aaaaf2bd8f3b5f0235e75f4f04c0ad69c7d6d
>
> May take a while to filter through, but this should fix it.
Thanks for the note --- I think we're happy this is closed from the zsh
point of view in any case.
pws
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Signal 18 (CONT) caught by ps (procps-ng version 3.3.9)
2014-01-12 21:59 Michele Guerini Rocco
2014-01-13 4:00 ` Bart Schaefer
@ 2014-01-13 20:40 ` Axel Beckert
1 sibling, 0 replies; 5+ messages in thread
From: Axel Beckert @ 2014-01-13 20:40 UTC (permalink / raw)
To: zsh-workers; +Cc: Michele Guerini Rocco
Hi,
On Sun, Jan 12, 2014 at 10:59:05PM +0100, Michele Guerini Rocco wrote:
> Executing `ps -ef | wc -l` in a zsh shell script or directly with
> `echo $(ps -ef | wc -l)` will cause this message to appear:
>
> Signal 18 (CONT) caught by ps (procps-ng version 3.3.9).
> ps:display.c:66: please report this bug```
JFTR: "echo `ps | cat`" already suffices.
> This happens only with latest zsh version,
IIRC that happens since one of the 5.0.3 release candidates (i.e.
5.0.2-test-$something), at least since 5.0.3.
> And also it seems to happen only on ARM.
Definitely not only on ARM. I do have it on i386 (x86 32 bit) and
amd64 (x86_64), too, also already with procps 3.3.8.
> I previously opened an issue on ArchLinux ARM repo and they told me
> to report the bug here.
I reported (as more or less requested) against procps-ng in Debian:
http://bugs.debian.org/732410 (and since procps-ng is the "Debian,
Fedora and openSUSE fork of procps" this probably can be considered as
"reported upstream", too. :-)
Kind regards, Axel
--
/~\ Plain Text Ribbon Campaign | Axel Beckert
\ / Say No to HTML in E-Mail and News | abe@deuxchevaux.org (Mail)
X See http://www.nonhtmlmail.org/campaign.html | abe@noone.org (Mail+Jabber)
/ \ I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Signal 18 (CONT) caught by ps (procps-ng version 3.3.9)
2014-01-12 21:59 Michele Guerini Rocco
@ 2014-01-13 4:00 ` Bart Schaefer
2014-01-13 20:40 ` Axel Beckert
1 sibling, 0 replies; 5+ messages in thread
From: Bart Schaefer @ 2014-01-13 4:00 UTC (permalink / raw)
To: Michele Guerini Rocco, zsh-workers
On Jan 12, 10:59pm, Michele Guerini Rocco wrote:
}
} Executing `ps -ef | wc -l` in a zsh shell script or directly with `echo $(ps -ef | wc -l)` will cause this message to appear:
}
} Signal 18 (CONT) caught by ps (procps-ng version 3.3.9).
} ps:display.c:66: please report this bug```
That's rather a strange error message. Why would it be a bug for ps to
get a CONT signal?
There are cases in which zsh sends a CONT signal to a child process that
*could* be in a stopped state without bothering to check first whether
the child actually *is* stopped. This should be a completely harmless
no-op for a child that's already running, and I'd say it's more a bug
in ps for complaining about it than it is a bug in zsh for sending it.
The "extraneous" SIGCONT is at line 285 of Src/jobs.c and "git blame" says
it has been there since 2000-04-01, so there is undoubtedly *some* way to
induce it in any version of zsh you're likely to be able to try; but the
circumstances in which that code is called have changed recently, as we
now try to do a more thorough job of tracking child processes for correct
population the $pipestatus array and avoiding race conditions.
Relevant strace:
% schaefer[602] strace -q -f -e trace=kill,process Src/zsh -fc 'echo "$(ps -ef | wc -l)"'
execve("Src/zsh", ["Src/zsh", "-fc", "echo \"$(ps -ef | wc -l)\""], [/* 34 vars */]) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7eef708) = 9550
[pid 9550] clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7eef708) = 9551
[pid 9550] clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7eef708) = 9552
[pid 9551] execve("/bin/ps", ["ps", "-ef"], [/* 34 vars */] <unfinished ...>
[pid 9552] execve("/usr/bin/wc", ["wc", "-l"], [/* 34 vars */] <unfinished ...>
[pid 9551] <... execve resumed> ) = 0
[pid 9552] <... execve resumed> ) = 0
[pid 9551] exit_group(0) = ?
[pid 9550] --- SIGCHLD (Child exited) @ 0 (0) ---
[pid 9550] wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED|WCONTINUED, {ru_utime={0, 9998}, ru_stime={0, 0}, ...}) = 9551
[pid 9550] wait4(-1, 0xbfeef6c4, WNOHANG|WSTOPPED|WCONTINUED, 0xbfeef64c) = 0
[pid 9550] kill(9551, SIGCONT <unfinished ...>
[pid 9552] exit_group(0) = ?
[pid 9550] <... kill resumed> ) = -1 ESRCH (No such process)
[pid 9550] kill(9552, SIGCONT) = 0
[pid 9550] --- SIGCHLD (Child exited) @ 0 (0) ---
[pid 9550] wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED|WCONTINUED, {ru_utime={0, 0}, ru_stime={0, 9998}, ...}) = 9552
[pid 9550] wait4(-1, 0xbfeef6c4, WNOHANG|WSTOPPED|WCONTINUED, 0xbfeef64c) = -1 ECHILD (No child processes)
[pid 9550] exit_group(0) = ?
kill(9550, SIG_0) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED|WCONTINUED, {ru_utime={0, 9998}, ru_stime={0, 9998}, ...}) = 9550
wait4(-1, 0xbfeefb24, WNOHANG|WSTOPPED|WCONTINUED, 0xbfeefaac) = -1 ECHILD (No child processes)
kill(9550, SIG_0) = -1 ESRCH (No such process)
128
exit_group(0) = ?
--
Barton E. Schaefer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Signal 18 (CONT) caught by ps (procps-ng version 3.3.9)
@ 2014-01-12 21:59 Michele Guerini Rocco
2014-01-13 4:00 ` Bart Schaefer
2014-01-13 20:40 ` Axel Beckert
0 siblings, 2 replies; 5+ messages in thread
From: Michele Guerini Rocco @ 2014-01-12 21:59 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1.1: Type: text/plain, Size: 554 bytes --]
Executing `ps -ef | wc -l` in a zsh shell script or directly with `echo $(ps -ef | wc -l)` will cause this message to appear:
Signal 18 (CONT) caught by ps (procps-ng version 3.3.9).
ps:display.c:66: please report this bug```
`ps -ef | wc -l` works as usual.
This happens only with latest zsh version, not with other shells nor previous zsh versions. And also it seems to happen only on ARM. I previously opened an issue on ArchLinux ARM repo and they told me to report the bug here.
Varsions are:
* zsh 5.0.5-1
* procps-ng 3.3.9-1
[-- Attachment #1.2: Type: text/html, Size: 2278 bytes --]
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-01-14 12:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-14 11:33 Signal 18 (CONT) caught by ps (procps-ng version 3.3.9) Craig Small
2014-01-14 12:05 ` Peter Stephenson
-- strict thread matches above, loose matches on Subject: below --
2014-01-12 21:59 Michele Guerini Rocco
2014-01-13 4:00 ` Bart Schaefer
2014-01-13 20:40 ` Axel Beckert
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).