fixed 4G stageout bug
@@ -127,7 +127,8 @@ use constant {
my $TAG = int(rand(10000));
use constant RETRIES => 3;
-use constant CHANNEL_TIMEOUT => 180;
+# increased to avoid timeout on Blue Waters during quiesce events
+use constant CHANNEL_TIMEOUT => 300;
use constant HEARTBEAT_INTERVAL => 60;
use constant MAXFRAGS => 16;
# TODO: Make this configurable (#537)
@@ -570,14 +571,23 @@ sub sockSend {
my ($buf) = @_;
my $start = time();
- my $r = $SOCK->send($buf, 0);
- my $err = $!;
+ my $r;
+ my $err;
+ eval {
+ $r = $SOCK->send($buf, 0);
+ $err = $!; # possibly EPIPE
+ };
+ if ($@) {
+ $err = $@;
+ wlog(DEBUG, "Caught send error: $err\n");
+ }
if (!defined $r) {
if ($err == POSIX::EWOULDBLOCK) {
wlog(TRACE, "Send would block\n");
$r = 0;
}
- elsif ($err == POSIX::EPIPE) {
+ elsif (($err == POSIX::EPIPE) || (index($err, "send: Cannot determine peer address") != -1)) {
+ initiateReconnect();
wlog(INFO, "Broken pipe; trying to re-connect\n");
$CONNECTED = 0;
reconnect();
@@ -738,7 +748,7 @@ sub nextFileData {
}
elsif ($s == PUT_CMD_SENT) {
$$state{"state"} = $s + 1;
- return (0, pack("VV", $$state{"size"}, 0), CONTINUE);
+ return (0, pack("VV", $$state{"size"} & 0xffffffff, $$state{"size"} >> 32), CONTINUE);
}
elsif ($s == PUT_SIZE_SENT) {
$$state{"state"} = $s + 1;
