Page MenuHomePhabricator

wlis (Wojciech Lis)
User

Projects

User does not belong to any projects.

User Details

User Since
Nov 13 2017, 7:11 AM (104 w, 4 d)

Recent Activity

Jan 16 2018

wlis added a comment to D1568: lfs: using workers in lfs prefetch.

I finally got around to testing this properly and I can reproduce the issue. I looked into the code a bit and it is possible that we create keepalive connections before forking and we are illegally multiplexing same connection.
The quick fix on our side is to not use workers on upload action, and it fixes the issue right away. Proper fix would be to fix the https handler, but it doesn't look like an easy one. I don't think I'll get to that any time soon.

Jan 16 2018, 7:35 PM

Jan 4 2018

wlis added a comment to D1568: lfs: using workers in lfs prefetch.

@mharbison72 Thank you for commenting with this issue. We didn't roll this to many people yet and didn't see the issue. I will try to test the scenario with upload of many large files and I'll comment back here soon.

Jan 4 2018, 3:13 AM

Dec 18 2017

wlis committed rHG44fd4cfc6c0a: worker: handle interrupt on windows.
worker: handle interrupt on windows
Dec 18 2017, 11:22 PM
wlis closed D1718: worker: handle interrupt on windows.
Dec 18 2017, 11:22 PM
wlis created D1718: worker: handle interrupt on windows.
Dec 18 2017, 6:19 PM
wlis added inline comments to D1564: worker: make windows workers daemons.
Dec 18 2017, 2:04 PM

Dec 17 2017

wlis committed rHGf98fac24b757: lfs: using workers in lfs prefetch.
lfs: using workers in lfs prefetch
Dec 17 2017, 2:27 PM
wlis committed rHG86b8cc1f244e: worker: make windows workers daemons.
worker: make windows workers daemons
Dec 17 2017, 2:27 PM
wlis committed rHG471918fa7f46: workers: add config to enable/diable workers.
workers: add config to enable/diable workers
Dec 17 2017, 2:27 PM

Dec 15 2017

wlis closed D1568: lfs: using workers in lfs prefetch.
Dec 15 2017, 12:13 PM
wlis closed D1460: workers: add config to enable/diable workers.
Dec 15 2017, 12:13 PM
wlis committed rHG2b7c0cba308f: lfs: using workers in lfs prefetch.
lfs: using workers in lfs prefetch
Dec 15 2017, 12:13 PM
wlis committed rHG487e7e6e89a0: worker: make windows workers daemons.
worker: make windows workers daemons
Dec 15 2017, 12:13 PM
wlis closed D1564: worker: make windows workers daemons.
Dec 15 2017, 12:13 PM
wlis committed rHG9b7ee7b78856: workers: add config to enable/diable workers.
workers: add config to enable/diable workers
Dec 15 2017, 12:13 PM
wlis closed D1459: workers: handling exceptions in windows workers.
Dec 15 2017, 12:13 PM
wlis committed rHG71427ff1dff8: workers: handling exceptions in windows workers.
workers: handling exceptions in windows workers
Dec 15 2017, 12:13 PM
wlis closed D1458: workers: implemented worker on windows.
Dec 15 2017, 12:13 PM
wlis committed rHG02b36e860e0b: workers: implemented worker on windows.
workers: implemented worker on windows
Dec 15 2017, 12:13 PM
wlis committed rHG60f2a215faa7: workers: don't use backgroundfilecloser in threads.
workers: don't use backgroundfilecloser in threads
Dec 15 2017, 12:13 PM
wlis closed D1457: workers: don't use backgroundfilecloser in threads.
Dec 15 2017, 12:13 PM

Dec 12 2017

wlis updated the diff for D1457: workers: don't use backgroundfilecloser in threads.
Dec 12 2017, 4:32 PM
wlis added a comment to D1458: workers: implemented worker on windows.

@durin42 yes, I tested without remotefilelog (at least I believe it was not being used at that time). I cloned a repo with --config extensions.remotefilelog=! and then put appropriate section in .hg/hgrc
hg config had line

extensions.remotefilelog=!

Ran updates between far revisions and verified that threads get started during update. Hg didn't complain about anything and repo stayed healthy.

Dec 12 2017, 4:26 PM

Dec 11 2017

wlis added a comment to D1568: lfs: using workers in lfs prefetch.

@mharbison72 I am not sure if these tests are able to satisfy conditions to actually multithread. But you are right it there is an issue we can force 1 worker.
The workers on posix are implemented by forking and the only way of communication is through pipes created by worker.py code. Once forked they only communicate every some # of tasks (file fetches in this case) has been finished by the worker (I think # ~ 100 but not sure). We would have to change POSIX behaviour to allow reporting smaller pieces of progress through pipe (potentially 0 tasks finished). This would need changes in bunch of layers (worker, merge, blobstore) instead the current simple use of progress(...) function.
It is possible to implement that communication, but it is significant amount of work and testing.

Dec 11 2017, 9:55 PM
wlis updated the test plan for D1568: lfs: using workers in lfs prefetch.
Dec 11 2017, 8:02 PM
wlis added a comment to D1568: lfs: using workers in lfs prefetch.

Updated the test (as my changes change the output) and retested. Now everything works fine.

