This is a snapshot of Indico's old Trac site. Any information contained herein is most probably outdated. Access our new GitHub site here.

Opened 6 years ago

Closed 5 years ago

#131 closed defect (needfeedback)

Error on the taskDaemon script: 'NoneType' object has no attribute 'sleep'

Reported by: sylvestre Owned by:
Priority: normal Milestone: v0.97.0
Component: Installation Version: 0.97.0
Keywords: Cc:

Description (last modified by pferreir)

With python 2.5.2

taskDaemon start
Daemon started! (pid=13421)


Trying to connect with the database...
If you don't see any following message, please make sure that you have already started the database because you might have a connection problem with it.

Database connection established.
Added statistics updater task to the tasks list.

Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
  File "/usr/lib/python2.5/site-packages/cds_indico-0.97b-py2.5.egg/MaKaC/common/timerExec.py", line 596, in run
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'sleep'
Unhandled exception in thread started by 
Error in sys.excepthook:

Original exception was:

The line is time.sleep in the following method:

    def run(self):
        while not self.st:
            w = worker(self.log)
            w.start()
            time.sleep(self._inter)
        print "thread stopped"

Change History (17)

comment:1 Changed 6 years ago by pferreir

  • Description modified (diff)

comment:2 Changed 6 years ago by pferreir

time should be the time module. I see no other definition in the source code. Can you please insert a print statement right after the imports:

print time

Just to check if it is being correctly imported?
I'm really unable to reproduce this...

comment:3 Changed 6 years ago by pferreir

Any news on this?

comment:4 Changed 6 years ago by sylvestre

Sorry, I did not get any email from your bug tracker to tell me that you have push a comment.

print straight after the import of time it giving:
<module 'time' from '/usr/lib/python2.5/lib-dynload/time.so'>

comment:5 Changed 6 years ago by pferreir

  • Milestone set to v0.97
  • Owner set to pferreir
  • Status changed from new to accepted

comment:6 Changed 6 years ago by pferreir

Did the situation change with the new, non-corrupted EGGs?
Can you try placing some print time instructions around and see if the value changes? I really can't reproduce this.

comment:7 Changed 6 years ago by sylvestre

I did a fresh install with the new egg and I can reproduce it anytime...

comment:8 Changed 6 years ago by pferreir

Have you followed my suggestion of adding the prints?

comment:9 Changed 6 years ago by sylvestre

I did but nothing relevant.
In
/usr/lib/python2.5/site-packages/cds_indico-0.97b-py2.5.egg/MaKaC/common/timerExec.py
I did that:
23:print "after import ",time
[...]
597: print "==== before time.sleep ",time
598: time.sleep(self._inter)
599: print "==== after time.sleep ",time

I only see:
after import <module 'time' from '/usr/lib/python2.5/lib-dynload/time.so'>

comment:10 Changed 6 years ago by pferreir

Well, this is too weird, almost paranormal, since we've been using the taskDaemon with no problems at all, and time should be shared among threads.
Does this happen every time you try to run the daemon?
Maybe you don't get to see the prints because of it happening on a different thread.
Could you try writing to a file instead? I can't really reproduce this...

comment:11 Changed 5 years ago by sylvestre

This happens all the time.

I tried with a file. It is interesting...
replacing the display by
FILE = open("/tmp/plop","w")
FILE.writelines("after import "+str(time))
make the software crashes before with an unrelated error:
Unhandled exception in thread started by <bound method timer.bootstrap of <timer(Thread-1, stopped)>>
Traceback (most recent call last):

File "/usr/lib/python2.5/threading.py", line 462, in bootstrap

self.bootstrap_inner()

File "/usr/lib/python2.5/threading.py", line 499, in bootstrap_inner

(self.getName(), _format_exc()))

File "/usr/lib/python2.5/traceback.py", line 235, in format_exc

etype, value, tb = sys.exc_info()

AttributeError?: 'NoneType?' object has no attribute 'exc_info'
I am using python2.5 (2.5.2-15) from debian

comment:12 Changed 5 years ago by sylvestre

For information, I still have the issue with the rc1.

Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):

File "/usr/lib/python2.5/threading.py", line 486, in bootstrap_inner
File "/usr/lib/python2.5/site-packages/cds_indico-0.97_rc1-py2.5.egg/MaKaC/common/timerExec.py", line 597, in run

<type 'exceptions.AttributeError?'>: 'NoneType?' object has no attribute 'sleep'
Unhandled exception in thread started by
Error in sys.excepthook:

Original exception was:

comment:13 Changed 5 years ago by pferreir

  • Status changed from in_work to infoneeded

Is this still happening? We'd like to close it ASAP.

comment:14 Changed 5 years ago by pferreir

  • Status changed from infoneeded to assigned

Closing for lack of feedback. Impossible to reproduce here.

comment:15 Changed 5 years ago by pferreir

  • Status changed from assigned to in_work

comment:16 Changed 5 years ago by pferreir

  • Owner pferreir deleted
  • Status changed from in_work to new

comment:17 Changed 5 years ago by pferreir

  • Resolution set to needfeedback
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.