[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] On the thread-safety of submit, query and history in htcondor python binding



Hi Brian,

Thanks for your information.

The version number is 8.5.6 and I did not see any relevant error messages in SchedLog.

The detailed version information is as follows:

condor_config_val CONDOR_VERSION Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
8.5.6

htcondor.version()
'$CondorVersion: 8.5.6 Jul 30 2016 BuildID: 376655 $'

classad.version()
'8.5.6'



Thanks

Weiming Shi


On Thu, Oct 20, 2016 at 8:23 PM, Brian Bockelman <bbockelm@xxxxxxxxxxx> wrote:
Thanks Weiming,

Two questions:
- what version of HTCondor? I know there was one threading bug fix recently, but I think it was for a different function.
- are there any errors or complaints in the ScheddLog?

Brian

Sent from my iPhone

On Oct 20, 2016, at 7:51 PM, Weiming Shi <swmtrc@xxxxxxxxx> wrote:

Hi Brian,

Thanks for your reply. I have written a simple test script to submit job classads from two threads created by threading module.Â
The submit in one of the threads will fail with the error message: RuntimeError: Failed to connect to schedd. The RuntimeError won't show up if i use a lock to make the submit a synchronous operation.

I will appreciate it if you can take a look at it. Thanks


The code is as follows:

#!/bin/env python

import htcondor
import classad
import threading


def spawn():
  schedd = htcondor.Schedd()
  print "%r" % schedd
  schedd.submit(classad.ClassAd({"Cmd": "/bin/echo"}))


for i in range(2):
  t = threading.Thread(target=spawn)
  t.start()




On Thu, Oct 20, 2016 at 7:28 PM, Brian Bockelman <bbockelm@xxxxxxxxxxx> wrote:
Hi Weiming,

To the best of my knowledge, everything should be threadsafe; if you find issues, that would indicate a bug and I'd be happy to look into that.

Brian

Sent from my iPhone

On Oct 20, 2016, at 6:13 PM, Weiming Shi <swmtrc@xxxxxxxxx> wrote:

Hi all,

I have a question regarding to the thread-safety of the methods of htcondor python binding. Are the underlying methods exposed by Âhtcondor python binding thread-safe, especially 'submit', 'query', 'history' methods of Schedd class?Â

A initial test seems to be NO.


Thanks.

Weiming Shi


_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxx.edu with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/

_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxx.edu with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/

_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@cs.wisc.edu with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/

_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@cs.wisc.edu with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/