actions / runner-images

GitHub Actions runner images
MIT License
9.42k stars 2.92k forks source link

The process '/Users/runner/work/1/s/gradlew' failed with exit code 1 #9924

Open LeeCeline opened 1 month ago

LeeCeline commented 1 month ago

Description

While running the pipeline in azure devops for Android application, there was an issue due to which the pipeline failed - "The process '/Users/runner/work/1/s/gradlew' failed with exit code 1" Here is the iscreenshot image

What can be done to mitigate the above issue as sometimes when we are running the pipeline, pipeline is successful but sometimes it is getting the error as mentioned above. Recently it has started failing a lot and success rate is a bit low which is causing problem as it is much more time consuming.

Platforms affected

Runner images affected

Image version and build link

Runner Image Image: macos-12 Version: 20240514.3 Included Software: https://github.com/actions/runner-images/blob/macOS-12/20240514.3/images/macos/macos-12-Readme.md Image Release: https://github.com/actions/runner-images/releases/tag/macOS-12%2F20240514.3 Runner Image Provisioner 2.0.369.1+55cddbb57f254a369b6e7b3b508cebdbee5d24be Current image version: '20240514.3'

Is it regression?

Yes, but could not provide build link

Expected behavior

Pipeline should be working as expected.

Actual behavior

It was working few days ago, but currently not working as mentioned in description.

Repro steps

Android

Build your Android project with Gradle.

Add steps that test, sign, and distribute the APK, save build artifacts, and more:

https://docs.microsoft.com/azure/devops/pipelines/languages/android

name: '$(prime).$(major).$(minor)'

pool: vmImage: 'macos-latest'

steps:

TteamMBK commented 1 month ago

HI team,

this is a urgent issue, we require immediate help on this.

erik-bershel commented 1 month ago

Hey @LeeCeline and @TteamMBK!

Unfortunately, it is not possible to investigate the problem using the information provided. Could you provide an example project with the repro steps? It will also be very cool if you can give access to fallen runs. I would also like to receive answers to the following questions:

Our test projects with gradle work, but there is a possibility that your problem is related to Android more than gradle. We have recently fully migrated to the new service provider for macOS-12 images which has the next problem: https://docs.veertu.com/anka/anka-virtualization-cli/nested-virtualization/#android-emulators The other bad news is that all macOS-13 and macOS-14 images are also hosted on this hypervisor. I think that your build fails on the test stage with an emulator productivity bug. But please feel free to correct me if I wrong.

TteamMBK commented 1 month ago

Hi @erik-bershel

I confirm that there were similar problems before also, but with a lower fail rate. Here are some failure records, with name and date. image

As i can see, we are able to build the project without any error on android studio.

For providing access to fallen runs, we are checking internally that we can provide it to you or not due to policies.

erik-bershel commented 1 month ago

Hey @TteamMBK!

I confirm that there were similar problems before also, but with a lower fail rate.

Then I can say with confidence that your builds are not compatible with the current runners realisation, unfortunately. All I can recommend is to try hints from https://docs.veertu.com/anka/anka-virtualization-cli/nested-virtualization/#android-emulators or to set delay to allow Android emulator to boot. In some cases using GitHub larger runners helps also, but rarely.

I'm going to close this issue as a duplicate of https://github.com/actions/runner-images/issues/9194. Unfortunately, we cannot help with this.

TteamMBK commented 1 month ago

Hi @erik-bershel

Could you please elaborate about "our builds are not compatible with the current runners realisation". So we can understand better and try to approach in a correct way.

erik-bershel commented 1 month ago

Hey @TteamMBK!

Please read the description here: https://docs.veertu.com/anka/anka-virtualization-cli/nested-virtualization/#android-emulators. Another examples: https://github.com/actions/runner-images/issues/9436, https://github.com/actions/runner-images/issues/9199, https://github.com/actions/runner-images/issues/9194

Anka does not support some nested virtualisation features because of some issues with the Apple virtualisation API. It results in poor Android emulator productivity.

TteamMBK commented 1 month ago

@erik-bershel

I went through the sites you provided, but still i am not getting why we are referring our R&D towards android emulator. Please make me clear that it is an android studio/emulator issue or pipeline issue or git issue.

FYI, i am asking you because recently pipeline got success once. we are still not understanding that "why is our pipeline getting failed sometimes"

