Add torque-rhbz#758740-r5258-dis-close.patch and
torque-rhbz#758740-r5270-dis-array.patch
This commit is contained in:
parent
b6989502a5
commit
44081f7710
124
torque-rhbz#758740-r5258-dis-close.patch
Normal file
124
torque-rhbz#758740-r5258-dis-close.patch
Normal file
@ -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() */
|
||||
|
27
torque-rhbz#758740-r5270-dis-array.patch
Normal file
27
torque-rhbz#758740-r5270-dis-array.patch
Normal file
@ -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);
|
14
torque.spec
14
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@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@cern.ch> - 2.5.7-7
|
||||
- Add torque-fix-munge-rhbz#752079-PTII.patch
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user