New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 916733 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Using r8 for cronet_smoketests_platform_only_instrumentation_apk

Project Member Reported by wnwen@chromium.org, Dec 19

Issue description

Run:
./components/cronet/tools/cr_cronet.py gn --out_dir=out/Cronet
ninja -C out/Cronet cronet_smoketests_platform_only_instrumentation_apk

Expected:
Build completes with no additional output.

Actual:
[875/880] ACTION //components/cronet/android:cronet_smoketests_p...apk__apk__final_dex(//build/toolchain/android:android_clang_arm) 
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/channel/sctp/nio/NioSctpChannel.class:                    
  Type `com.sun.nio.sctp.MessageInfo` was not found, it is required for default or static interface methods desugaring of `boolean i
o.netty.channel.sctp.nio.NioSctpChannel.doWriteMessage(java.lang.Object, io.netty.channel.ChannelOutboundBuffer)`                  
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/channel/udt/nio/NioUdtByteConnectorChannel$2.class:       
  Type `com.barchart.udt.StatusUDT` was not found, it is required for default or static interface methods desugaring of `void io.net
ty.channel.udt.nio.NioUdtByteConnectorChannel$2.<clinit>()`                                                                         
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/channel/udt/nio/NioUdtProvider$1.class:                   
  Type `com.barchart.udt.nio.KindUDT` was not found, it is required for default or static interface methods desugaring of `void io.n
etty.channel.udt.nio.NioUdtProvider$1.<clinit>()`                                                                                   
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/channel/udt/nio/NioUdtProvider$1.class:                   
  Type `com.barchart.udt.TypeUDT` was not found, it is required for default or static interface methods desugaring of `void io.netty
.channel.udt.nio.NioUdtProvider$1.<clinit>()`                                                                                       
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/handler/codec/compression/LzfEncoder.class:               
  Type `com.ning.compress.lzf.LZFEncoder` was not found, it is required for default or static interface methods desugaring of `void 
io.netty.handler.codec.compression.LzfEncoder.encode(io.netty.channel.ChannelHandlerContext, io.netty.buffer.ByteBuf, io.netty.buffe
r.ByteBuf)`                                                                                                                         
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/handler/codec/protobuf/ProtobufEncoderNano.class:         
  Type `com.google.protobuf.nano.CodedOutputByteBufferNano` was not found, it is required for default or static interface methods de
sugaring of `void io.netty.handler.codec.protobuf.ProtobufEncoderNano.encode(io.netty.channel.ChannelHandlerContext, com.google.prot
obuf.nano.MessageNano, java.util.List)`
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/handler/codec/protobuf/ProtobufDecoderNano.class:         
  Type `com.google.protobuf.nano.MessageNano` was not found, it is required for default or static interface methods desugaring of `v
oid io.netty.handler.codec.protobuf.ProtobufDecoderNano.decode(io.netty.channel.ChannelHandlerContext, io.netty.buffer.ByteBuf, java
.util.List)`                                                                                                                        
Warning in lib.java/third_party/junit/junit.jar:org/junit/internal/runners/statements/FailOnTimeout.class:
  Type `java.lang.management.ManagementFactory` was not found, it is required for default or static interface methods desugaring of
`long org.junit.internal.runners.statements.FailOnTimeout.cpuTime(java.lang.Thread)`
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/channel/sctp/nio/NioSctpChannel.class:
  Type `com.sun.nio.sctp.SctpChannel` was not found, it is required for default or static interface methods desugaring of `com.sun.n
io.sctp.SctpChannel io.netty.channel.sctp.nio.NioSctpChannel.newSctpChannel()`
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/channel/sctp/nio/NioSctpServerChannel.class:
  Type `com.sun.nio.sctp.SctpServerChannel` was not found, it is required for default or static interface methods desugaring of `com
.sun.nio.sctp.SctpServerChannel io.netty.channel.sctp.nio.NioSctpServerChannel.newSocket()`
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/channel/udt/nio/NioUdtProvider.class:
  Type `com.barchart.udt.nio.SelectorProviderUDT` was not found, it is required for default or static interface methods desugaring o
