From redhat-linux-cluster Wed Jan 10 16:08:10 2007 From: Simone Gotti Date: Wed, 10 Jan 2007 16:08:10 +0000 To: redhat-linux-cluster Subject: [Linux-cluster] [PATCH] qdisk: fix crash or wrong behavior if Message-Id: <1168445290.4361.24.camel () localhost> X-MARC-Message: https://marc.info/?l=redhat-linux-cluster&m=116844530830730 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--=-LNghy5eNzIH7UzRmaNYO" --=-LNghy5eNzIH7UzRmaNYO Content-Type: text/plain Content-Transfer-Encoding: 7bit In qdisk/main.c:read_node_blocks if the call to "qdisk_read" returns an error, the cycle isn't interrupted and the call swab_status_block_t will make qdiskd crash or report bad node id, master status etc.... This will probably (not reproduced) cause strange behavior like this node trying to kill the others that are working correctly. I putted a "continue" to skip the cycle after the error. As if nothing about the node can be read it's better to not change the current informations. I hope the patch is correct. Thanks. Bye! ============================================================================= [2725] warning: Error reading node ID block 1 [2725] warning: Error reading node ID block 2 [2725] warning: Error reading node ID block 3 [2725] warning: Error reading node ID block 4 [2725] warning: Error reading node ID block 5 [2725] warning: Error reading node ID block 6 [2725] warning: Error reading node ID block 7 [2725] warning: Error reading node ID block 8 [2725] warning: Error reading node ID block 9 [2725] warning: Error reading node ID block 10 [2725] warning: Error reading node ID block 11 [2725] warning: Error reading node ID block 12 [2725] warning: Error reading node ID block 13 [2725] warning: Error reading node ID block 14 [2725] warning: Error reading node ID block 15 [2725] warning: Error reading node ID block 16 [2725] debug: Node 16777216 is UP [2725] crit: A master exists, but it's not me?! diskRawWriteShadow: Input/output error diskRawWriteShadow: aligned write returned -1, not 512 diskRawWriteShadow: Input/output error Error writing node ID block 1 [2725] err: Error writing to quorum disk Node ID: 1 Score (current / min req. / max allowed): 1 / 1 / 1 Current state: Master Current disk state: None Visible Set: { 16777216 } Master Node ID: 16777216 Quorate Set: { 16777216 33554432 50331648 67108864 83886080 100663296 117440512 134217728 150994944 167772160 184549376 201326592 218103808 234881024 251658240 268435456 } [2725] warning: Error reading node ID block 1 [2725] warning: Error reading node ID block 2 [2725] warning: Error reading node ID block 3 [2725] warning: Error reading node ID block 4 [2725] warning: Error reading node ID block 5 [2725] warning: Error reading node ID block 6 [2725] warning: Error reading node ID block 7 [2725] warning: Error reading node ID block 8 [2725] warning: Error reading node ID block 9 [2725] warning: Error reading node ID block 10 [2725] warning: Error reading node ID block 11 [2725] warning: Error reading node ID block 12 [2725] warning: Error reading node ID block 13 [2725] warning: Error reading node ID block 14 [2725] warning: Error reading node ID block 15 [2725] warning: Error reading node ID block 16 [2725] info: Node 1 is the master [2725] crit: Critical Error: More than one master found! diskRawWriteShadow: Input/output error diskRawWriteShadow: aligned write returned -1, not 512 diskRawWriteShadow: Input/output error Error writing node ID block 1 [2725] err: Error writing to quorum disk Node ID: 1 Score (current / min req. / max allowed): 1 / 1 / 1 Current state: Master Current disk state: None Visible Set: { 1 } Master Node ID: 1 Quorate Set: { 1 } [2725] warning: Error reading node ID block 1 [2725] warning: Error reading node ID block 2 [2725] warning: Error reading node ID block 3 [2725] warning: Error reading node ID block 4 [2725] warning: Error reading node ID block 5 [2725] warning: Error reading node ID block 6 [2725] warning: Error reading node ID block 7 [2725] warning: Error reading node ID block 8 [2725] warning: Error reading node ID block 9 [2725] warning: Error reading node ID block 10 [2725] warning: Error reading node ID block 11 [2725] warning: Error reading node ID block 12 [2725] warning: Error reading node ID block 13 [2725] warning: Error reading node ID block 14 [2725] warning: Error reading node ID block 15 [2725] warning: Error reading node ID block 16 [2725] crit: A master exists, but it's not me?! diskRawWriteShadow: Input/output error diskRawWriteShadow: aligned write returned -1, not 512 diskRawWriteShadow: Input/output error Error writing node ID block 1 [2725] err: Error writing to quorum disk Node ID: 1 Score (current / min req. / max allowed): 1 / 1 / 1 Current state: Master Current disk state: None Visible Set: { 16777216 } Master Node ID: 16777216 Quorate Set: { 16777216 33554432 50331648 67108864 83886080 100663296 117440512 134217728 150994944 167772160 184549376 201326592 218103808 234881024 251658240 268435456 } [2725] warning: Error reading node ID block 1 [2725] warning: Error reading node ID block 2 [2725] warning: Error reading node ID block 3 [2725] warning: Error reading node ID block 4 [2725] warning: Error reading node ID block 5 [2725] warning: Error reading node ID block 6 [2725] warning: Error reading node ID block 7 [2725] warning: Error reading node ID block 8 [2725] warning: Error reading node ID block 9 [2725] warning: Error reading node ID block 10 [2725] warning: Error reading node ID block 11 [2725] warning: Error reading node ID block 12 [2725] warning: Error reading node ID block 13 [2725] warning: Error reading node ID block 14 [2725] warning: Error reading node ID block 15 [2725] warning: Error reading node ID block 16 [2725] crit: Critical Error: More than one master found! diskRawWriteShadow: Input/output error diskRawWriteShadow: aligned write returned -1, not 512 diskRawWriteShadow: Input/output error Error writing node ID block 1 [2725] err: Error writing to quorum disk Node ID: 1 Score (current / min req. / max allowed): 1 / 1 / 1 Current state: Master Current disk state: None Visible Set: { 1 } Master Node ID: 1 Quorate Set: { 1 } [2725] warning: Error reading node ID block 1 [2725] warning: Error reading node ID block 2 [2725] warning: Error reading node ID block 3 [2725] warning: Error reading node ID block 4 [2725] warning: Error reading node ID block 5 [2725] warning: Error reading node ID block 6 [2725] warning: Error reading node ID block 7 [2725] warning: Error reading node ID block 8 [2725] warning: Error reading node ID block 9 [2725] warning: Error reading node ID block 10 [2725] warning: Error reading node ID block 11 [2725] warning: Error reading node ID block 12 [2725] warning: Error reading node ID block 13 [2725] warning: Error reading node ID block 14 [2725] warning: Error reading node ID block 15 [2725] warning: Error reading node ID block 16 [2725] crit: A master exists, but it's not me?! diskRawWriteShadow: Input/output error diskRawWriteShadow: aligned write returned -1, not 512 diskRawWriteShadow: Input/output error Error writing node ID block 1 [2725] err: Error writing to quorum disk Node ID: 1 Score (current / min req. / max allowed): 1 / 1 / 1 Current state: Master Current disk state: None Visible Set: { 16777216 } Master Node ID: 16777216 Quorate Set: { 16777216 33554432 50331648 67108864 83886080 100663296 117440512 134217728 150994944 167772160 184549376 201326592 218103808 234881024 251658240 268435456 } -- Simone Gotti -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Refill s.r.l. - Prodotti per TUTTE le stampanti sul mercato a prezzi sempre convenienti. Dal 1993, leader nel compatibile di qualità in Italia. Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5188&d=10-1 --=-LNghy5eNzIH7UzRmaNYO Content-Disposition: attachment; filename*0=cman-2.0.35-qdisk-read_node_blocks-continue-on-disk-error.pat; filename*1=ch Content-Type: text/x-patch; name=cman-2.0.35-qdisk-read_node_blocks-continue-on-disk-error.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit diff -r -u -p cman-2.0.35.orig/cman/qdisk/main.c cman-2.0.35.patched/cman/qdisk/main.c --- cman-2.0.35.orig/cman/qdisk/main.c 2006-10-03 20:06:40.000000000 +0200 +++ cman-2.0.35.patched/cman/qdisk/main.c 2007-01-10 16:35:55.000000000 +0100 @@ -135,6 +135,7 @@ read_node_blocks(qd_ctx *ctx, node_info_ sb, sizeof(*sb)) < 0) { clulog(LOG_WARNING,"Error reading node ID block %d\n", x+1); + continue; } swab_status_block_t(sb); --=-LNghy5eNzIH7UzRmaNYO Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- Linux-cluster mailing list Linux-cluster@redhat.com https://www.redhat.com/mailman/listinfo/linux-cluster --=-LNghy5eNzIH7UzRmaNYO--