[GE issues] [Issue 3126] Scheduler crashes with got NULL element for CE_requestable

ravinallan ravichandra.nallan at sun.com
Fri Sep 4 16:40:50 BST 2009


http://gridengine.sunsource.net/issues/show_bug.cgi?id=3126






------- Additional comments from ravinallan at sunsource.net Fri Sep  4 08:40:47 -0700 2009 -------
The fix:

Index: libs/sgeobj/sge_resource_quota.c
===================================================================
RCS file: /cvs/gridengine/source/libs/sgeobj/sge_resource_quota.c,v
retrieving revision 1.21
diff -u -r1.21 sge_resource_quota.c
--- libs/sgeobj/sge_resource_quota.c    22 Jun 2009 15:31:31 -0000      1.21
+++ libs/sgeobj/sge_resource_quota.c    3 Sep 2009 14:40:06 -0000
@@ -1481,7 +1481,7 @@
    for_each(rule, lGetList(rqs, RQS_rule)) {
       lListElem *limit;
       for_each(limit, lGetList(rule, RQR_limit)) {
-         const char *limit_name = lGetString(limit, RQRL_value);
+         const char *limit_name = lGetString(limit, RQRL_name);
          DPRINTF(("limit name %s\n", limit_name));
          if (strchr(limit_name, '$') != NULL) {
             /* dynamical limit */

Index: libs/sched/sge_resource_quota_schedd.c
===================================================================
RCS file: /cvs/gridengine/source/libs/sched/sge_resource_quota_schedd.c,v
retrieving revision 1.26
diff -u -r1.26 sge_resource_quota_schedd.c
--- libs/sched/sge_resource_quota_schedd.c      17 Jun 2009 17:54:52 -0000      1.26
+++ libs/sched/sge_resource_quota_schedd.c      3 Sep 2009 15:02:07 -0000
@@ -1315,9 +1315,6 @@
       const char *limit_name = lGetString(limit, RQRL_name);

       lListElem *raw_centry = centry_list_locate(a->centry_list, limit_name);
-      bool is_forced = lGetUlong(raw_centry, CE_requestable) == REQU_FORCED ? true : false;
-      lList *job_centry_list = lGetList(a->job, JB_hard_resource_list);
-      lListElem *job_centry = centry_list_locate(job_centry_list, limit_name);

       if (raw_centry == NULL) {
          DPRINTF(("ignoring limit %s because not defined", limit_name));
@@ -1326,6 +1323,10 @@
          DPRINTF(("checking limit %s\n", lGetString(raw_centry, CE_name)));
       }

+      bool is_forced = lGetUlong(raw_centry, CE_requestable) == REQU_FORCED ? true : false;
+      lList *job_centry_list = lGetList(a->job, JB_hard_resource_list);
+      lListElem *job_centry = centry_list_locate(job_centry_list, limit_name);
+
       /* check for implicit slot and default request */
       if (job_centry == NULL) {
          if (strcmp(lGetString(raw_centry, CE_name), SGE_ATTR_SLOTS) == 0) {

------------------------------------------------------
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=36&dsMessageId=215780

To unsubscribe from this discussion, e-mail: [issues-unsubscribe at gridengine.sunsource.net].



More information about the gridengine-users mailing list