All of lore.kernel.org
 help / color / mirror / Atom feed
From: Loic Dachary <loic@dachary.org>
To: Ceph Development <ceph-devel@vger.kernel.org>
Subject: Can pid be reused ?
Date: Tue, 21 Oct 2014 19:55:34 -0700	[thread overview]
Message-ID: <54471CA6.5040807@dachary.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 3866 bytes --]

Hi,

Something strange happens on fedora20 with linux 3.11.10-301.fc20.x86_64. Running make -j8 check on https://github.com/ceph/ceph/pull/2750 a process gets killed from time to time. For instance it shows as

TEST_erasure_crush_stripe_width: 124: stripe_width=4096
TEST_erasure_crush_stripe_width: 125: ./ceph osd pool create pool_erasure 12 12 erasure
*** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH ***
./test/mon/osd-pool-create.sh: line 120: 27557 Killed                  ./ceph osd pool create pool_erasure 12 12 erasure
TEST_erasure_crush_stripe_width: 126: ./ceph --format json osd dump
TEST_erasure_crush_stripe_width: 126: tee osd-pool-create/osd.json

in the test logs. Note the 27557 Killed . I originally thought it was because some ulimit was crossed and set them to very generous / unlimited hard / soft thresholds.

core file size          (blocks, -c) 0                                                                                     
data seg size           (kbytes, -d) unlimited                                                                             
scheduling priority             (-e) 0                                                                                     
file size               (blocks, -f) unlimited                                                                             
pending signals                 (-i) 515069                                                                                
max locked memory       (kbytes, -l) unlimited                                                                             
max memory size         (kbytes, -m) unlimited                                                                             
open files                      (-n) 400000                                                                                
pipe size            (512 bytes, -p) 8                                                                                     
POSIX message queues     (bytes, -q) 819200                                                                                
real-time priority              (-r) 0                                                                                     
stack size              (kbytes, -s) unlimited                                                                             
cpu time               (seconds, -t) unlimited                                                                             
max user processes              (-u) unlimited                                                                             
virtual memory          (kbytes, -v) unlimited                                                                             
file locks                      (-x) unlimited    

Benoit Canet suggested that I installed systemtap ( https://www.sourceware.org/systemtap/wiki/SystemtapOnFedora ) and ran https://sourceware.org/systemtap/examples/process/sigkill.stp to watch what was sending the kill signal. It showed the following:

...
SIGKILL was sent to ceph-osd (pid:27557) by vstart_wrapper. uid:1001
SIGKILL was sent to python (pid:27557) by vstart_wrapper. uid:1001
....

which suggests that pid 27557 used by ceph-osd was reused for the python script that was killed above. Because the script that kills daemons is very agressive and kill -9 the pid to check if it really is dead

https://github.com/ceph/ceph/blob/giant/src/test/mon/mon-test-helpers.sh#L64

it explains the problem.

However, as Dan Mick suggests, reusing pid quickly could break a number of things and it is a surprising behavior. Maybe something else is going on. A loop creating processes sees their pid increasing and not being reused.

Any idea about what is going on would be much appreciated :-)

Cheers

-- 
Loïc Dachary, Artisan Logiciel Libre



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

             reply	other threads:[~2014-10-22  2:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-22  2:55 Loic Dachary [this message]
2014-10-22 22:21 ` Can pid be reused ? David Zafman
2014-10-22 22:43   ` Sage Weil
2014-10-22 22:51     ` David Zafman
2014-10-22 22:57       ` Loic Dachary
2014-10-22 22:46   ` Loic Dachary

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=54471CA6.5040807@dachary.org \
    --to=loic@dachary.org \
    --cc=ceph-devel@vger.kernel.org \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.