We are open to connect with you on teams for better understanding of the issue. As we already mentioned, we need to find out its solution asap.

erik-bershel commented 1 month ago

Hey @TteamMBK!

Sure! Let's start from the beginning.

At what step exactly does your build fail? Judging by the available information, it crashes during the testing stage. Since I have no other information about the code/config, I make the assumption that your project can also test the application using the Android Emulator. But as of recently, the already rather poor performance of this tool has reached its minimum among macOS runners due to our platform migration. The emulator's startup time exceeds that of almost any automatic tool which results in timeout while running tests. After the migration all the agents affected by https://docs.veertu.com/anka/anka-virtualization-cli/nested-virtualization/#android-emulators

At the same time, I cannot guarantee 100% that the problem is in the Android emulator - with the available information I can only guess.

We are open to connect with you on teams for better understanding of the issue. As we already mentioned, we need to find out its solution asap.

When you can provide more detailed information about the problem including an example-project or appropriate repro-steps, we can return to investigating the issue. Unfortunately, we do not directly support custom builds.

TteamMBK commented 1 month ago

Hi @erik-bershel

I understood. As i mention above that recently, pipeline got success. So, can i provide you the pipeline success logs also. May be you will get something helpful from it. Success pipeline logs.txt

image We are discussing internally for it, I will let you know in next some hours.

erik-bershel commented 1 month ago

@TteamMBK is it possible to provide failed run logs too? Also, please drop a couple of links to the latest successful and unsuccessful launches (just mark, please, which is which) - then I can check what is happening with the resources.

TteamMBK commented 1 month ago

@erik-bershel

Here are the failed logs. Failed pipeline logs.txt

image

erik-bershel commented 1 month ago

@TteamMBK great, I'll take a look later. Please do not forget about build links also. No matter if private project - I don't need to open it.

TteamMBK commented 1 month ago

@erik-bershel

could you please let me know, from where i can get Build links ?

erik-bershel commented 1 month ago

@TteamMBK

Screenshot 2024-06-12 at 13 28 42
TteamMBK commented 1 month ago

@erik-bershel

For repro steps, we have just pushed the code to the branch from android studio terminal and run the pipeline as usual, as the result, Sometimes pipeline getting failed and sometimes success, we haven't done anything special and followed general practice.

Links for Failure pipeline :

Gradle link :- https://daimler.visualstudio.com/Mercedes%20me%20Care/_build/results?buildId=5828955&view=logs&j=6b902995-b73d-5f5c-66fd-a7f66c857d2c&t=5c3b534e-a10d-5c45-5d5d-5f2c6dac839b

Bash :- https://daimler.visualstudio.com/Mercedes%20me%20Care/_build/results?buildId=5828955&view=logs&j=6b902995-b73d-5f5c-66fd-a7f66c857d2c&t=fb7842c6-7d51-58d9-ffcc-3576dc9c2f8b

Links for Success pipeline :

Gradle link : https://daimler.visualstudio.com/Mercedes%20me%20Care/_build/results?buildId=5759480&view=logs&j=12f1170f-54f2-53f3-20dd-22fc7dff55f9&t=ea098990-53e4-52aa-5a84-5ead7c5f17f2

Bash : https://daimler.visualstudio.com/Mercedes%20me%20Care/_build/results?buildId=5759480&view=logs&j=12f1170f-54f2-53f3-20dd-22fc7dff55f9&t=efa2bfe1-554a-50c8-79b6-ef106ad3c7c2

TteamMBK commented 1 month ago

Hi @erik-bershel

is there any update on the issue ?

TteamMBK commented 2 weeks ago

Hi @erik-bershel

Its been 2 weeks, we are in very urgent situation, this pipeline issue is creating a blockage for our application release and has many bad impact on business. Could you please help us on priority to fix this issue together.

vinaynaikr08 commented 1 week ago

Hi @TteamMBK

Is the issue still ongoing? Could you please attach the latest failure and success logs so that we can analyze them?

TteamMBK commented 1 week ago

Hi @vinaynaikr08,

Our project is in very difficult situation right now, we are facing blockage because of the pipeline issue. Please try to provide quick support. I am sharing success and failure logs of pipeline. Please analyse and let me know if you need any other details.

latest failed logs.txt latest success logs.txt

TteamMBK commented 15 hours ago

Hi @erik-bershel

any updates on the tickets.