Bug 703275 - Assertion error in tasking
Summary: Assertion error in tasking
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jason Connor
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close 673206 688298
TreeView+ depends on / blocked
 
Reported: 2011-05-09 20:01 UTC by Jay Dobies
Modified: 2014-03-31 01:39 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-08-16 12:08:45 UTC
Embargoed:


Attachments (Terms of Use)

Description Jay Dobies 2011-05-09 20:01:38 UTC
I left my Summit demo environment running over about 5 days. I'm not 100% sure when it happened. It looks like it was when I created a feedless repo, but I wouldn't think that would touch the tasking subsystem (I'm not 100% sure on that though).


2011-05-05 17:06:23,425 [INFO][Dummy-5] _create_repo() @ util.py:364 - started repo metadata update
2011-05-05 17:06:23,460 [CRITICAL][Thread-3] _dispatch() @ queue.py:121 - Exception in FIFO Queue Dispatch Thread
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/server/tasking/taskqueue/queue.py", line 115, in _dispatch
    self.run(task)
  File "/usr/lib/python2.7/site-packages/pulp/server/tasking/taskqueue/queue.py", line 253, in run
    self.__storage.store_running(task)
  File "/usr/lib/python2.7/site-packages/pulp/server/tasking/taskqueue/storage.py", line 136, in store_running
    assert task not in self.__complete_tasks
AssertionError

2011-05-05 17:06:

Comment 1 Preethi Thomas 2011-05-23 13:56:49 UTC
Not sure if this is related.
But with the latest build (179) I have a repo with schedule and seeing this

2011-05-23 10:00:05,358 [ERROR][Thread-39] _complete() @ task.py:408 - 
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/server/tasking/task.py", line 406, in _complete
    self.complete_callback(self)
  File "/usr/lib/python2.7/site-packages/pulp/server/tasking/taskqueue/queue.py", line 277, in complete
    self.__storage.store_complete(task)
  File "/usr/lib/python2.7/site-packages/pulp/server/tasking/taskqueue/storage.py", line 143, in store_complete
    assert task not in self.__waiting_tasks
AssertionError

Comment 2 Jason Connor 2011-05-23 17:09:23 UTC
Looks like an additional traceback here.

For some reason we're getting out of sync in the storage with scheduled tasks.


2011-05-23 13:02:22,846 [ERROR][Thread-7] _complete() @ task.py:408 - 
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/server/tasking/task.py", line 406, in _complete
    self.complete_callback(self)
  File "/usr/lib/python2.7/site-packages/pulp/server/tasking/taskqueue/queue.py", line 269, in complete
    self.__storage.remove_running(task)
  File "/usr/lib/python2.7/site-packages/pulp/server/tasking/taskqueue/storage.py", line 139, in remove_running
    assert task in self.__running_tasks
AssertionError

Comment 3 Jason Connor 2011-05-24 08:17:24 UTC
Python falls back to the custom __cmp__ method for an instance if it is defined in the class for testing equality and membership.

This is great if you're trying to sort a list by, say, a Task's scheduled_time. It's not great if you're trying to determine if a Task is in a list that contains a Task with the same scheduled_time.

However, Python will use a custom __eq__ method for equality and membership before the custom __cmp__, if it present.

Bug fix includes added a custom __eq__ function to Task that only returns True if the ids match (in other words, if it's the same damn Task)

Fix pushed up in hash: 7a6f84006a263fd77eb99439e7290b955d9b208d

Comment 4 Jeff Ortel 2011-05-24 21:25:15 UTC
build: 0.180

Comment 5 Preethi Thomas 2011-05-27 12:30:42 UTC
I have had multiple scheduled syncs running over nights and have not seen this issue since the fix.

moving to verified

[root@preethi ~]# rpm -q pulp
pulp-0.0.181-1.fc14.noarch
[root@preethi ~]#

Comment 6 Preethi Thomas 2011-08-16 12:08:45 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 7 Preethi Thomas 2011-08-16 12:21:38 UTC
Closing with Community Release 15

pulp-0.0.223-4.


Note You need to log in before you can comment on or make changes to this bug.