All of lore.kernel.org
 help / color / mirror / Atom feed
* cmds segfault on pdj-fstest (ceph.git unstable)
@ 2010-06-09  6:48 Thomas Mueller
  2010-06-10  9:51 ` Thomas Mueller
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Mueller @ 2010-06-09  6:48 UTC (permalink / raw)
  To: ceph-devel

hi 

since this morning cmds segfaults on the pdj-fstest. 
(git rev 12798de37169f6561f0dc7643ca626957f7ab37e)

What happend:
<start server with vstart.sh>
<mount>
08:39:08 [  176.460708] ceph: loaded (mon/mds/osd proto 15/32/24, osdmap 5/5 5/5)
08:39:08 [  176.463965] ceph: client4101 fsid a7b6294d-a074-8e0e-2cee-a48fe2f85c86
08:39:08 [  176.464240] ceph: mon1 127.0.0.1:6789 session established
<start pdj-fstest>
08:40:51 [  279.406980] cmds[6675]: segfault at 0 ip 00000000004bddbd sp 00007f6861ba34e0 error 4 in cmds[400000+331000]
08:40:51 [  279.409895] ceph: mds0 127.0.0.1:6802 socket closed
08:40:51 [  279.804386] ceph: mds0 127.0.0.1:6802 connection failed
08:40:52 [  280.804383] ceph: mds0 127.0.0.1:6802 connection failed
08:40:54 [  282.804381] ceph: mds0 127.0.0.1:6802 connection failed
08:40:58 [  286.804387] ceph: mds0 127.0.0.1:6802 connection failed
08:41:06 [  294.804793] ceph: mds0 127.0.0.1:6802 connection failed
<killed pdj-fstest>
08:41:22 [  310.804820] ceph: mds0 127.0.0.1:6802 connection failed
08:41:38 [  326.804288] ceph: mds0 caps stale
08:41:53 [  341.804327] ceph: mds0 caps stale
08:41:54 [  342.804245] ceph: mds0 127.0.0.1:6802 connection failed


the segfault is reproducable on my machine. yesterday 
(git rev  58fe4b8d5441982d0103817666a6d1bfdd8e04cd) this error was not present.


- Thomas


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: cmds segfault on pdj-fstest (ceph.git unstable)
  2010-06-09  6:48 cmds segfault on pdj-fstest (ceph.git unstable) Thomas Mueller
@ 2010-06-10  9:51 ` Thomas Mueller
  2010-06-10 11:38   ` Henry C Chang
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Mueller @ 2010-06-10  9:51 UTC (permalink / raw)
  To: ceph-devel

Am Wed, 09 Jun 2010 06:48:58 +0000 schrieb Thomas Mueller:

> hi
> 
> since this morning cmds segfaults on the pdj-fstest. (git rev
> 12798de37169f6561f0dc7643ca626957f7ab37e)
...
> 
> the segfault is reproducable on my machine. yesterday (git rev 
> 58fe4b8d5441982d0103817666a6d1bfdd8e04cd) this error was not present.
> 
> 
> - Thomas

tried to track down where that segfault comes from - with "git bisect" 
(my first git bisect try)

the output after a while:

2a88e2e54ee0b9449e86cec02315e2809b75ca8b is the first bad commit
commit 2a88e2e54ee0b9449e86cec02315e2809b75ca8b
Author: Greg Farnum <gregf@hq.newdream.net>
Date:   Mon Jun 7 10:04:33 2010 -0700

    add checks for being a snapshot root to dir_is_nonempty

:040000 040000 6c45c68b84800b105299133374f0f91d82948659 2c1b290125ae435679ab29d6fbab7f5b8f81e4b9 M	src


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: cmds segfault on pdj-fstest (ceph.git unstable)
  2010-06-10  9:51 ` Thomas Mueller
@ 2010-06-10 11:38   ` Henry C Chang
  2010-06-10 16:11     ` Gregory Farnum
  0 siblings, 1 reply; 6+ messages in thread
From: Henry C Chang @ 2010-06-10 11:38 UTC (permalink / raw)
  To: Thomas Mueller; +Cc: ceph-devel

>
>    add checks for being a snapshot root to dir_is_nonempty
>
> :040000 040000 6c45c68b84800b105299133374f0f91d82948659 2c1b290125ae435679ab29d6fbab7f5b8f81e4b9 M      src
>

I also got this segfault today. The segfault is caused by:
_dir_is_nonempty() has already done reply_request(), but the caller,
handle_client_unlink(), did it again.

I suggest to move out reply_request() from _dir_is_nonempty(), and
leave it to the caller.
Maybe as below:

Henry


===========================================
diff --git a/src/mds/Server.cc b/src/mds/Server.cc
index 29d0a32..4a90f4e 100644
--- a/src/mds/Server.cc
+++ b/src/mds/Server.cc
@@ -3976,7 +3976,6 @@ bool Server::_dir_is_nonempty(MDRequest *mdr, CInode *in)
               << dir->inode->get_projected_inode()->dirstat.size()
               << " on " << *dir->inode
               << dendl;