f `com.barchart.udt.nio.ServerSocketChannelUDT io.netty.channel.udt.nio.NioUdtProvider.newAcceptorChannelUDT(com.barchart.udt.TypeUD
T)`
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/handler/ssl/JdkAlpnSslEngine.class:
  Type `org.eclipse.jetty.alpn.ALPN` was not found, it is required for default or static interface methods desugaring of `void io.ne
tty.handler.ssl.JdkAlpnSslEngine.closeInbound()`
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/handler/ssl/JdkNpnSslEngine.class:
  Type `org.eclipse.jetty.npn.NextProtoNego` was not found, it is required for default or static interface methods desugaring of `vo
id io.netty.handler.ssl.JdkNpnSslEngine.closeOutbound()`
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/util/internal/logging/CommonsLoggerFactory.class:
  Type `org.apache.commons.logging.LogFactory` was not found, it is required for default or static interface methods desugaring of `
io.netty.util.internal.logging.InternalLogger io.netty.util.internal.logging.CommonsLoggerFactory.newInstance(java.lang.String)`
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/util/internal/logging/Log4J2LoggerFactory.class:
  Type `org.apache.logging.log4j.LogManager` was not found, it is required for default or static interface methods desugaring of `io
.netty.util.internal.logging.InternalLogger io.netty.util.internal.logging.Log4J2LoggerFactory.newInstance(java.lang.String)`
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/util/internal/logging/Slf4JLoggerFactory.class:
  Type `org.slf4j.LoggerFactory` was not found, it is required for default or static interface methods desugaring of `io.netty.util.
internal.logging.InternalLogger io.netty.util.internal.logging.Slf4JLoggerFactory.newInstance(java.lang.String)`
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/handler/codec/compression/LzfDecoder.class:
  Type `com.ning.compress.lzf.util.ChunkDecoderFactory` was not found, it is required for default or static interface methods desuga
ring of `void io.netty.handler.codec.compression.LzfDecoder.<init>(boolean)`
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/handler/codec/compression/LzfDecoder.class:
  Type `com.ning.compress.BufferRecycler` was not found, it is required for default or static interface methods desugaring of `void
io.netty.handler.codec.compression.LzfDecoder.<init>(boolean)`
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/util/internal/logging/Log4JLoggerFactory.class:
  Type `org.apache.log4j.Logger` was not found, it is required for default or static interface methods desugaring of `io.netty.util.
internal.logging.InternalLogger io.netty.util.internal.logging.Log4JLoggerFactory.newInstance(java.lang.String)`
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/handler/codec/compression/LzfEncoder.class:
  Type `com.ning.compress.lzf.util.ChunkEncoderFactory` was not found, it is required for default or static interface methods desuga
ring of `void io.netty.handler.codec.compression.LzfEncoder.<init>(boolean, int)`
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/channel/rxtx/RxtxChannel.class:
  Type `gnu.io.CommPortIdentifier` was not found, it is required for default or static interface methods desugaring of `void io.nett
y.channel.rxtx.RxtxChannel.doConnect(java.net.SocketAddress, java.net.SocketAddress)`
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/handler/codec/compression/Lz4FrameDecoder.class:
  Type `net.jpountz.xxhash.XXHashFactory` was not found, it is required for default or static interface methods desugaring of `void
io.netty.handler.codec.compression.Lz4FrameDecoder.<init>(net.jpountz.lz4.LZ4Factory, boolean)`
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/handler/codec/compression/Lz4FrameDecoder.class:
  Type `net.jpountz.lz4.LZ4Factory` was not found, it is required for default or static interface methods desugaring of `void io.net
ty.handler.codec.compression.Lz4FrameDecoder.<init>(boolean)`
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/handler/ssl/JdkNpnSslEngine$1.class:
  Interface `org.eclipse.jetty.npn.NextProtoNego$ServerProvider` not found. It's needed to make sure desugaring of `io.netty.handler
