dmlb2000 pushed to torque (master). "Add torque-rhbz#758740-r5258-dis-close.patch and (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Wed Apr 8 03:57:31 UTC 2015


>From 44081f771043381194bb0dfaa635305925ad05ac Mon Sep 17 00:00:00 2001
From: Steve Traylen <steve.traylen at cern.ch>
Date: Wed, 30 Nov 2011 19:19:35 +0100
Subject: Add torque-rhbz#758740-r5258-dis-close.patch and
 torque-rhbz#758740-r5270-dis-array.patch


diff --git a/torque-rhbz#758740-r5258-dis-close.patch b/torque-rhbz#758740-r5258-dis-close.patch
new file mode 100644
index 0000000..6313088
--- /dev/null
+++ b/torque-rhbz#758740-r5258-dis-close.patch
@@ -0,0 +1,124 @@
++  e - Added a new function DIS_tcp_close to the the code. This takes care of a problem
++      where TORQUE memory keeps growing because the read and write buffers associated
++      with each tcparray entry would grow to accommodate incoming and outgoing data
++      but would not shrink.
+ 
+Index: src/include/dis.h
+===================================================================
+--- src/include/dis.h	(revision 5257)
++++ src/include/dis.h	(revision 5258)
+@@ -238,13 +238,15 @@
+ 
+ /* the following routines set/control DIS over tcp */
+ 
+-extern void DIS_tcp_reset (int fd, int rw);
+-extern void DIS_tcp_setup (int fd);
+-extern int  DIS_tcp_wflush (int fd);
+-extern void DIS_tcp_settimeout (long timeout);
+-extern int  DIS_tcp_istimeout (int fd);
++void DIS_tcp_reset (int fd, int rw);
++void DIS_tcp_setup (int fd);
++int  DIS_tcp_wflush (int fd);
++void DIS_tcp_settimeout (long timeout);
++int  DIS_tcp_istimeout (int fd);
++void DIS_tcp_close (int fd);
+ 
+ 
++
+ extern int  PConnTimeout(int);
+ 
+ /* NOTE:  increase THE_BUF_SIZE to 131072 for systems > 5k nodes */
+Index: src/lib/Libattr/attr_fn_arst.c
+===================================================================
+--- src/lib/Libattr/attr_fn_arst.c	(revision 5257)
++++ src/lib/Libattr/attr_fn_arst.c	(revision 5258)
+@@ -186,13 +186,14 @@
+ 
+   bksize = (ns - 1) * sizeof(char *) + sizeof(struct array_strings);
+ 
+-  if ((stp = (struct array_strings *)malloc(bksize)) == NULL)
++  if (( patr->at_val.at_arst = (struct array_strings *)malloc(bksize)) == NULL)
+     {
+     /* FAILURE */
+ 
+     return(PBSE_SYSTEM);
+     }
+ 
++  stp = patr->at_val.at_arst;
+   memset(stp, 0, bksize);
+ 
+   stp->as_npointers = ns;
+@@ -238,7 +239,7 @@
+ 
+   patr->at_flags |= ATR_VFLAG_SET | ATR_VFLAG_MODIFY;
+ 
+-  patr->at_val.at_arst = stp;
++/*  patr->at_val.at_arst = stp;*/
+ 
+   free(tmpval);
+  
+Index: src/lib/Libifl/tcp_dis.c
+===================================================================
+--- src/lib/Libifl/tcp_dis.c	(revision 5257)
++++ src/lib/Libifl/tcp_dis.c	(revision 5258)
+@@ -790,9 +790,30 @@
+   return;
+   }
+ 
++void DIS_tcp_close(
+ 
++  int fd)
+ 
++  {
++  struct tcp_chan *tcp;
+ 
++  tcp = tcparray[fd];
++  if(tcp != NULL)
++    {
++    if(tcp->readbuf.tdis_thebuf != NULL)
++      free(tcp->readbuf.tdis_thebuf);
++    if(tcp->writebuf.tdis_thebuf != NULL)
++      free(tcp->writebuf.tdis_thebuf);
++
++    free(tcp);
++    tcparray[fd] = NULL;
++    }
++
++  return;
++  }
++
++
++
+ /*
+  * DIS_tcp_setup - setup supports routines for dis, "data is strings", to
+  * use tcp stream I/O.  Also initializes an array of pointers to
+Index: src/lib/Libnet/net_server.c
+===================================================================
+--- src/lib/Libnet/net_server.c	(revision 5257)
++++ src/lib/Libnet/net_server.c	(revision 5258)
+@@ -114,6 +114,7 @@
+ #include "server_limits.h"
+ #include "net_connect.h"
+ #include "log.h"
++#include "dis.h" /* DIS_tcp_close */
+ 
+ extern int LOGLEVEL;
+ 
+@@ -718,6 +719,7 @@
+   int sd) /* I */
+ 
+   {
++
+   if ((sd < 0) || (max_connection <= sd))
+     {
+     return;
+@@ -757,6 +759,9 @@
+ 
+   num_connections--;
+ 
++  DIS_tcp_close(sd);
++
++
+   return;
+   }  /* END close_conn() */
+ 
diff --git a/torque-rhbz#758740-r5270-dis-array.patch b/torque-rhbz#758740-r5270-dis-array.patch
new file mode 100644
index 0000000..b70ab5f
--- /dev/null
+++ b/torque-rhbz#758740-r5270-dis-array.patch
@@ -0,0 +1,27 @@
+Index: src/lib/Libifl/tcp_dis.c
+===================================================================
+--- src/lib/Libifl/tcp_dis.c	(revision 5269)
++++ src/lib/Libifl/tcp_dis.c	(revision 5270)
+@@ -797,12 +797,19 @@
+   {
+   struct tcp_chan *tcp;
+ 
++  /* On startup tcparray may not yet be initialized. check it */
++  if (tcparray == NULL)
++    return;
++
++  if (fd > tcparraymax)
++    return;
++
+   tcp = tcparray[fd];
+-  if(tcp != NULL)
++  if (tcp != NULL)
+     {
+-    if(tcp->readbuf.tdis_thebuf != NULL)
++    if (tcp->readbuf.tdis_thebuf != NULL)
+       free(tcp->readbuf.tdis_thebuf);
+-    if(tcp->writebuf.tdis_thebuf != NULL)
++    if (tcp->writebuf.tdis_thebuf != NULL)
+       free(tcp->writebuf.tdis_thebuf);
+ 
+     free(tcp);
diff --git a/torque.spec b/torque.spec
index 5391757..b909ff2 100644
--- a/torque.spec
+++ b/torque.spec
@@ -68,7 +68,7 @@
 
 Name:        torque
 Version:     2.5.7
-Release:     7%{?dist}
+Release:     8%{?dist}
 Summary:     Tera-scale Open-source Resource and QUEue manager
 Source0:     http://www.clusterresources.com/downloads/%{name}/%{name}-%{version}.tar.gz
 Source2:     xpbs.desktop
@@ -90,6 +90,10 @@ Patch2:      torque-initd-hangs-rhbz-744138.patch
 Patch3:      torque-fix-munge-rhbz#752079.patch
 Patch4:      torque-fix-munge-rhbz#752079-PTII.patch
 
+# https://bugzilla.redhat.com/show_bug.cgi?id=758740
+Patch5: torque-rhbz#758740-r5258-dis-close.patch
+Patch6: torque-rhbz#758740-r5270-dis-array.patch
+
 
 License:     OpenPBS and TORQUEv1.1
 Group:       System Environment/Daemons
@@ -352,6 +356,10 @@ DRMAA is "Distributed Resource Management Application API"
 pushd src/server
 %patch4 -p 0
 popd
+
+%patch5 -p 0
+%patch6 -p 0
+
 install -pm 644 %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} \
    %{SOURCE6} %{SOURCE8} .
 # rm x bit on some documentation.
@@ -800,6 +808,10 @@ fi
 %endif
 
 %changelog
+* Mon Nov 21 2011 Steve Traylen <steve.traylen at cern.ch> - 2.5.7-8
+- Add torque-rhbz#758740-r5258-dis-close.patch and
+  torque-rhbz#758740-r5270-dis-array.patch
+
 * Mon Nov 21 2011 Steve Traylen <steve.traylen at cern.ch> - 2.5.7-7
 - Add torque-fix-munge-rhbz#752079-PTII.patch
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/torque.git/commit/?h=master&id=44081f771043381194bb0dfaa635305925ad05ac


More information about the scm-commits mailing list