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

Failures on Add a pass for suggesting elements that are not yet imported...Update clang to 0f61051f541a5b8cfce25c84262dfdbadb9ca688. #55537

Closed
alexmarkov opened this issue Apr 22, 2024 · 4 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. gardening

Comments

@alexmarkov
Copy link
Contributor

There are new test failures on Add a pass for suggesting elements that are not yet imported...Update clang to 0f61051f541a5b8cfce25c84262dfdbadb9ca688..

The tests

vm/dart/gen_snapshot_include_resolved_urls_test RuntimeError (expected Pass)

are failing on configurations

vm-aot-asan-linux-release-x64

From the log:

Running pkg/vm/tool/gen_kernel --aot --packages=./.packages --platform=out/ReleaseASANX64/vm_platform_strong.dill -o /b/s/w/itcijv4yn6/aot-script-urls-testLIQXKN/test.dill ./runtime/tests/vm/dart/gen_snapshot_include_resolved_urls_script.dart

stdout:

Error: Error when reading '.packages': No such file or directory
Error: Couldn't resolve the package 'vm_service' in 'package:vm_service/vm_service_io.dart'.
runtime/tests/vm/dart/gen_snapshot_include_resolved_urls_script.dart:8:8: Error: Not found: 'package:vm_service/vm_service_io.dart'
import 'package:vm_service/vm_service_io.dart';
       ^
runtime/tests/vm/dart/gen_snapshot_include_resolved_urls_script.dart:29:25: Error: Method not found: 'vmServiceConnectUri'.
  final service = await vmServiceConnectUri(uri.toString());
                        ^^^^^^^^^^^^^^^^^^^


Command failed with non-zero exit code (was 254)

Running out/ReleaseASANX64/gen_snapshot --snapshot-kind=app-aot-elf --elf=/b/s/w/itcijv4yn6/aot-script-urls-testLIQXKN/aot.snapshot /b/s/w/itcijv4yn6/aot-script-urls-testLIQXKN/test.dill

Running out/ReleaseASANX64/dart_precompiled_runtime --enable-vm-service=0 --profiler /b/s/w/itcijv4yn6/aot-script-urls-testLIQXKN/aot.snapshot

stdout:

The Dart VM service is listening on http://127.0.0.1:44729/XCX5X6xKSeg=/


stderr:

AddressSanitizer: CHECK failed: asan_mapping.h:372 "((AddrIsInMem(p))) != (0)" (0x0, 0x0) (tid=210710)
    #0 0x55a7089d5f31 in __asan::CheckUnwind() ../../../../../../llvm-llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:69:3
    #1 0x55a7089e9d82 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) ../../../../../../llvm-llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:86:5
    #2 0x55a7089cd99d in MemToShadow ../../../../../../llvm-llvm-project/compiler-rt/lib/asan/asan_mapping.h:372:3
    #3 0x55a7089cd99d in __asan::ShadowSegmentEndpoint::ShadowSegmentEndpoint(unsigned long) ../../../../../../llvm-llvm-project/compiler-rt/lib/asan/asan_poisoning.cpp:61:18
    #4 0x55a7089cda0e in __asan_unpoison_memory_region ../../../../../../llvm-llvm-project/compiler-rt/lib/asan/asan_poisoning.cpp:149:25
    #5 0x55a708eaf7b3 in dart::ProfilerDartStackWalker::CallerPC() const out/ReleaseASANX64/../../runtime/vm/profiler.cc:1099:5
    #6 0x55a708eaf7b3 in dart::ProfilerDartStackWalker::walk() out/ReleaseASANX64/../../runtime/vm/profiler.cc:1088:13
    #7 0x55a708eb03c1 in dart::CollectSample(dart::Isolate*, bool, bool, dart::Sample*, dart::ProfilerNativeStackWalker*, dart::ProfilerDartStackWalker*, unsigned long, unsigned long, unsigned long, dart::ProfilerCounters*) out/ReleaseASANX64/../../buildtools/linux-x64/clang/bin/../include/c++/v1/__atomic/cxx_atomic_impl.h
    #8 0x55a708eb03c1 in dart::Profiler::SampleThread(dart::Thread*, dart::InterruptedThreadState const&) out/ReleaseASANX64/../../runtime/vm/profiler.cc:1453:3
    #9 0x55a708fbfa19 in dart::ThreadInterrupterLinux::ThreadInterruptSignalHandler(int, siginfo_t*, void*) out/ReleaseASANX64/../../runtime/vm/thread_interrupter_linux.cc:44:5
    #10 0x7f0570b6b41f  (/lib/x86_64-linux-gnu/libpthread.so.0+0x1441f) (BuildId: c6d0d79d906d62bb768421fc6dada0d5e729f177)
    #11 0x55a7089e13ef in __sanitizer::mem_is_zero(char const*, unsigned long) ../../../../../../llvm-llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_libc.cpp:308:3
    #12 0x55a7089cdf69 in __asan_region_is_poisoned ../../../../../../llvm-llvm-project/compiler-rt/lib/asan/asan_poisoning.cpp:191:8
    #13 0x55a7089ca282 in memmove ../../../../../../llvm-llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors_memintrinsics.inc:98:3