.ssl.JdkNpnSslEngine$1` is correct. Desugaring will assume that this interface has no default method.
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/handler/ssl/JdkAlpnSslEngine$1.class:
  Interface `org.eclipse.jetty.alpn.ALPN$ServerProvider` not found. It's needed to make sure desugaring of `io.netty.handler.ssl.Jdk
AlpnSslEngine$1` is correct. Desugaring will assume that this interface has no default method.
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/handler/ssl/JdkAlpnSslEngine$2.class:
  Interface `org.eclipse.jetty.alpn.ALPN$ClientProvider` not found. It's needed to make sure desugaring of `io.netty.handler.ssl.Jdk
AlpnSslEngine$2` is correct. Desugaring will assume that this interface has no default method.
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/handler/ssl/JdkNpnSslEngine$2.class:
  Interface `org.eclipse.jetty.npn.NextProtoNego$ClientProvider` not found. It's needed to make sure desugaring of `io.netty.handler
.ssl.JdkNpnSslEngine$2` is correct. Desugaring will assume that this interface has no default method.
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/handler/codec/marshalling/ChannelBufferByteOutput.class:
  Interface `org.jboss.marshalling.ByteOutput` not found. It's needed to make sure desugaring of `io.netty.handler.codec.marshalling
.ChannelBufferByteOutput` is correct. Desugaring will assume that this interface has no default method.
Warning in lib.java/third_party/netty4/netty-all-4.1.9.Final.jar:io/netty/handler/codec/marshalling/ChannelBufferByteInput.class:
  Interface `org.jboss.marshalling.ByteInput` not found. It's needed to make sure desugaring of `io.netty.handler.codec.marshalling.
