Applied. C. On Mon, Dec 13, 2010 at 8:38 AM, Colin McCabe <cmccabe@xxxxxxxxxxxxxx> wrote: > Good find! You must have logging turned fairly low, so you never > created/initialized the stream prior to dout_handle_daemonize(). > > Colin > > > 2010/12/13 Vangelis Koukis <vkoukis@xxxxxxxxxxxxxxxxx>: >> Hello, >> >> Starting the MDS from the unstable branch fails instantly with a >> SEGFAULT. The MDS works when started in nodaemon mode, using "-D". >> >> The segfault happens in common/debug.cc:dout_handle_daemonize(), which >> attempts to call _doss->handle_stdout_closed() with _doss being NULL. >> >> The following patch calls _dout_open_log() to initialize _doss >> before accessing it. >> >> Signed-off-by: Vangelis Koukis <vkoukis@xxxxxxxxxxxxxxxxx> >> Signed-off-by: Constantinos Venetsanopoulos <cven@xxxxxxxxxxxxxxxxx> >> --- >> src/common/debug.cc | 5 +++++ >> 1 files changed, 5 insertions(+), 0 deletions(-) >> >> diff --git a/src/common/debug.cc b/src/common/debug.cc >> index 10cd6ce..88780f0 100644 >> --- a/src/common/debug.cc >> +++ b/src/common/debug.cc >> @@ -38,6 +38,11 @@ void _dout_open_log() >> int dout_handle_daemonize() >> { >> Mutex::Locker l(_dout_lock); >> + >> + if (_dout_need_open) >> + _dout_open_log(); >> + >> + assert(_doss); >> _doss->handle_stdout_closed(); >> _doss->handle_stderr_closed(); >> return _doss->handle_pid_change(); >> -- >> 1.7.2.3 >> >> -- >> Vangelis Koukis >> vkoukis@xxxxxxxxxxxxxxxxx >> OpenPGP public key ID: >> pub 1024D/1D038E97 2003-07-13 Vangelis Koukis <vkoukis@xxxxxxxxxxxxxxxxx> >> Key fingerprint = C5CD E02E 2C78 7C10 8A00 53D8 FBFC 3799 1D03 8E97 >> >> Our greatest glory is not in never failing, >> but in rising up every time we fail. >> -- Ralph Waldo Emerson >> >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v1.4.10 (GNU/Linux) >> >> iEYEARECAAYFAk0GIdwACgkQ+/w3mR0DjpfzvQCg+uSs9QhOXKnDeIlMfBsXQY6C >> osEAn2i/HlLopWasTv+g/0lFMzJkWX5Z >> =moAt >> -----END PGP SIGNATURE----- >> >> > -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html