[Pvfs2-developers] simple gossip fix
Anthony Tong
atong at ncsa.uiuc.edu
Mon Oct 8 18:14:08 EDT 2007
calling gossip_enable_file() file more than once (eg. by linux
pvfs-client) can fclose() a FILE twice.
turn gossip off in the pvfs-client-core sigsegv handler before
aborting so log message will make it out (if writing to file)
-------------- next part --------------
diff -ur pvfs-2.6.3.orig/src/apps/kernel/linux/pvfs2-client-core.c pvfs-2.6.3/src/apps/kernel/linux/pvfs2-client-core.c
--- pvfs-2.6.3.orig/src/apps/kernel/linux/pvfs2-client-core.c 2007-04-09 09:54:37.000000000 -0500
+++ pvfs-2.6.3/src/apps/kernel/linux/pvfs2-client-core.c 2007-10-08 16:26:54.000000000 -0500
@@ -251,6 +251,7 @@
static void client_segfault_handler(int signum)
{
gossip_err("pvfs2-client-core: caught signal %d\n", signum);
+ gossip_disable();
abort();
}
diff -ur pvfs-2.6.3.orig/src/common/gossip/gossip.c pvfs-2.6.3/src/common/gossip/gossip.c
--- pvfs-2.6.3.orig/src/common/gossip/gossip.c 2007-04-09 09:54:37.000000000 -0500
+++ pvfs-2.6.3/src/common/gossip/gossip.c 2007-10-08 16:48:59.000000000 -0500
@@ -546,7 +546,11 @@
static int gossip_disable_file(
void)
{
- fclose(internal_log_file);
+ if (internal_log_file)
+ {
+ fclose(internal_log_file);
+ internal_log_file = NULL;
+ }
return 0;
}
More information about the Pvfs2-developers
mailing list