Command failed with non-zero exit code (was -6)

01:25 �[32m+0�[0m�[31m -1�[0m: Include resolved urls �[1m�[31m[E]�[0m�[0m

  Expected: <true>
    Actual: <false>
  

  package:matcher/src/expect/expect.dart 149                             fail
  package:matcher/src/expect/expect.dart 144                             _expect
  package:matcher/src/expect/expect.dart 56                              expect
  runtime/tests/vm/dart/gen_snapshot_include_resolved_urls_test.dart 76  main.<fn>
  ===== asynchronous gap ===========================
  package:test_api/src/backend/declarer.dart 215                         Declarer.test.<fn>.<fn>
  ===== asynchronous gap ===========================
  package:test_api/src/backend/declarer.dart 213                         Declarer.test.<fn>
  ===== asynchronous gap ===========================
  package:test_api/src/backend/invoker.dart 258                          Invoker._waitForOutstandingCallbacks.<fn>
  

01:25 �[32m+0�[0m�[31m -1�[0m: (tearDownAll)�[0m

01:25 �[32m+0�[0m�[31m -1�[0m: �[31mSome tests failed.�[0m



Consider enabling the flag chain-stack-traces to receive more detailed exceptions.
For example, 'dart test --chain-stack-traces'.

stderr:
Unhandled exception:
Dummy exception to set exit code.

--- Re-run this test:
python3 tools/test.py -n vm-aot-asan-linux-release-x64 vm/dart/gen_snapshot_include_resolved_urls_test

https://dart-ci.appspot.com/log/vm-aot-asan-linux-release-x64/vm-aot-asan-linux-release-x64/402/vm/dart/gen_snapshot_include_resolved_urls_test

There are multiple failures:

  • Compile-time error is also seen on other bots, probably something is not copied when bots are sharded.
  • ASAN error is likely related to the recent Clang roll (/cc @rmacnak-google).
@alexmarkov alexmarkov added area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. gardening labels Apr 22, 2024
@alexmarkov
Copy link
Contributor Author

Attempt to fix the test: https://dart-review.googlesource.com/c/sdk/+/363940.

copybara-service bot pushed a commit that referenced this issue Apr 22, 2024
Fix gen_kernel path (on Windows) and --packages flag.

TEST=ci
Issue: #55537
Change-Id: I6fcfab30da855978c92bf0d7d4d543f59bf382f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/363940
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
@alexmarkov
Copy link
Contributor Author

Compile-time error is fixed, but the test is still failing due to ASAN error.

@rmacnak-google
Copy link
Contributor

ASAN looks upset that the profile is about to dereference 0. Seems like #52814, but for CallRuntimeEntry(kMemoryMoveRuntimeEntry). This seems to use CCallInstr instead of LeafRuntimeScope::Call, and skips things like updating Thread::vm_tag_ to inform the profile we're not running Dart anymore.

@rmacnak-google
Copy link
Contributor

copybara-service bot pushed a commit that referenced this issue Apr 23, 2024
… to memmove etc.

Otherwise the profiler may misinterpret a C frame as a Dart frame, and crash if the C frame has optimized away frame pointers.

TEST=profiler_memmove_test
Bug: #55537
Change-Id: Idb53804cea78e15f12e893a46be812aa8702c94b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/363962
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
@a-siva a-siva closed this as completed Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. gardening
Projects
None yet
Development

No branches or pull requests

3 participants