-      reply_request(mdr, -ENOTEMPTY);
       return true;
     }

@@ -4070,8 +4069,10 @@ void Server::handle_client_rename(MDRequest *mdr)
     }

     // non-empty dir?
-    if (oldin->is_dir() && _dir_is_nonempty(mdr, oldin))
+    if (oldin->is_dir() && _dir_is_nonempty(mdr, oldin)) {
+      reply_request(mdr, -ENOTEMPTY);
       return;
+    }
   }

   // -- some sanity checks --

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: cmds segfault on pdj-fstest (ceph.git unstable)
  2010-06-10 11:38   ` Henry C Chang
@ 2010-06-10 16:11     ` Gregory Farnum
  2010-06-10 16:26       ` Gregory Farnum
  0 siblings, 1 reply; 6+ messages in thread
From: Gregory Farnum @ 2010-06-10 16:11 UTC (permalink / raw)
  To: Henry C Chang; +Cc: Thomas Mueller, ceph-devel

Thanks guys, fixed in 8be5b029d6dc4c5a1b6314eebf026907ccaf811a and
673fdc7aa29adb0826ad71b7c8faf32e1480267b.
(Would've just pushed yours, Harry, but I didn't see it in time -- sorry!)
-Greg

On Thu, Jun 10, 2010 at 4:38 AM, Henry C Chang
<henry_c_chang@tcloudcomputing.com> wrote:
>>
>>    add checks for being a snapshot root to dir_is_nonempty
>>
>> :040000 040000 6c45c68b84800b105299133374f0f91d82948659 2c1b290125ae435679ab29d6fbab7f5b8f81e4b9 M      src
>>
>
> I also got this segfault today. The segfault is caused by:
> _dir_is_nonempty() has already done reply_request(), but the caller,
> handle_client_unlink(), did it again.
>
> I suggest to move out reply_request() from _dir_is_nonempty(), and
> leave it to the caller.
> Maybe as below:
>
> Henry
>
>
> ===========================================
> diff --git a/src/mds/Server.cc b/src/mds/Server.cc
> index 29d0a32..4a90f4e 100644
> --- a/src/mds/Server.cc
> +++ b/src/mds/Server.cc
> @@ -3976,7 +3976,6 @@ bool Server::_dir_is_nonempty(MDRequest *mdr, CInode *in)
>               << dir->inode->get_projected_inode()->dirstat.size()
>               << " on " << *dir->inode
>               << dendl;
> -      reply_request(mdr, -ENOTEMPTY);
>       return true;
>     }
>
> @@ -4070,8 +4069,10 @@ void Server::handle_client_rename(MDRequest *mdr)
>     }
>
>     // non-empty dir?
> -    if (oldin->is_dir() && _dir_is_nonempty(mdr, oldin))
> +    if (oldin->is_dir() && _dir_is_nonempty(mdr, oldin)) {
> +      reply_request(mdr, -ENOTEMPTY);
>       return;
> +    }
>   }
>
>   // -- some sanity checks --
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: cmds segfault on pdj-fstest (ceph.git unstable)
  2010-06-10 16:11     ` Gregory Farnum
@ 2010-06-10 16:26       ` Gregory Farnum
  2010-06-11  2:17         ` Henry C Chang
  0 siblings, 1 reply; 6+ messages in thread
From: Gregory Farnum @ 2010-06-10 16:26 UTC (permalink / raw)
  To: Henry C Chang; +Cc: Thomas Mueller, ceph-devel

On Thu, Jun 10, 2010 at 9:11 AM, Gregory Farnum <gregf@hq.newdream.net> wrote:
> (Would've just pushed yours, Harry, but I didn't see it in time -- sorry!)
Apparently I can't do anything right this morning -- sorry twice, Henry!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: cmds segfault on pdj-fstest (ceph.git unstable)
  2010-06-10 16:26       ` Gregory Farnum
@ 2010-06-11  2:17         ` Henry C Chang
  0 siblings, 0 replies; 6+ messages in thread
From: Henry C Chang @ 2010-06-11  2:17 UTC (permalink / raw)
  To: Gregory Farnum; +Cc: Thomas Mueller, ceph-devel

On Fri, Jun 11, 2010 at 12:26 AM, Gregory Farnum <gregf@hq.newdream.net> wrote:
> On Thu, Jun 10, 2010 at 9:11 AM, Gregory Farnum <gregf@hq.newdream.net> wrote:
>> (Would've just pushed yours, Harry, but I didn't see it in time -- sorry!)
> Apparently I can't do anything right this morning -- sorry twice, Henry!
>

No problem! Never mind. :)

Henry

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-06-11  2:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-09  6:48 cmds segfault on pdj-fstest (ceph.git unstable) Thomas Mueller
2010-06-10  9:51 ` Thomas Mueller
2010-06-10 11:38   ` Henry C Chang
2010-06-10 16:11     ` Gregory Farnum
2010-06-10 16:26       ` Gregory Farnum
2010-06-11  2:17         ` Henry C Chang

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.