[Akonadi] [Bug 321093] feeder crashed

2013-06-19 Thread Blackpaw
https://bugs.kde.org/show_bug.cgi?id=321093

Blackpaw lindsay.mathie...@gmail.com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
  Latest Commit||http://commits.kde.org/kdep
   ||im-runtime/ecf676853e27dbdd
   ||d07ca2c76d87b5fe5971e740

--- Comment #6 from Blackpaw lindsay.mathie...@gmail.com ---
Git commit ecf676853e27dbddd07ca2c76d87b5fe5971e740 by Lindsay Mathieson.
Committed on 19/06/2013 at 12:30.
Pushed by mathieson into branch 'master'.

Fix bug in running job count

Fixes problem where the count of running jobs becomes less than zero
(-1), causing an assert in itemqueue.cpp at line 113 to trigger. This
was happening because ItemQueue::clear() was setting the running job
count to zero when there was unfinished jobs, when the jobs actually did
finish the running job count was decremented to below zero.
The batch fixes this by keeping a QListKJob * of running jobs, adding
them when created and removing when the job finishes (via the result
signal). When ItemQueue::clear() is called any outstanding jobs are
silently killed and the list cleared.
REVIEW: 111089

M  +43   -12   agents/nepomukfeeder/itemqueue.cpp
M  +11   -1agents/nepomukfeeder/itemqueue.h

http://commits.kde.org/kdepim-runtime/ecf676853e27dbddd07ca2c76d87b5fe5971e740

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[Akonadi] [Bug 321093] feeder crashed

2013-06-17 Thread Blackpaw
https://bugs.kde.org/show_bug.cgi?id=321093

--- Comment #3 from Blackpaw lindsay.mathie...@gmail.com ---
I realise this is of no interest to the developer but I added some extra
logging to itemqueue.cpp to see what was happening:

bool ItemQueue::processBatch()
{
  kDebug()  pipline size:   mItemPipeline.size() 
mFetchedItemList.size();
  if ( mRunningJobs  0 ) {//wait until the old graph has been saved
kDebug()  blocked:   mRunningJobs;
return false;
  }
  if ( mRunningJobs != 0 ) {
// added by me
kDebug()  mRunningJobs ==   mRunningJobs  !;
  }
  Q_ASSERT( mRunningJobs == 0 );
  mRunningJobs = 0;

.xsession-errors
akonadi_nepomuk_feeder(13953) ItemQueue::processBatch: mRunningJobs ==  -1
!
ASSERT: mRunningJobs == 0 in file
/home/lindsay/Projects/akonadi/kdepim-runtime/agents/nepomukfeeder/itemqueue.cpp,
line 116


So for some reason mRunningJobs is actually -1, which I presume should never
happen.

How thread safe is this stuff? I don't see any use of thread sync primitives.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[Akonadi] [Bug 321093] feeder crashed

2013-06-17 Thread Blackpaw
https://bugs.kde.org/show_bug.cgi?id=321093

--- Comment #4 from Blackpaw lindsay.mathie...@gmail.com ---
Added more debug info to Item::QueueClear()

void ItemQueue::clear()
{
  if (mRunningJobs  0)
kDebug()  CLEAR:mRunningJobs  0;
  mRunningJobs = 0;
  mItemPipeline.clear();
  mFetchedItemList.clear();
}


The debug output showed that clear() is being called while jobs are
outstanding. Presumably they finish after clear is called and mRunningJobs is
decremented to -1.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[Akonadi] [Bug 321093] feeder crashed

2013-06-17 Thread Blackpaw
https://bugs.kde.org/show_bug.cgi?id=321093

--- Comment #5 from Blackpaw lindsay.mathie...@gmail.com ---
Have developed a fix and testing it now.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[Akonadi] [Bug 321093] feeder crashed

2013-06-15 Thread Blackpaw
https://bugs.kde.org/show_bug.cgi?id=321093

--- Comment #2 from Blackpaw lindsay.mathie...@gmail.com ---
Created attachment 80544
  -- https://bugs.kde.org/attachment.cgi?id=80544action=edit
New crash information added by DrKonqi

akonadi_nepomuk_feeder (4.10) on KDE Platform 4.10.4 using Qt 4.8.4

- What I was doing when the application crashed:

Same as before, letting the feeder index my mails. This happens 100% of time
when I reactivate the feeder and from the approx progress of the index I would
guess its barfing on the same email every time.

-- Backtrace (Reduced):
#10 0x7ffd65478b06 in qt_assert (assertion=assertion@entry=0x426554
mRunningJobs == 0, file=file@entry=0x426330
/home/lindsay/Projects/akonadi/kdepim-runtime/agents/nepomukfeeder/itemqueue.cpp,
line=line@entry=113) at global/qglobal.cpp:2021
#11 0x004167fa in ItemQueue::processBatch (this=this@entry=0x1c60cf8)
at
/home/lindsay/Projects/akonadi/kdepim-runtime/agents/nepomukfeeder/itemqueue.cpp:113
#12 0x004129a0 in IndexScheduler::processItemQueue
(this=this@entry=0x1c60bd0) at
/home/lindsay/Projects/akonadi/kdepim-runtime/agents/nepomukfeeder/indexscheduler.cpp:252
#13 0x00413408 in IndexScheduler::qt_static_metacall (_o=0x1c60bd0,
_c=optimized out, _id=3, _a=0x7fff02651f20) at
/home/lindsay/Projects/akonadi/kdepim-runtime/build/agents/nepomukfeeder/indexscheduler.moc:67
[...]
#15 0x7ffd655993ec in QObject::event (this=0x1c60be8, e=optimized out) at
kernel/qobject.cpp:1156

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[Akonadi] [Bug 321093] feeder crashed

2013-06-13 Thread Blackpaw
https://bugs.kde.org/show_bug.cgi?id=321093

Blackpaw lindsay.mathie...@gmail.com changed:

   What|Removed |Added

 CC||lindsay.mathie...@gmail.com
Version|4.10|GIT (master)

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[Akonadi] [Bug 321093] feeder crashed

2013-06-13 Thread Blackpaw
https://bugs.kde.org/show_bug.cgi?id=321093

--- Comment #1 from Blackpaw lindsay.mathie...@gmail.com ---
It repeated itself three times now since the original crash.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs