Re: Review Request 125613: Race condition and error notification loss in ListJob

2015-10-15 Thread Alberto Jiménez Ruiz

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125613/
---

(Updated Oct. 15, 2015, 7:33 a.m.)


Review request for kdelibs and Albert Astals Cid.


Bugs: 333436
http://bugs.kde.org/show_bug.cgi?id=333436


Repository: kdelibs


Description
---

Race condition and error notification loss in ListJob


Diffs (updated)
-

  kio/kio/copyjob.cpp e6c3817 
  kio/kio/job.cpp 91712e3 
  kio/kio/jobclasses.h d771cfe 
  kio/tests/jobtest.h d3c552e 
  kio/tests/jobtest.cpp ee2677a 

Diff: https://git.reviewboard.kde.org/r/125613/diff/


Testing
---

Update 1, added unittest
Changed condition of listjob slotresult finishing (When executed as a 
synchronous job, gets stuck in a eventloop)
Added setError to copyjob.


Tests done on Kubuntu 15.10:

With this folder structure in ~:
src
##c (Folder)
##b (Folder chmod'ed to 700 and owned by root)
###d (10MB file made of /dev/urandom data)
##a (10MB file made of /dev/urandom data)

Then, (as a normal user execute: "kioclient ~/src ~/dst")

Expected result: Notification that some files were not able to be copied 
(Cannot access "b" folder)
Result with latest kdelibs: Silent copying where b folder is owned by user but 
nothing inside.
---When all kdebugdialog flags are set, a backtrace is also seen.
  
subError notifications for listjob subjobs are lost, Copyjob uses this signal 
to skip data.

Also, this fix prevents a race condition. 

ListJob has another ListJob as a subjob.

Chaild fails for whatever reason and calls error, which calls slotError, which 
calls slotsFinished and emitResult.
The result of the child gets collected by parent. slotResult of parent gets 
called, removes subjob and emitsresult because there are no subjobs left.
---That's fine as long as the slave associated with the parent emits finished 
before the child fails. If it doesn't, parent calls emitsResult twice.


Result after patch: kioclient shows a MessageBox telling the copy operation 
could not be completed.


Thanks,

Alberto Jiménez Ruiz



Re: Review Request 125613: Race condition and error notification loss in ListJob

2015-10-15 Thread Alberto Jiménez Ruiz


> On Oct. 14, 2015, 10:02 p.m., Albert Astals Cid wrote:
> > Is it possible that your test is conflicting with others, without your 
> > patch all passes here but with it i get JobTest::directorySize and 
> > JobTest::listRecursive to fail

Yeah, I forgot to delete the folders that the test had created. Now all tests 
in JobTest pass (at least in my machine).


- Alberto


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125613/#review86866
---


On Oct. 14, 2015, 10:04 a.m., Alberto Jiménez Ruiz wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125613/
> ---
> 
> (Updated Oct. 14, 2015, 10:04 a.m.)
> 
> 
> Review request for kdelibs and Albert Astals Cid.
> 
> 
> Bugs: 333436
> http://bugs.kde.org/show_bug.cgi?id=333436
> 
> 
> Repository: kdelibs
> 
> 
> Description
> ---
> 
> Race condition and error notification loss in ListJob
> 
> 
> Diffs
> -
> 
>   kio/kio/copyjob.cpp e6c3817 
>   kio/kio/job.cpp 91712e3 
>   kio/kio/jobclasses.h d771cfe 
>   kio/tests/jobtest.h d3c552e 
>   kio/tests/jobtest.cpp ee2677a 
> 
> Diff: https://git.reviewboard.kde.org/r/125613/diff/
> 
> 
> Testing
> ---
> 
> Update 1, added unittest
> Changed condition of listjob slotresult finishing (When executed as a 
> synchronous job, gets stuck in a eventloop)
> Added setError to copyjob.
> 
> 
> Tests done on Kubuntu 15.10:
> 
> With this folder structure in ~:
> src
> ##c (Folder)
> ##b (Folder chmod'ed to 700 and owned by root)
> ###d (10MB file made of /dev/urandom data)
> ##a (10MB file made of /dev/urandom data)
> 
> Then, (as a normal user execute: "kioclient ~/src ~/dst")
> 
> Expected result: Notification that some files were not able to be copied 
> (Cannot access "b" folder)
> Result with latest kdelibs: Silent copying where b folder is owned by user 
> but nothing inside.
> ---When all kdebugdialog flags are set, a backtrace is also seen.
>   
> subError notifications for listjob subjobs are lost, Copyjob uses this signal 
> to skip data.
> 
> Also, this fix prevents a race condition. 
> 
> ListJob has another ListJob as a subjob.
> 
> Chaild fails for whatever reason and calls error, which calls slotError, 
> which calls slotsFinished and emitResult.
> The result of the child gets collected by parent. slotResult of parent gets 
> called, removes subjob and emitsresult because there are no subjobs left.
> ---That's fine as long as the slave associated with the parent emits finished 
> before the child fails. If it doesn't, parent calls emitsResult twice.
> 
> 
> Result after patch: kioclient shows a MessageBox telling the copy operation 
> could not be completed.
> 
> 
> Thanks,
> 
> Alberto Jiménez Ruiz
> 
>



Re: Cervisia?

2015-10-15 Thread Martin Koller
On Thursday 15 October 2015 15:49:32 Jeremy Whiting wrote:
> Michael, Martin,
> 
> Any progress on the cervisia front? Is there anything I can do to help?

yes, a lot of progress!
We have already ported away from Qt3/KDE3 support classes.
This is already in master and I'm testing it by using it on a daily basis.

The next step would now be to start the port to KF5 - this has not been started 
yet.

-- 
Best regards/Schöne Grüße

Martin
A: Because it breaks the logical sequence of discussion
Q: Why is top posting bad?

()  ascii ribbon campaign - against html e-mail 
/\- against proprietary attachments

Geschenkideen, Accessoires, Seifen, Kulinarisches: www.lillehus.at


Re: Cervisia?

2015-10-15 Thread Jeremy Whiting
Michael, Martin,

Any progress on the cervisia front? Is there anything I can do to help?

thanks,
Jeremy

On Sat, Sep 26, 2015 at 8:25 PM, Michael Reeves  wrote:
>
> On Sep 26, 2015 9:22 PM, "Jeremy Whiting"  wrote:
>>
>> Martin,
>>
>> Michael Reeves reeves...@gmail.com mentioned he would be interested in
>> helping also, maybe the two of you can get it ported away from
>> Qt3Support, then ported to Qt5/Kf5 ?
>>
>> thanks,
>> Jeremy
>>
> Sounds like a plan. I don't have write access to the repo. I too have
> limited time.