iProxy process locking folders and failing Jenkins jobs

Mobile Testing, Android App Testing.
caleb
Posts: 24
Joined: Mon Jul 08, 2013 3:35 am

iProxy process locking folders and failing Jenkins jobs

Post by caleb » Tue Oct 29, 2013 9:22 pm

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: iProxy process locking folders and failing Jenkins jobs

Post by Support Team » Thu Oct 31, 2013 5:17 pm

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
.
Image

caleb
Posts: 24
Joined: Mon Jul 08, 2013 3:35 am

Re: iProxy process locking folders and failing Jenkins jobs

Post by caleb » Thu Oct 31, 2013 8:27 pm

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: iProxy process locking folders and failing Jenkins jobs

Post by Support Team » Mon Nov 04, 2013 11:18 am

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
.
Image

caleb
Posts: 24
Joined: Mon Jul 08, 2013 3:35 am

Re: iProxy process locking folders and failing Jenkins jobs

Post by caleb » Wed Nov 06, 2013 2:11 am

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

caleb
Posts: 24
Joined: Mon Jul 08, 2013 3:35 am

Re: iProxy process locking folders and failing Jenkins jobs

Post by caleb » Thu Nov 07, 2013 10:01 pm

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
iProxyFolderLock.PNG (82.9 KiB) Viewed 1694 times
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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: iProxy process locking folders and failing Jenkins jobs

Post by Support Team » Mon Nov 11, 2013 5:27 pm

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
.
Image