Ceph is a distributed object, block, and file storage platform
Go to file
Sage Weil 948f97b3bd msg/simple: clear_pipe when wait() is mopping up pipes
When wait is mopping up connections it may hit one that
is in the process of accepting.  It will unregister it
whilst the accept() thread is trying to set it up,
aborting the accept and getting it reaped.  However,
the pipe mop-up does not clear_pipe() the way that
mark_down(), mark_down_all(), and fault() do, which
leads to this assert.

Pipe is accepting...

  -161> 2016-12-22 17:31:45.460613 37353700 10 -- 172.21.15.14:6804/20738 >> 172.21.15.35:0/146098963 pipe(0x3e2a5c20 sd=31 :6804 s=0 pgs=0 cs=0 l=1 c=0x3e2a6f40).accept:  setting up session_security.
  -160> 2016-12-22 17:31:45.460733 37353700 10 -- 172.21.15.14:6804/20738 >> 172.21.15.35:0/146098963 pipe(0x3e2a5c20 sd=31 :6804 s=0 pgs=0 cs=0 l=1 c=0x3e2a6f40).accept new session
  -159> 2016-12-22 17:31:45.460846 37353700 10 -- 172.21.15.14:6804/20738 >> 172.21.15.35:0/146098963 pipe(0x3e2a5c20 sd=31 :6804 s=2 pgs=7 cs=1 l=1 c=0x3e2a6f40).accept success, connect_seq = 1, sending READY
  -158> 2016-12-22 17:31:45.460959 37353700 10 -- 172.21.15.14:6804/20738 >> 172.21.15.35:0/146098963 pipe(0x3e2a5c20 sd=31 :6804 s=2 pgs=7 cs=1 l=1 c=0x3e2a6f40).accept features 1152921504336314367

wait() is shutting down...

  -156> 2016-12-22 17:31:45.461882 9506ac0 20 -- 172.21.15.14:6804/20738 wait: stopping accepter thread
  -155> 2016-12-22 17:31:45.462994 9506ac0 10 accepter.stop accept listening on: 15
...
  -116> 2016-12-22 17:31:45.482137 9506ac0 10 -- 172.21.15.14:6804/20738 wait: closing pipes
  -115> 2016-12-22 17:31:45.482850 9506ac0 10 -- 172.21.15.14:6804/20738 >> 172.21.15.35:0/146098963 pipe(0x3e2a5c20 sd=31 :6804 s=2 pgs=7 cs=1 l=1 c=0x3e2a6f40).unregister_pipe
  -114> 2016-12-22 17:31:45.483421 9506ac0 10 -- 172.21.15.14:6804/20738 >> 172.21.15.35:0/146098963 pipe(0x3e2a5c20 sd=31 :6804 s=2 pgs=7 cs=1 l=1 c=0x3e2a6f40).stop

...which interrupts the accept()...

  -113> 2016-12-22 17:31:45.484164 37353700 10 -- 172.21.15.14:6804/20738 >> 172.21.15.35:0/146098963 pipe(0x3e2a5c20 sd=31 :6804 s=4 pgs=7 cs=1 l=1 c=0x3e2a6f40).accept fault after register

and makes accept() return failure, and reader() to exit
and reap...

  -110> 2016-12-22 17:31:45.486103 9506ac0 10 -- 172.21.15.14:6804/20738 wait: waiting for pipes 0x3e2a5c20 to close
  -109> 2016-12-22 17:31:45.487146 37353700 10 -- 172.21.15.14:6804/20738 queue_reap 0x3e2a5c20
  -108> 2016-12-22 17:31:45.487658 9506ac0 10 -- 172.21.15.14:6804/20738 reaper
  -107> 2016-12-22 17:31:45.487722 9506ac0 10 -- 172.21.15.14:6804/20738 reaper reaping pipe 0x3e2a5c20 172.21.15.35:0/146098963
  -106> 2016-12-22 17:31:45.487816 9506ac0 10 -- 172.21.15.14:6804/20738 >> 172.21.15.35:0/146098963 pipe(0x3e2a5c20 sd=31 :6804 s=4 pgs=7 cs=1 l=1 c=0x3e2a6f40).discard_queue
  -105> 2016-12-22 17:31:45.494742 37353700 10 -- 172.21.15.14:6804/20738 >> 172.21.15.35:0/146098963 pipe(0x3e2a5c20 sd=31 :6804 s=4 pgs=7 cs=1 l=1 c=0x3e2a6f40).reader done
