DesugarDexSharding error (Too many open files) when running mobile-install-v3 on large codebase
Maintainers usually reply within 6 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Domain
- build-system, mobile-dev
Research direction
Reproduce mobile-install-v3 on a large codebase with patched Bazel 7.7.1, rules_android 0.7.1, and macOS Tahoe 26.2. Start with DesugarDexShardingAction.java and the Desugar.java stack-trace entries; done means identifying the cause of the open-file failure and confirming the command succeeds.
Written by the indexing model from the issue text.
Description
We experience an issue when running mobile-install-v3 on a large codebase.
Error log
ERROR: non zero exit: worker spawn failed for DesugarDexSharding
java.lang.IllegalStateException: Desugar failed with exit code: 1
at com.google.devtools.build.android.DesugarDexShardingAction.desugar(DesugarDexShardingAction.java:166)
at com.google.devtools.build.android.DesugarDexShardingAction.processRequest(DesugarDexShardingAction.java:391)
at com.google.devtools.build.android.DesugarDexShardingAction.processRequestForWorker(DesugarDexShardingAction.java:335)
at com.google.devtools.build.android.DesugarDexShardingAction.lambda$runPersistentWorker$0(DesugarDexShardingAction.java:319)
at com.google.devtools.build.lib.worker.WorkRequestHandler$WorkRequestCallback.apply(WorkRequestHandler.java:252)
at com.google.devtools.build.lib.worker.WorkRequestHandler.respondToRequest(WorkRequestHandler.java:480)
at com.google.devtools.build.lib.worker.WorkRequestHandler.lambda$startResponseThread$1(WorkRequestHandler.java:433)
at java.base/java.lang.Thread.run(Thread.java:1583)
bazel-out/darwin_arm64-dbg-android-ST-e30d6f35036d/bin/<redacted path>/example.abi.jar
java.io.UncheckedIOException: bazel-out/darwin_arm64-dbg-android-ST-e30d6f35036d/bin/<redacted path>/example.abi.jar
at com.android.tools.r8.ArchiveClassFileProvider.d(R8_8.9.35_b4dbea2f8bdfdf2cab3ae611558fd558945d3a458bfc50ef035fc9f5ad630d56:22)
at com.android.tools.r8.ArchiveClassFileProvider.c(R8_8.9.35_b4dbea2f8bdfdf2cab3ae611558fd558945d3a458bfc50ef035fc9f5ad630d56:4)
at com.android.tools.r8.ArchiveClassFileProvider.<init>(R8_8.9.35_b4dbea2f8bdfdf2cab3ae611558fd558945d3a458bfc50ef035fc9f5ad630d56:27)
at com.android.tools.r8.ArchiveClassFileProvider.<init>(R8_8.9.35_b4dbea2f8bdfdf2cab3ae611558fd558945d3a458bfc50ef035fc9f5ad630d56:1)
at com.google.devtools.build.android.r8.Desugar.desugar(Desugar.java:449)
at com.google.devtools.build.android.r8.Desugar.processRequest(Desugar.java:604)
at com.google.devtools.build.android.DesugarDexShardingAction.desugar(DesugarDexShardingAction.java:164)
at com.google.devtools.build.android.DesugarDexShardingAction.processRequest(DesugarDexShardingAction.java:391)
[ted-xie](https://github.com/ted-xie)
ted-xie commented [12 hours ago](https://github.com/bazelbuild/rules_android/issues/449#issuecomment-4239093131)
ted-xie
12 hours ago
Using patched bazel 7.7.1
Using rules_android 0.7.1
OS: Tahoe 26.2
- Dominant language
- Java
- Stars
- 205
- Forks
- 113
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bazelbuild/rules_android
-
build_java8_legacy_dex.sh does not set JAVA_RUNFILES for the d8/r8 launchersPossibly taken @TrapsterDK claimed this 17 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bazelbuild/rules_android#599 ·
Maintainers usually reply within 6 days
-
`Desugar` actions don't run on multiplex workersPossibly taken @lukaciko claimed this 46 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
bazelbuild/rules_android#539 · 2 comments ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
bazelbuild/rules_android#535 · 2 reactions ·
Maintainers usually reply within 6 days
-
desugar_globals output is not reproducible (zip entry order varies)Possibly taken @TrapsterDK claimed this 6 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
bazelbuild/rules_android#610 ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
bazelbuild/rules_android#602 ·
Maintainers usually reply within 6 days
All issues in bazelbuild/rules_android
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Lincoln-cn/JAiRouter#1473 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
exercism/java-analyzer#379 ·
-
area: ui bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
tetsuji16/microProject#1893 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
liberation-data/fornax4j#325 ·
Maintainers usually reply within 1 day
-
[Bug]: FE and Kinesis extraction pipes render flow starting at the centre and scroll the source arm backwardsPossibly taken @chonkzillaofficial claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
BCCE-team/BuildCraft#85 ·