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

[SR-14085] swift package-manager crashed on my project #56474

Open
swift-ci opened this issue Jan 22, 2021 · 2 comments
Open

[SR-14085] swift package-manager crashed on my project #56474

swift-ci opened this issue Jan 22, 2021 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-14085
Radar rdar://problem/73518946
Original Reporter schuett (JIRA User)
Type Bug
Environment

/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swift build --use-integrated-swift-driver --experimental-explicit-module-build -Xswiftc -stats-output-dir -Xswiftc ./stats

Snapshot SNAPSHOT-2021-01-19

https://github.com/tschuett/swift-for-bazel-re

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

md5: 2763ae93a744aa52b7f83f2f76d8066d

Issue Description:

Compiled https://github.com/tschuett/swift-for-bazel-re with SNAPSHOT-2021-01-19. Got a crash

error: jobFailedWithNonzeroExitCode(6, "Assertion failed: (!Running && \"Cannot start a running timer\"), function startTimer, file /Users/buildnode/jenkins/workspace/oss-swift-package-macos/llvm-project/llvm/lib/Support/Timer.cpp, line 139.

Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project and the crash backtrace.\nStack dump:\n0.\tProgram arguments: /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2021-01-19-a.xctoolchain/usr/bin/swiftc -frontend -scan-dependencies -target x86_64-apple-macosx10.10 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -I /Users/schuett/Work/swift-for-bazel-re/.build/x86_64-apple-macosx/debug -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -I /Users/schuett/Work/swift-for-bazel-re/.build/checkouts/swift-nio/Sources/CNIOAtomics/include -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -color-diagnostics -enable-testing -g -module-cache-path /Users/schuett/Work/swift-for-bazel-re/.build/x86_64-apple-macosx/debug/ModuleCache -swift-version 5 -stats-output-dir stats -Onone -D SWIFT_PACKAGE -D DEBUG -resource-dir /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2021-01-19-a.xctoolchain/usr/lib/swift -enable-anonymous-context-mangled-names -Xcc -fmodule-map-file=/Users/schuett/Work/swift-for-bazel-re/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap -module-name NIOConcurrencyHelpers -target-sdk-version 11.1.0 -batch-scan-input-file /var/folders/y0/n29lr9g94s12d892pb6yg3l40000gn/T/TemporaryDirectory.d7EawE/NIOConcurrencyHelpers-batch-module-scan.json /Users/schuett/Work/swift-for-bazel-re/.build/checkouts/swift-nio/Sources/NIOConcurrencyHelpers/NIOAtomic.swift \n1.\tApple Swift version 5.4-dev (LLVM a9b8270702a974a, Swift 1d7d28206555caf)\n0 swiftc 0x00000001137b69b5 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37\n1 swiftc 0x00000001137b5c15 llvm::sys::RunSignalHandlers() + 85\n2 swiftc 0x00000001137b6f86 SignalHandler(int) + 262\n3 libsystem_platform.dylib 0x00007fff20393d7d sigtramp + 29\n4 swiftc 0x0000000116384e92 cmark_strbufinitbuf + 204605\n5 libsystem_c.dylib 0x00007fff202a2720 abort + 120\n6 libsystem_c.dylib 0x00007fff202a19d6 err + 0\n7 swiftc 0x0000000114cacbd3 llvm::Timer::startTimer() (.cold.1) + 35\n8 swiftc 0x000000011376e2f3 llvm::Timer::startTimer() + 227\n9 swiftc 0x000000011032d6bc swift::UnifiedStatsReporter::UnifiedStatsReporter(llvm::StringRef, llvm::StringRef, llvm::StringRef, swift::SourceManager*, clang::SourceManager*, bool, bool, bool) + 604\n10 swiftc 0x000000011032db74 swift::UnifiedStatsReporter::UnifiedStatsReporter(llvm::StringRef, llvm::StringRef, llvm::StringRef, llvm::StringRef, llvm::StringRef, llvm::StringRef, llvm::StringRef, swift::SourceManager*, clang::SourceManager*, bool, bool, bool) + 180\n11 swiftc 0x000000010f1138d0 swift::CompilerInstance::setupStatsReporter() + 752\n12 swiftc 0x000000010f113bf6 swift::CompilerInstance::setup(swift::CompilerInvocation const&) + 134\n13 swiftc 0x000000010f02e5bf (anonymous namespace)::forEachBatchEntry(swift::CompilerInstance&, swift::ModuleDependenciesCache&, llvm::StringMap<std::1::pair<std::1::unique_ptr<swift::CompilerInstance, std::1::default_delete<swift::CompilerInstance> >, std::1::unique_ptr<swift::ModuleDependenciesCache, std::1::default_delete<swift::ModuleDependenciesCache> > >, llvm::MallocAllocator>, llvm::StringSaver&, std::1::vector<swift::dependencies::BatchScanInput, std::_1::allocator<swift::dependencies::BatchScanInput> > const&, llvm::function_ref<void (swift::dependencies::BatchScanInput, swift::CompilerInstance&, swift::ModuleDependenciesCache&)>) + 1071\n14 swiftc 0x000000010f02b23b swift::dependencies::batchScanDependencies(swift::CompilerInstance&, llvm::StringRef) + 459\n15 swiftc 0x000000010eff1eb2 swift::performFrontend(llvm::ArrayRef<char const>, char const*, void*, swift::FrontendObserver*) + 10658\n16 swiftc 0x000000010ef8cc32 main + 866\n17 libdyld.dylib 0x00007fff2036a621 start + 1\n18 libdyld.dylib 0x000000000000002a start + 18446603339975711242\n") 
@typesanitizer
Copy link

@swift-ci create

@swift-ci
Copy link
Collaborator Author

Comment by Thorsten Schuett (JIRA)

The problem seems to be the interaction of --experimental-explicit-module-build with -stats-output-dir. Other combinations work fine.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the compiler The Swift compiler in itself label Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

3 participants