Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bazel installs GB's of data without warning #122

Closed
nerkn opened this issue Mar 21, 2022 · 3 comments
Closed

bazel installs GB's of data without warning #122

nerkn opened this issue Mar 21, 2022 · 3 comments

Comments

@nerkn
Copy link

nerkn commented Mar 21, 2022

Hi,
Just testing a c++ library, that is requiring tcmalloc, following quickstart(https://github.com/google/tcmalloc/blob/master/docs/quickstart.md) guide, bazel started to install GB's of irrelevant data.

Analyzing: 381 targets (77 packages loaded, 2574 targets configured)
Fetching @remotejdk11_linux; fetching 17s
Fetching @remote_java_tools; fetching 17s
Fetching https://mirror.bazel.build/bazel_java_tools/releases/java/v11.6/java_tools-v11.6.zip; 43,818,688B 17s
Fetching https://mirror.bazel.build/openjdk/azul-zulu11.50.19-ca-jdk11.0.12/zulu11.50.19-ca-jdk11.0.12-linux_x64.tar.gz;

I dont have patience to install this much garbage, nor this machine has storage and internet is limited. I cant understand why should java work to use c++ lib?

After an hour tests failed as follows:

Compiling tcmalloc/huge_page_aware_allocator.cc; 0s linux-sandbox
at java.base/sun.nio.cs.StreamEncoder.implWrite(Unknown Source)	
    at java.base/sun.nio.cs.StreamEncoder.implWrite(Unknown Source)	
    at java.base/sun.nio.cs.StreamEncoder.write(Unknown Source)	
    at java.base/sun.nio.cs.StreamEncoder.write(Unknown Source)	
    at java.base/java.io.OutputStreamWriter.write(Unknown Source)	
    at java.base/java.io.Writer.write(Unknown Source)	
    at com.google.devtools.build.lib.util.SimpleLogHandler$Output.write(SimpleLogHandler.java:766)
    at com.google.devtools.build.lib.util.SimpleLogHandler.publish(SimpleLogHandler.java:422)	
    at java.logging/java.util.logging.Logger.log(Unknown Source)	
    at com.google.common.flogger.backend.system.AbstractBackend.log(AbstractBackend.java:76)	
    at com.google.common.flogger.backend.system.SimpleLoggerBackend.log(SimpleLoggerBackend.java:31)	
    at com.google.common.flogger.AbstractLogger.write(AbstractLogger.java:137)	
    at com.google.common.flogger.LogContext.logImpl(LogContext.java:566)	
    at com.google.common.flogger.LogContext.log(LogContext.java:686)	
    at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:623)	
    at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:382)	
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)	
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)	
    at java.base/java.lang.Thread.run(Unknown Source)
    INFO: Elapsed time: 1449.827s, Critical Path: 187.01s
    INFO: 1929 processes: 506 internal, 1423 linux-sandbox.
    FAILED: Build did NOT complete successfully
    //tcmalloc:arena_test                                                 NO STATUS
    //tcmalloc:central_freelist_test                                      NO STATUS
    //tcmalloc:cpu_cache_activate_test                                    NO STATUS
    //tcmalloc:cpu_cache_test                                             NO STATUS
    //tcmalloc:experiment_config_test                                     NO STATUS
    //tcmalloc:experiment_fuzz                                            NO STATUS
    //tcmalloc:guarded_page_allocator_test                                NO STATUS
    //tcmalloc:heap_profiling_test                                        NO STATUS
    //tcmalloc:huge_address_map_test                                      NO STATUS
    //tcmalloc:huge_allocator_test                                        NO STATUS
    //tcmalloc:huge_cache_test                                            NO STATUS
    //tcmalloc:huge_page_filler_test                                      NO STATUS
    //tcmalloc:lifetime_based_allocator_test                              NO STATUS
    //tcmalloc:malloc_extension_system_malloc_test                        NO STATUS
    //tcmalloc:new_extension_test_256k_pages_and_numa_disabled            NO STATUS
    //tcmalloc:new_extension_test_32k_pages                               NO STATUS
    //tcmalloc:new_extension_test_8k_pages                                NO STATUS
    //tcmalloc:new_extension_test_small_but_slow                          NO STATUS
    //tcmalloc:page_allocator_test                                        NO STATUS
    //tcmalloc:page_heap_test                                             NO STATUS
    //tcmalloc:pagemap_test                                               NO STATUS
    //tcmalloc:profile_marshaler_test                                     NO STATUS
    //tcmalloc:profile_test                                               NO STATUS
    //tcmalloc:realloc_test                                               NO STATUS
    //tcmalloc:runtime_size_classes_fuzz                                  NO STATUS
    //tcmalloc:runtime_size_classes_test                                  NO STATUS
    //tcmalloc:sampled_allocation_recorder_test                           NO STATUS
    //tcmalloc:sampled_allocation_test                                    NO STATUS
    //tcmalloc:size_classes_test_256k_pages                               NO STATUS
    //tcmalloc:size_classes_test_256k_pages_and_numa_disabled             NO STATUS
    //tcmalloc:size_classes_test_256k_pages_and_numa_enabled              NO STATUS
    //tcmalloc:size_classes_test_256k_pages_pow2                          NO STATUS
    //tcmalloc:size_classes_test_256k_pages_pow2_below64                  NO STATUS
    //tcmalloc:size_classes_test_256k_pages_pow2_sharded_transfer_cache   NO STATUS
    //tcmalloc:size_classes_test_256k_pages_pow2_with_per_ccx             NO STATUS
    //tcmalloc:size_classes_test_8k_pages                                 NO STATUS
    //tcmalloc:size_classes_test_8k_pages_not_hotcold                     NO STATUS
    //tcmalloc:size_classes_test_numa_aware                               NO STATUS
    //tcmalloc:size_classes_test_ring_buffer_transfer_cache               NO STATUS
    //tcmalloc:span_test_256k_pages                                       NO STATUS
    //tcmalloc:span_test_256k_pages_and_numa_disabled                     NO STATUS
    //tcmalloc:span_test_256k_pages_pow2                                  NO STATUS
    //tcmalloc:span_test_256k_pages_pow2_below64                          NO STATUS
    //tcmalloc:span_test_256k_pages_pow2_sharded_transfer_cache           NO STATUS
    //tcmalloc:span_test_256k_pages_pow2_with_per_ccx                     NO STATUS
    //tcmalloc:span_test_32k_pages                                        NO STATUS
    //tcmalloc:span_test_8k_pages                                         NO STATUS
    //tcmalloc:span_test_8k_pages_not_hotcold                             NO STATUS
    //tcmalloc:span_test_numa_aware                                       NO STATUS
    //tcmalloc:span_test_ring_buffer_transfer_cache                       NO STATUS
    //tcmalloc:span_test_small_but_slow                                   NO STATUS
    //tcmalloc:stack_trace_table_test                                     NO STATUS
    //tcmalloc:stats_test                                                 NO STATUS
    //tcmalloc:system-alloc_test                                          NO STATUS
    //tcmalloc:tcmalloc_large_test                                        NO STATUS
    //tcmalloc:thread_cache_test                                          NO STATUS
    //tcmalloc:transfer_cache_fuzz                                        NO STATUS
    //tcmalloc:transfer_cache_test                                        NO STATUS
    //tcmalloc/internal:cache_topology_test                               NO STATUS
    //tcmalloc/internal:environment_test                                  NO STATUS
    //tcmalloc/internal:lifetime_tracker_test                             NO STATUS
    //tcmalloc/internal:linked_list_test                                  NO STATUS
    //tcmalloc/internal:memory_stats_test                                 NO STATUS
    //tcmalloc/internal:numa_fuzz                                         NO STATUS
    //tcmalloc/internal:numa_test                                         NO STATUS
    //tcmalloc/internal:percpu_tcmalloc_test                              NO STATUS
    //tcmalloc/internal:profile_builder_test                              NO STATUS
    //tcmalloc/internal:range_tracker_test                                NO STATUS
    //tcmalloc/internal:timeseries_tracker_test                           NO STATUS
    //tcmalloc/testing:current_allocated_bytes_test                       NO STATUS
    //tcmalloc/testing:default_parameters_test_256k_pages_and_numa_disabled NO STATUS
    //tcmalloc/testing:default_parameters_test_256k_pages_pow2            NO STATUS
    //tcmalloc/testing:default_parameters_test_256k_pages_pow2_below64    NO STATUS
    //tcmalloc/testing:default_parameters_test_32k_pages                  NO STATUS
    //tcmalloc/testing:default_parameters_test_8k_pages                   NO STATUS
    //tcmalloc/testing:default_parameters_test_8k_pages_not_hotcold       NO STATUS
    //tcmalloc/testing:default_parameters_test_numa_aware                 NO STATUS
    //tcmalloc/testing:default_parameters_test_ring_buffer_transfer_cache NO STATUS
    //tcmalloc/testing:empirical_distributions_test                       NO STATUS
    //tcmalloc/testing:empirical_driver_constant_test                     NO STATUS
    //tcmalloc/testing:empirical_driver_distribution_test                 NO STATUS
    //tcmalloc/testing:empirical_driver_e2e                               NO STATUS
    //tcmalloc/testing:empirical_driver_record_and_replay_e2e             NO STATUS
    //tcmalloc/testing:empirical_test                                     NO STATUS
    //tcmalloc/testing:frag_test                                          NO STATUS
    //tcmalloc/testing:get_stats_test                                     NO STATUS
    //tcmalloc/testing:large_alloc_size_test                              NO STATUS
    //tcmalloc/testing:largesmall_frag_test_256k_pages                    NO STATUS
    //tcmalloc/testing:largesmall_frag_test_256k_pages_and_numa_disabled  NO STATUS
    //tcmalloc/testing:largesmall_frag_test_256k_pages_and_numa_enabled   NO STATUS
    //tcmalloc/testing:largesmall_frag_test_256k_pages_pow2               NO STATUS
    //tcmalloc/testing:largesmall_frag_test_256k_pages_pow2_below64       NO STATUS
    //tcmalloc/testing:largesmall_frag_test_256k_pages_pow2_sharded_transfer_cache NO STATUS
    //tcmalloc/testing:largesmall_frag_test_256k_pages_pow2_with_per_ccx  NO STATUS
    //tcmalloc/testing:largesmall_frag_test_32k_pages                     NO STATUS
    //tcmalloc/testing:largesmall_frag_test_8k_pages                      NO STATUS
    //tcmalloc/testing:largesmall_frag_test_8k_pages_not_hotcold          NO STATUS
    //tcmalloc/testing:largesmall_frag_test_numa_aware                    NO STATUS
    //tcmalloc/testing:largesmall_frag_test_ring_buffer_transfer_cache    NO STATUS
    //tcmalloc/testing:largesmall_frag_test_small_but_slow                NO STATUS
    //tcmalloc/testing:lifetimes_test                                     NO STATUS
    //tcmalloc/testing:limit_test                                         NO STATUS
    //tcmalloc/testing:limit_test_hpaa                                    NO STATUS
    //tcmalloc/testing:markidle_test                                      NO STATUS
    //tcmalloc/testing:memory_errors_test                                 NO STATUS
    //tcmalloc/testing:no_deps_per_cpu_test_256k_pages                    NO STATUS
    //tcmalloc/testing:no_deps_per_cpu_test_256k_pages_and_numa_disabled  NO STATUS
    //tcmalloc/testing:no_deps_per_cpu_test_256k_pages_pow2               NO STATUS
    //tcmalloc/testing:no_deps_per_cpu_test_256k_pages_pow2_below64       NO STATUS
    //tcmalloc/testing:no_deps_per_cpu_test_256k_pages_pow2_sharded_transfer_cache NO STATUS
    //tcmalloc/testing:no_deps_per_cpu_test_256k_pages_pow2_with_per_ccx  NO STATUS
    //tcmalloc/testing:no_deps_per_cpu_test_32k_pages                     NO STATUS
    //tcmalloc/testing:no_deps_per_cpu_test_8k_pages_not_hotcold          NO STATUS
    //tcmalloc/testing:no_deps_per_cpu_test_numa_aware                    NO STATUS
    //tcmalloc/testing:no_deps_per_cpu_test_small_but_slow                NO STATUS
    //tcmalloc/testing:no_deps_test_256k_pages                            NO STATUS
    //tcmalloc/testing:no_deps_test_256k_pages_pow2                       NO STATUS
    //tcmalloc/testing:no_deps_test_256k_pages_pow2_with_per_ccx          NO STATUS
    //tcmalloc/testing:no_deps_test_8k_pages                              NO STATUS
    //tcmalloc/testing:no_deps_test_8k_pages_not_hotcold                  NO STATUS
    //tcmalloc/testing:no_deps_test_numa_aware                            NO STATUS
    //tcmalloc/testing:no_deps_test_ring_buffer_transfer_cache            NO STATUS
    //tcmalloc/testing:no_deps_test_small_but_slow                        NO STATUS
    //tcmalloc/testing:outofmemory_test                                   NO STATUS
    //tcmalloc/testing:profile_test_256k_pages                            NO STATUS
    //tcmalloc/testing:profile_test_256k_pages_and_numa_enabled           NO STATUS
    //tcmalloc/testing:profile_test_256k_pages_pow2                       NO STATUS
    //tcmalloc/testing:profile_test_256k_pages_pow2_with_per_ccx          NO STATUS
    //tcmalloc/testing:profile_test_32k_pages                             NO STATUS
    //tcmalloc/testing:profile_test_8k_pages                              NO STATUS
    //tcmalloc/testing:profile_test_8k_pages_not_hotcold                  NO STATUS
    //tcmalloc/testing:profile_test_numa_aware                            NO STATUS
    //tcmalloc/testing:profile_test_ring_buffer_transfer_cache            NO STATUS
    //tcmalloc/testing:profile_test_small_but_slow                        NO STATUS
    //tcmalloc/testing:reclaim_test_256k_pages                            NO STATUS
    //tcmalloc/testing:reclaim_test_256k_pages_and_numa_disabled          NO STATUS
    //tcmalloc/testing:reclaim_test_256k_pages_pow2                       NO STATUS
    //tcmalloc/testing:reclaim_test_256k_pages_pow2_below64               NO STATUS
    //tcmalloc/testing:reclaim_test_256k_pages_pow2_sharded_transfer_cache NO STATUS
    //tcmalloc/testing:reclaim_test_256k_pages_pow2_with_per_ccx          NO STATUS
    //tcmalloc/testing:reclaim_test_32k_pages                             NO STATUS
    //tcmalloc/testing:reclaim_test_8k_pages_not_hotcold                  NO STATUS
    //tcmalloc/testing:reclaim_test_small_but_slow                        NO STATUS
    //tcmalloc/testing:sample_size_class_test                             NO STATUS
    //tcmalloc/testing:sampler_test                                       NO STATUS
    //tcmalloc/testing:sampling_memusage_test_256k_pages                  NO STATUS
    //tcmalloc/testing:sampling_memusage_test_256k_pages_and_numa_enabled NO STATUS
    //tcmalloc/testing:sampling_memusage_test_256k_pages_pow2             NO STATUS
    //tcmalloc/testing:sampling_memusage_test_256k_pages_pow2_below64     NO STATUS
    //tcmalloc/testing:sampling_memusage_test_256k_pages_pow2_sharded_transfer_cache NO STATUS
    //tcmalloc/testing:sampling_memusage_test_256k_pages_pow2_with_per_ccx NO STATUS
    //tcmalloc/testing:sampling_memusage_test_32k_pages                   NO STATUS
    //tcmalloc/testing:sampling_memusage_test_8k_pages                    NO STATUS
    //tcmalloc/testing:sampling_memusage_test_numa_aware                  NO STATUS
    //tcmalloc/testing:sampling_memusage_test_small_but_slow              NO STATUS
    //tcmalloc/testing:sampling_test                                      NO STATUS
    //tcmalloc/testing:tcmalloc_test_256k_pages                           NO STATUS
    //tcmalloc/testing:tcmalloc_test_256k_pages_and_numa_disabled         NO STATUS
    //tcmalloc/testing:tcmalloc_test_256k_pages_and_numa_enabled          NO STATUS
    //tcmalloc/testing:tcmalloc_test_256k_pages_pow2                      NO STATUS
    //tcmalloc/testing:tcmalloc_test_256k_pages_pow2_below64              NO STATUS
    //tcmalloc/testing:tcmalloc_test_256k_pages_pow2_with_per_ccx         NO STATUS
    //tcmalloc/testing:tcmalloc_test_32k_pages                            NO STATUS
    //tcmalloc/testing:tcmalloc_test_8k_pages                             NO STATUS
    //tcmalloc/testing:tcmalloc_test_8k_pages_not_hotcold                 NO STATUS
    //tcmalloc/testing:tcmalloc_test_deprecated_perthread                 NO STATUS
    //tcmalloc/testing:tcmalloc_test_hp_aware                             NO STATUS
    //tcmalloc/testing:tcmalloc_test_numa_aware                           NO STATUS
    //tcmalloc/testing:tcmalloc_test_ring_buffer_transfer_cache           NO STATUS
    //tcmalloc/testing:tcmalloc_test_small_but_slow                       NO STATUS
    //tcmalloc/testing:thread_ctor_test                                   NO STATUS
    //tcmalloc/testing:threadcachesize_test_256k_pages                    NO STATUS
    //tcmalloc/testing:threadcachesize_test_256k_pages_and_numa_disabled  NO STATUS
    //tcmalloc/testing:threadcachesize_test_256k_pages_pow2_below64       NO STATUS
    //tcmalloc/testing:threadcachesize_test_256k_pages_pow2_sharded_transfer_cache NO STATUS
    //tcmalloc/testing:threadcachesize_test_numa_aware                    NO STATUS
    //tcmalloc/testing:threadcachesize_test_ring_buffer_transfer_cache    NO STATUS
    //tcmalloc/testing:threadcachesize_test_small_but_slow                NO STATUS
    //tcmalloc:huge_page_aware_allocator_test                                PASSED in 14.8s
    //tcmalloc:huge_region_test                                              PASSED in 4.0s
    //tcmalloc:malloc_extension_fuzz                                         PASSED in 0.2s
    //tcmalloc:malloc_extension_test                                         PASSED in 0.1s
    //tcmalloc:new_extension_test_256k_pages                                 PASSED in 1.8s
    //tcmalloc:new_extension_test_256k_pages_and_numa_enabled                PASSED in 1.9s
    //tcmalloc:new_extension_test_256k_pages_pow2                            PASSED in 1.5s
    //tcmalloc:new_extension_test_256k_pages_pow2_below64                    PASSED in 1.9s
    //tcmalloc:new_extension_test_256k_pages_pow2_sharded_transfer_cache     PASSED in 2.1s
    //tcmalloc:new_extension_test_256k_pages_pow2_with_per_ccx               PASSED in 2.1s
@junyer
Copy link
Contributor

junyer commented Mar 21, 2022

Sorry, this is bazelbuild/bazel#15088. Passing --tool_java_runtime_version=local_jdk is a partial workaround that will use the local JDK (assuming that Bazel can find it) instead of downloading the remote JDK; downloading the coverage tools looks pretty much unavoidable right now.

@junyer
Copy link
Contributor

junyer commented Jan 2, 2023

bazelbuild/bazel@4d188a9 should fix this, I believe, whenever it gets into a Bazel release.

@junyer
Copy link
Contributor

junyer commented Mar 13, 2023

The problem appears to be solved as of Bazel 6.1.0, which was released a week ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants