[torqueusers] pbs_rescquery hangs

Kevin Van Workum vanw at sabalcore.com
Thu Nov 14 14:37:48 MST 2013

I'm playing around with the Torque API to make some utilities and can't get
pbs_rescquery to work. Here's a simple program that just hangs at the call
to pbs_rescquery. This is with 4.2.5. Any idea why it hangs? Using gdb, I
see that the hang occurs on a call to pthread_mutex_lock. Thanks for you

Sample program:

#include <pbs_error.h>
#include <pbs_ifl.h>
#include <iostream>

int main() {
  char *list = (char *)"nodes";
  int avail, allocated, down, reserved;
  int id = pbs_connect(NULL);

  // This works fine.
  batch_status *status = pbs_statserver(id,NULL,NULL);
  std::cout << "Server Name: " << status->name << std::endl;

  // This call just hangs.

  pbs_rescquery(id, &list, 1, &avail, &allocated, &reserved, &down);


Below is the server log:

11/14/2013 16:18:38;0080;PBS_Server.26310;Req;dis_request_read;decoding
command AuthenticateUser from root
11/14/2013 16:18:38;0100;PBS_Server.26310;Req;;Type AuthenticateUser
request received from root at server, sock=8
11/14/2013 16:18:38;0008;PBS_Server.26310;Job;dispatch_request;dispatching
request AuthenticateUser on sd=8
11/14/2013 16:18:38;0200;PBS_Server.26310;trqauthd;req_authenuser;addr:
2130706433  port: 58831
11/14/2013 16:18:38;0008;PBS_Server.26310;Job;reply_send_svr;Reply sent for
request type AuthenticateUser on socket 8
11/14/2013 16:18:38;0080;PBS_Server.26310;Req;dis_request_read;decoding
command Disconnect from root
11/14/2013 16:18:38;0080;PBS_Server.25730;Req;dis_request_read;decoding
command StatusServer from root
11/14/2013 16:18:38;0100;PBS_Server.25730;Req;;Type StatusServer request
received from root at server, sock=7
11/14/2013 16:18:38;0008;PBS_Server.25730;Job;dispatch_request;dispatching
request StatusServer on sd=7
16:18:38;0002;PBS_Server.25730;Svr;lock_sv_qs_mutex;req_stat_svr: locking
unlocking sv_qs_mutex
11/14/2013 16:18:38;0008;PBS_Server.25730;Job;reply_send_svr;Reply sent for
request type StatusServer on socket 7

Kevin Van Workum, PhD
Sabalcore Computing Inc.
"Where Data Becomes Discovery"
877-492-8027 ext. 11


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.supercluster.org/pipermail/torqueusers/attachments/20131114/62283db8/attachment.html 

More information about the torqueusers mailing list