Message11491

Author Ivan
Recipients Ivan
Date 2017-07-21.17:26:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1500657992.09.0.744284536554.issue2609@psf.upfronthosting.co.za>
In-reply-to
Content
And here is the script to reproduce the original problem (run it several times to catch an exception). The bug is obviously due to regexp object shared somewhere between threads:

import thread
import re
import datetime
import time

def printtime(time):
  print datetime.datetime.strptime(time, '%Y-%m-%dT%H:%M:%S')


thread.start_new_thread(printtime, ('2017-07-01T11:11:11',))
thread.start_new_thread(printtime, ('2017-07-01T11:11:11',))
thread.start_new_thread(printtime, ('2017-07-01T11:11:11',))
thread.start_new_thread(printtime, ('2017-07-01T11:11:11',))
thread.start_new_thread(printtime, ('2017-07-01T11:11:11',))
thread.start_new_thread(printtime, ('2017-07-01T11:11:11',))
thread.start_new_thread(printtime, ('2017-07-01T11:11:11',))
thread.start_new_thread(printtime, ('2017-07-01T11:11:11',))
thread.start_new_thread(printtime, ('2017-07-01T11:11:11',))
thread.start_new_thread(printtime, ('2017-07-01T11:11:11',))
thread.start_new_thread(printtime, ('2017-07-01T11:11:11',))
thread.start_new_thread(printtime, ('2017-07-01T11:11:11',))


time.sleep(1)
History
Date User Action Args
2017-07-21 17:26:32Ivansetmessageid: <1500657992.09.0.744284536554.issue2609@psf.upfronthosting.co.za>
2017-07-21 17:26:32Ivansetrecipients: + Ivan
2017-07-21 17:26:32Ivanlinkissue2609 messages
2017-07-21 17:26:31Ivancreate