I noticed a segfault occuring in dbpf-bstream when trove debugging is 
enabled. It's caused by op_p being freed by another thread prior to the 
gossip_debug executing. Patch against head attached.

Michael
--- cvs-head-a/pvfs2/src/io/trove/trove-dbpf/dbpf-bstream.c     2009-10-14 
12:09:41.000000000 -0400
+++ cvs-head-b/pvfs2/src/io/trove/trove-dbpf/dbpf-bstream.c     2010-02-02 
13:14:48.000000000 -0500
@@ -241,17 +241,13 @@
          * the signal'd thread executes before the following gossip_debug 
statement, then cur_op is un-
          * defined, causing the gossip_debug statement to seg fault.  So, we 
check for existence first!
         */
-        if (cur_op)
-        {
-            gossip_debug(GOSSIP_TROVE_DEBUG, "*** starting delayed ops if any "
-                         "(state is %s)\n", 
-                         list_proc_state_strings[
-                         op_p->u.b_rw_list.list_proc_state]);
-        } 
-        else 
-        {
-            gossip_debug(GOSSIP_TROVE_DEBUG,"*** starting delayed ops if any. 
(cur_op undefined).\n");
-        }
+
+        /* if the signal'd thread executes op_p can also go away
+         * causing the list_proc_state access to segfault. there isn't really
+         * much debugging information to be had by accessing cur_op or
+         * op_p, the key is that delayed ops are starting. */
+
+        gossip_debug(GOSSIP_TROVE_DEBUG,"*** starting delayed ops if any.\n");
 
         start_delayed_ops_if_any(1);
     }
_______________________________________________
Pvfs2-developers mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers

Reply via email to