Dec 11 2017, 7:43 PM
wlis updated the diff for D1568: lfs: using workers in lfs prefetch.
Dec 11 2017, 7:42 PM
wlis added a comment to D1568: lfs: using workers in lfs prefetch.

I must have messed up something when running tests previously- probably wrong revision. The tests actually catch the failure above:

Dec 11 2017, 7:37 PM
wlis planned changes to D1568: lfs: using workers in lfs prefetch.

@mharbison72 you are right, the upload doesn't work because I removed the fliewithprogress wrapper around the file that adds couple functions that I didn't realize. That includes len.
Will fix very soon.

Dec 11 2017, 7:20 PM

Dec 1 2017

wlis requested review of D1568: lfs: using workers in lfs prefetch.

Tested with the server:

Dec 1 2017, 5:25 PM

Nov 30 2017

wlis updated the test plan for D1568: lfs: using workers in lfs prefetch.
Nov 30 2017, 8:24 PM
wlis updated the test plan for D1568: lfs: using workers in lfs prefetch.
Nov 30 2017, 8:18 PM
wlis created D1568: lfs: using workers in lfs prefetch.
Nov 30 2017, 8:16 PM
wlis requested review of D1458: workers: implemented worker on windows.
Nov 30 2017, 7:42 PM
wlis updated the diff for D1564: worker: make windows workers daemons.
Nov 30 2017, 7:02 PM
wlis updated the diff for D1460: workers: add config to enable/diable workers.
Nov 30 2017, 7:02 PM
wlis updated the diff for D1457: workers: don't use backgroundfilecloser in threads.
Nov 30 2017, 7:01 PM
wlis added inline comments to D1564: worker: make windows workers daemons.
Nov 30 2017, 4:39 PM
wlis created D1564: worker: make windows workers daemons.
Nov 30 2017, 2:26 PM

Nov 29 2017

wlis closed D1539: remotefilelog: make sure metacache is always initalized.
Nov 29 2017, 10:09 PM
wlis committed rFBHGXc5cf0dda2c9f: remotefilelog: make sure metacache is always initalized.
remotefilelog: make sure metacache is always initalized
Nov 29 2017, 10:09 PM

Nov 28 2017

wlis updated the diff for D1539: remotefilelog: make sure metacache is always initalized.
Nov 28 2017, 8:41 PM
wlis created D1539: remotefilelog: make sure metacache is always initalized.
Nov 28 2017, 8:17 PM
wlis closed D1513: remotefilelog: keep metacache per thread.
Nov 28 2017, 5:59 PM
wlis committed rFBHGXbcd530ca9c22: remotefilelog: keep metacache per thread.
remotefilelog: keep metacache per thread
Nov 28 2017, 5:59 PM

Nov 25 2017

wlis added a comment to D1458: workers: implemented worker on windows.

The previous issues were related to fb-hgext remotefilelog and https://phab.mercurial-scm.org/D1513 fixes it on the side of remotefilelog.
I will still need to test this code on a repo without remotefilelog to make sure that the normal filelog doesn't hit similar issues.

Nov 25 2017, 11:50 AM
wlis created D1513: remotefilelog: keep metacache per thread.
Nov 25 2017, 11:44 AM

Nov 21 2017

wlis planned changes to D1458: workers: implemented worker on windows.

I need to test these changes a bit more. I found a place in merge.py that has a risk of race condition and need to figure out how to protect it.
Right now there are 2 places where we use workers. 1 in core (merge.py) and there is also us in lfs in fb extensions.

Nov 21 2017, 12:08 AM

Nov 20 2017

wlis added a comment to D1457: workers: don't use backgroundfilecloser in threads.

That sounds good. I actually started with a change to manage a single background closer between threads, but the locking code gets a bit complicated and seemed more risky. I didn't know the main reason for 1 background closer was the number of descriptors.
I'll check what disabling backgroundcloser does to the performance.

Nov 20 2017, 11:59 PM
wlis retitled D1460: workers: add config to enable/diable workers from workers: add config to enable/diable workers to workers: add config to enable/disable workers.
Nov 20 2017, 1:44 PM
wlis updated the summary of D1458: workers: implemented worker on windows.
Nov 20 2017, 1:39 PM
wlis created D1460: workers: add config to enable/diable workers.
Nov 20 2017, 1:37 PM
wlis created D1459: workers: handling exceptions in windows workers.
Nov 20 2017, 1:37 PM
wlis created D1458: workers: implemented worker on windows.
Nov 20 2017, 1:37 PM
wlis created D1457: workers: don't use backgroundfilecloser in threads.
Nov 20 2017, 1:37 PM
wlis added inline comments to D1453: remotefilelog: never deadlock on writing to a pipe.
Nov 20 2017, 12:17 PM

Nov 16 2017

wlis closed D1424: Using workers in lfs prefetch.
Nov 16 2017, 2:06 PM
wlis committed rFBHGX67bcf096af13: Using workers in lfs prefetch.
Using workers in lfs prefetch
Nov 16 2017, 2:06 PM

Nov 15 2017

wlis updated the test plan for D1424: Using workers in lfs prefetch.
Nov 15 2017, 4:15 AM
wlis created D1424: Using workers in lfs prefetch.
Nov 15 2017, 4:13 AM