ChannelBufferByteInput` is correct. Desugaring will assume that this interface has no default method.
Warning in lib.java/third_party/android_deps/com_android_support_support_compat_java.jar:android/support/v4/util/ArrayMap$1.class:
  Invalid signature 'Landroid/support/v4/util/MapCollections<TK;TV;>.EntrySet;' for field android.support.v4.util.MapCollections$Ent
rySet android.support.v4.util.ArrayMap$1.mEntrySet.
Signature is ignored and will not be present in the output.
Parser error: Unknown error parsing field signature: String index out of range: -30
Warning in lib.java/third_party/android_deps/com_android_support_support_compat_java.jar:android/support/v4/util/ArrayMap$1.class:
  Invalid signature 'Landroid/support/v4/util/MapCollections<TK;TV;>.KeySet;' for field android.support.v4.util.MapCollections$KeySe
t android.support.v4.util.ArrayMap$1.mKeySet.
Signature is ignored and will not be present in the output.
Parser error: Unknown error parsing field signature: String index out of range: -30
Warning in lib.java/third_party/android_deps/com_android_support_support_compat_java.jar:android/support/v4/util/ArrayMap$1.class:
  Invalid signature 'Landroid/support/v4/util/MapCollections<TK;TV;>.ValuesCollection;' for field android.support.v4.util.MapCollect
ions$ValuesCollection android.support.v4.util.ArrayMap$1.mValues.
Signature is ignored and will not be present in the output.
Parser error: Unknown error parsing field signature: String index out of range: -30
[880/880] STAMP obj/components/cronet/android/cronet_smoketests_platform_only_instrumentation_apk.stamp
 
The warnings are expected, but are not silenced in r8:

cat third_party/netty4/proguard.flags 
# Netty4 references a number of classes that aren't included in the jar, and are
# not found in third_party.
-dontwarn org.jboss.marshalling.**
-dontwarn org.eclipse.jetty.**
-dontwarn com.sun.nio.sctp.**
Not sure if this is an r8 bug, but it doesn't seem to be failing the build:
Warning in lib.java/third_party/android_deps/com_android_support_support_compat_java.jar:android/support/v4/util/ArrayMap$1.class:
  Invalid signature 'Landroid/support/v4/util/MapCollections<TK;TV;>.EntrySet;' for field android.support.v4.util.MapCollections$Ent
rySet android.support.v4.util.ArrayMap$1.mEntrySet.                                               
Signature is ignored and will not be present in the output.                                                        
Parser error: Unknown error parsing field signature: String index out of range: -30
Looks like most warnings are specific to desugaring.
The "String index out of range" ones sound like r8 bugs though.

Maybe include GN args, then ask r8-team to have a look?
I've raised that index out of range bug with them here: issuetracker.google.com/issues/120432751

GN args for out/Cronet:

target_os = "android"
enable_websockets = false
disable_file_support = true
disable_ftp_support = true
disable_brotli_filter = false
is_component_build = false
use_crash_key_stubs = true
ignore_elf32_limitations = true
use_partition_alloc = false
include_transport_security_state_preload_list = false
use_goma = true
use_platform_icu_alternatives = true
use_errorprone_java_compiler = true
enable_reporting = true
arm_use_neon = false

experimental_use_r8=true # Only new one not from the script
Project Member

Comment 6 by bugdroid1@chromium.org, Jan 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8a5a16af058dc617f161906a9d1698d85b8ddcb3

commit 8a5a16af058dc617f161906a9d1698d85b8ddcb3
Author: Peter Wen <wnwen@chromium.org>
Date: Wed Jan 02 18:23:37 2019

Android: Replace desugar with d8 and r8 for debug

For release builds, desugar.jar still runs first, before d8 or r8, so
nothing is changing for them as by the time d8 or r8 runs, the code has
already been desugared.

When r8 is enabled, it can desugar all targets that enable proguard, and
d8 can desugar all targets that do not enable proguard.

This can only be turned on once r8 replaces proguard since proguard does
not understand java 8 code that has not been desugared already.

Bug: 906803, 913679, 916733
Change-Id: I3fcc5a20b38e7fdc78cdeed1533583675d58346b
Reviewed-on: https://chromium-review.googlesource.com/c/1384945
Reviewed-by: Sam Maier <smaier@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619434}
[modify] https://crrev.com/8a5a16af058dc617f161906a9d1698d85b8ddcb3/build/android/gyp/dex.py
[modify] https://crrev.com/8a5a16af058dc617f161906a9d1698d85b8ddcb3/build/android/gyp/proguard.py
[modify] https://crrev.com/8a5a16af058dc617f161906a9d1698d85b8ddcb3/build/config/android/internal_rules.gni

Project Member

Comment 7 by bugdroid1@chromium.org, Jan 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1b8dd7181bd85722196bdf056a17f5e90f9ad7d5

commit 1b8dd7181bd85722196bdf056a17f5e90f9ad7d5
Author: Thomas Anderson <thomasanderson@chromium.org>
Date: Wed Jan 02 19:07:28 2019

Revert "Android: Replace desugar with d8 and r8 for debug"

This reverts commit 8a5a16af058dc617f161906a9d1698d85b8ddcb3.

Reason for revert: Suspected cause of breakage on android-rel:
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/android-rel/6359

Original change's description:
> Android: Replace desugar with d8 and r8 for debug
> 
> For release builds, desugar.jar still runs first, before d8 or r8, so
> nothing is changing for them as by the time d8 or r8 runs, the code has
> already been desugared.
> 
> When r8 is enabled, it can desugar all targets that enable proguard, and
> d8 can desugar all targets that do not enable proguard.
> 
> This can only be turned on once r8 replaces proguard since proguard does
> not understand java 8 code that has not been desugared already.
> 
> Bug: 906803, 913679, 916733
> Change-Id: I3fcc5a20b38e7fdc78cdeed1533583675d58346b
> Reviewed-on: https://chromium-review.googlesource.com/c/1384945
> Reviewed-by: Sam Maier <smaier@chromium.org>
> Commit-Queue: Peter Wen <wnwen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#619434}

TBR=wnwen@chromium.org,smaier@chromium.org

Change-Id: I5591321bd6369f4fb9de3f1519b2c823775c048b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 906803, 913679, 916733
Reviewed-on: https://chromium-review.googlesource.com/c/1393425
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619447}
[modify] https://crrev.com/1b8dd7181bd85722196bdf056a17f5e90f9ad7d5/build/android/gyp/dex.py
[modify] https://crrev.com/1b8dd7181bd85722196bdf056a17f5e90f9ad7d5/build/android/gyp/proguard.py
[modify] https://crrev.com/1b8dd7181bd85722196bdf056a17f5e90f9ad7d5/build/config/android/internal_rules.gni

Project Member

Comment 8 by bugdroid1@chromium.org, Jan 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/856c6214bf1fbd7730a7ef609720470f2999befc

commit 856c6214bf1fbd7730a7ef609720470f2999befc
Author: Peter Wen <wnwen@chromium.org>
Date: Wed Jan 02 21:28:03 2019

Reland "Android: Replace desugar with d8 and r8 for debug"

Original CL: https://chromium-review.googlesource.com/c/chromium/src/+/1384945

Fixes:
 - Use the new r8 flags
 - Use java_runtime_classpath when javac_full_interface_classpath is not
   available.

Bug: 906803, 913679, 916733
Change-Id: Iedf88ac5b0b9a9277a97d3cbcad24ee44eb61607
Reviewed-on: https://chromium-review.googlesource.com/c/1393466
Reviewed-by: Sam Maier <smaier@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619498}
[modify] https://crrev.com/856c6214bf1fbd7730a7ef609720470f2999befc/build/android/gyp/dex.py
[modify] https://crrev.com/856c6214bf1fbd7730a7ef609720470f2999befc/build/android/gyp/proguard.py
[modify] https://crrev.com/856c6214bf1fbd7730a7ef609720470f2999befc/build/config/android/internal_rules.gni

Status: Untriaged (was: Available)
Available, but no owner or component? Please find a component, as no one will ever find this without one.
Project Member

Comment 10 by bugdroid1@chromium.org, Jan 16 (6 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0807a3f79fd0572ad73f127111d7626262c1e655

commit 0807a3f79fd0572ad73f127111d7626262c1e655
Author: Tibor Goldschwendt <tiborg@chromium.org>
Date: Wed Jan 16 23:30:00 2019

Revert "Reland "Android: Replace desugar with d8 and r8 for debug""

This reverts commit 856c6214bf1fbd7730a7ef609720470f2999befc.

Reason for revert: breaks modularization (crbug/922638)

Original change's description:
> Reland "Android: Replace desugar with d8 and r8 for debug"
> 
> Original CL: https://chromium-review.googlesource.com/c/chromium/src/+/1384945
> 
> Fixes:
>  - Use the new r8 flags
>  - Use java_runtime_classpath when javac_full_interface_classpath is not
>    available.
> 
> Bug: 906803, 913679, 916733
> Change-Id: Iedf88ac5b0b9a9277a97d3cbcad24ee44eb61607
> Reviewed-on: https://chromium-review.googlesource.com/c/1393466
> Reviewed-by: Sam Maier <smaier@chromium.org>
> Commit-Queue: Peter Wen <wnwen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#619498}

TBR=wnwen@chromium.org,smaier@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 906803, 913679, 916733,  922638 
Change-Id: I28bdeec6c482cdd7a663a69cb6475f2fa25bd1f8
Reviewed-on: https://chromium-review.googlesource.com/c/1415793
Reviewed-by: Tibor Goldschwendt <tiborg@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Commit-Queue: Tibor Goldschwendt <tiborg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623446}
[modify] https://crrev.com/0807a3f79fd0572ad73f127111d7626262c1e655/build/android/gyp/dex.py
[modify] https://crrev.com/0807a3f79fd0572ad73f127111d7626262c1e655/build/android/gyp/proguard.py
[modify] https://crrev.com/0807a3f79fd0572ad73f127111d7626262c1e655/build/config/android/internal_rules.gni

Sign in to add a comment