Page 1 of 1

iProxy process locking folders and failing Jenkins jobs

Posted: Tue Oct 29, 2013 9:22 pm
by caleb
Hi

On a jenkins slave PC we have an iPad connected and we use this PC to execute iPad, web and windows .exe tests from jenkins jobs. However when we have the iPad connected there appears to be an iProxy.exe process which locks seemingly unrelated folders while it does whatever it does. As a result of locking the folders when our Jenkins jobs attempts to delete a workspace at the start of executing a job the workspace cannot be deleted and the job fails.

using a file unlocker tool the process locking the folder always looks like this.
iproxy.exe
Process ID: 2708
Command Line: "C:\Program Files (x86)\Ranorex 4.1\Bin\RxEnv\iOS\iproxy.exe" "32502" "31000" "78ed86b09a4b83f5c265b56c2e742d63facc26aa"
And there may be anywhere between one or 20 of these processes locking different folders.

Can you tell me what the iProxy process does and why it is locking unrelated folders? And can you suggest an appropriate fix for this problem which is making our tests look very unreliable.

Thanks

Caleb

Re: iProxy process locking folders and failing Jenkins jobs

Posted: Thu Oct 31, 2013 5:17 pm
by Support Team
Hi Caleb,

We haven't heard about such an issue before.
May I ask you how you stopped the Jenkins job, could it be that you killed it?
The process should be normally closed when the test ends. The iproxy.exe is a network bridge.
If the process doesn't get closed you can try to close it with Jenkins, you just need to call "taskkill /F /IM iproxy.exe".

Regards,
Markus

Re: iProxy process locking folders and failing Jenkins jobs

Posted: Thu Oct 31, 2013 8:27 pm
by caleb
The Jenkins job stops because it attempts to delete the workspace before the test begins but it cannot delete any folders that the iproxy process has locked so the job fails. Deleting the workspace is one of the first steps of the jenkins job long before it has executed any code so deciding exactly when to kill off these processes will take some thought.

Our test setup is a windows7 pc with and ipad running ios6

Re: iProxy process locking folders and failing Jenkins jobs

Posted: Mon Nov 04, 2013 11:18 am
by Support Team
Hi,
caleb wrote:Deleting the workspace is one of the first steps of the jenkins job long before it has executed any code so deciding exactly when to kill off these processes will take some thought.
So no Ranorex Test was running until this step. Just to follow you, you start a jenkins job with pre-tasks then the Ranorex Automation starts and then Jenkins stops the Job, right? Do you know if the jenkins job kills the executable or closes it correctly?

If it kills the exe at the end of the test you can add a taskkill as suggested per Markus at the end of the job. This should solve your issue and stop iproxy locking folders on your workspace.

Regards,
Peter
Ranorex Team

Re: iProxy process locking folders and failing Jenkins jobs

Posted: Wed Nov 06, 2013 2:11 am
by caleb
You are correct that no Ranorex tests were running at the point the test crashes. Jenkins deletes the folder that the tests were in and downloads the most recently compiled version of the tests to execute them but before it can do this it crashes at the folder deletion step.

We close all of our applications at the completion of the tests but the iPad is always connected to the PC even though it has no apps running. We will look at adding the taskkill option and let you know how it goes.

Thanks

Caleb

Re: iProxy process locking folders and failing Jenkins jobs

Posted: Thu Nov 07, 2013 10:01 pm
by caleb
Hi

We added the following command at the end of our iPad tests which I believe does the same thing as the one you suggested but it does not fail a jenkins build if the process does not exist.

Code: Select all

taskkill /f /fi "IMAGENAME eq iproxy.exe"
However we are still having jenkins jobs fail because the iProxy process is locking folders within the Jenkins workspace that are unrelated to iPad testing. Since we are killing off all instances of the iProxy process at the end of our iPad testing the process appears to be launching itself after this point. I have checked in my windows services and it is not registered there.

Here is a screenshot of the Lock Hunter software checking the Jenkins workspace for things that are locking files.
iProxyFolderLock.PNG
Also not sure if I've mentioned it yet but we have now upgraded to 4.1.2 across all of our test environments and are still seeing the issue

Thanks

Caleb

Re: iProxy process locking folders and failing Jenkins jobs

Posted: Mon Nov 11, 2013 5:27 pm
by Support Team
caleb wrote:However we are still having jenkins jobs fail because the iProxy process is locking folders within the Jenkins workspace that are unrelated to iPad testing.
Does this only occur if your start it with jenkins or did you see it already without jenkins? I tried to reproduce this issue but it was working for me.
I think we should schedule a short webmeeting to watch that issue on your machine. Could you please contact [email protected] to schedule a webmeeing.

Thanks in advance.

Regards,
Peter
Ranorex Team