...
   -92> 2016-12-22 17:31:45.527589 9506ac0 -1 /mnt/jenkins/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos7/DIST/centos7/MACHINE_SIZE/huge/release/11.1.0-6151-ge1781dd/rpm/el7/BUILD/ceph-11.1.0-6151-ge1781dd/src/msg/simple/SimpleMessenger.cc: In function 'void SimpleMessenger::reaper()' thread 9506ac0 time 2016-12-22 17:31:45.488264
/mnt/jenkins/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos7/DIST/centos7/MACHINE_SIZE/huge/release/11.1.0-6151-ge1781dd/rpm/el7/BUILD/ceph-11.1.0-6151-ge1781dd/src/msg/simple/SimpleMessenger.cc: 235: FAILED assert(!cleared)

Fixes: http://tracker.ceph.com/issues/15784
Signed-off-by: Sage Weil <sage@redhat.com>
2016-12-22 17:18:11 -05:00
admin doc: add doc for pybind of rgw 2016-11-09 21:07:29 +08:00
bin git-archive-all.sh: use an actually unique tmp dir 2016-11-15 19:45:02 -08:00
ceph-erasure-code-corpus@2d7d78b9cc tests: erasure-code: add k=2, m=2 for isa & jerasure 2016-12-08 12:44:21 +01:00
ceph-object-corpus@47fbf8c6ae
cmake/modules embedded: Add a skeleton libcephd library 2016-11-28 23:48:02 -08:00
debian Merge pull request #11542 from batrick/systemd-ceph-fuse 2016-12-14 13:55:33 +00:00
doc doc: typo fix in s3_compliance 2016-12-21 14:54:40 +08:00
etc
examples
fusetrace
keys
man doc/man: avoid file builtin to solve build error 2016-11-15 09:00:01 -05:00
mirroring
qa Merge pull request #12587 from yuriw/wip-fix-subset-script-master 2016-12-20 18:47:39 -05:00
selinux selinux: Allow ceph to manage tmp files 2016-09-29 15:02:23 +02:00
share ceph-post-file: migrate to RSA SSH keys 2016-08-22 10:27:36 -04:00
src msg/simple: clear_pipe when wait() is mopping up pipes 2016-12-22 17:18:11 -05:00
systemd Fix startup of Ceph cluster manager daemon on Debian 8 2016-12-18 18:07:21 +05:00
udev Merge pull request #10135 from david-z/wip-enhance-ceph-disk-bluestore 2016-09-22 18:13:00 +02:00
.gitignore move ceph-qa-suite dirs into qa/ 2016-12-14 11:29:55 -06:00
.gitmodule_mirrors
.gitmodules update dpdk submodule to ceph/dpdk 2016-11-09 11:39:20 +08:00
.mailmap mailmap: change personal info 2016-12-05 11:01:12 +08:00
.organizationmap mailmap: change personal info 2016-12-05 11:01:12 +08:00
.peoplemap
AUTHORS
ceph.spec.in Merge pull request #11542 from batrick/systemd-ceph-fuse 2016-12-14 13:55:33 +00:00
ChangeLog
CMakeLists.txt 11.1.0 2016-12-12 18:27:56 +00:00
CodingStyle
CONTRIBUTING.rst
COPYING
COPYING-GPL2
COPYING-LGPL2.1
do_cmake.sh do_cmake.sh: set BOOST_J to $(nproc) 2016-11-07 15:56:53 -05:00
do_freebsd.sh Cmake/FreeBSD: use the SYSTEM_BOOST 2016-12-02 11:11:57 +01:00
doc_deps.deb.txt
Doxyfile
INSTALL
install-deps.sh install-deps.sh: JQ is needed in one script 2016-11-19 20:10:51 +01:00
make-debs.sh make-debs.sh: use make-dist 2016-10-03 09:46:50 -04:00
make-dist make-dist: do not use make_version (and remove it) 2016-10-31 10:10:47 -04:00
make-srpm.sh make-srpm.sh: A simple script to make the srpm for ceph. 2016-09-13 09:51:35 -04:00
NEWS
PendingReleaseNotes osd: Increase priority for inactive PGs backfill 2016-12-09 13:30:11 +01:00
pom.xml
README move ceph-qa-suite dirs into qa/ 2016-12-14 11:29:55 -06:00
README.aix
README.FreeBSD README.FreeBSD: update to match the bimonthly FreeBSD status report 2016-10-12 18:07:43 +02:00
README.md README: hint at where to look to diagnose test failures 2016-11-10 14:43:41 -08:00
README.solaris
README.xio
run-make-check.sh tests: check hostname --fqdn sanity before running make check 2016-12-03 23:37:08 +01:00
SubmittingPatches.rst doc: remove ending period in section titles 2016-10-26 17:53:22 +08:00

============================================ Ceph - a scalable distributed storage system

Please see http://ceph.com/ for current info.

Contributing Code

Most of Ceph is licensed under the LGPL version 2.1. Some miscellaneous code is under BSD-style license or is public domain. The documentation is licensed under Creative Commons Attribution-ShareAlike (CC BY-SA). There are a handful of headers included here that are licensed under the GPL. Please see the file COPYING for a full inventory of licenses by file.

Code contributions must include a valid "Signed-off-by" acknowledging the license for the modified or contributed file. Please see the file SubmittingPatches.rst for details on what that means and on how to generate and submit patches.

We do not require assignment of copyright to contribute code; code is contributed under the terms of the applicable license.

Checking out the source

You can clone from github with

git clone git@github.com:ceph/ceph

or, if you are not a github user,

git clone git://github.com/ceph/ceph

Ceph contains many git submodules that need to be checked out with

git submodule update --init --recursive

Build Prerequisites

The list of Debian or RPM packages dependencies can be installed with:

./install-deps.sh

Building Ceph

Note that these instructions are meant for developers who are compiling the code for development and testing. To build binaries suitable for installation we recommend you build deb or rpm packages, or refer to the ceph.spec.in or debian/rules to see which configuration options are specified for production builds.

Prerequisite: CMake 2.8.11

Build instructions:

./do_cmake.sh
cd build
make

This assumes you make your build dir a subdirectory of the ceph.git checkout. If you put it elsewhere, just replace .. above with a correct path to the checkout.

To build only certain targets use:

    make [target name]

To install:

    make install

CMake Options

If you run the cmake command by hand, there are many options you can set with "-D". For example the option to build the RADOS Gateway is defaulted to ON. To build without the RADOS Gateway:

    cmake -DWITH_RADOSGW=OFF [path to top level ceph directory]

Another example below is building with debugging and alternate locations for a couple of external dependencies:

    cmake -DLEVELDB_PREFIX="/opt/hyperleveldb" -DOFED_PREFIX="/opt/ofed" \
    -DCMAKE_INSTALL_PREFIX=/opt/accelio -DCMAKE_C_FLAGS="-O0 -g3 -gdwarf-4" \
    ..

To view an exhaustive list of -D options, you can invoke cmake with:

    cmake -LH

If you often pipe make to less and would like to maintain the diagnostic colors for errors and warnings (and if your compiler supports it), you can invoke cmake with:

    cmake -DDIAGNOSTICS_COLOR=always ..

Then you'll get the diagnostic colors when you execute:

    make | less -R

Other available values for 'DIAGNOSTICS_COLOR' are 'auto' (default) and 'never'.

Building a source tarball

To build a complete source tarball with everything needed to build from source and/or build a (deb or rpm) package, run

./make-dist

This will create a tarball like ceph-$version.tar.bz2 from git. (Ensure that any changes you want to include in your working directory are committed to git.)

Running a test cluster

To run a functional test cluster,

cd build
make vstart        # builds just enough to run vstart
../src/vstart.sh -d -n -x -l
./bin/ceph -s

Almost all of the usual commands are available in the bin/ directory. For example,

./bin/rados -p rbd bench 30 write
./bin/rbd create foo --size 1000

To shut down the test cluster,

../src/stop.sh

To start or stop individual daemons, the sysvinit script can be used:

./bin/init-ceph restart osd.0
./bin/init-ceph stop

Running unit tests

To build and run all tests (in parallel using all processors), use ctest:

cd build
make
ctest -j$(nproc)

(Note: Many targets built from src/test are not run using ctest. Targets starting with "unittest" are run in make check and thus can be run with ctest. Targets starting with "ceph_test" can not, and should be run by hand.)

When failures occur, look in build/Testing/Temporary for logs.

To build and run all tests and their dependencies without other unnecessary targets in Ceph:

    cd build
    make check -j$(nproc)

To run an individual test manually, run ctest with -R (regex matching):

ctest -R [regex matching test name(s)]

(Note: ctest does not build the test it's running or the dependencies needed to run it)

To run an individual test manually and see all the tests output, run ctest with the -V (verbose) flag:

ctest -V -R [regex matching test name(s)]

To run an tests manually and run the jobs in parallel, run ctest with the -j flag:

ctest -j [number of jobs]

There are many other flags you can give ctest for better control over manual test execution. To view these options run:

man ctest

Building the Documentation

Prerequisites

The list of package dependencies for building the documentation can be found in doc_deps.deb.txt:

sudo apt-get install `cat doc_deps.deb.txt`

Building the Documentation

To build the documentation, ensure that you are in the top-level `/ceph directory, and execute the build script. For example:

admin/build-doc