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

Crashes on linting apple/swift #2039

Closed
2 tasks done
norio-nomura opened this issue Feb 5, 2018 · 6 comments
Closed
2 tasks done

Crashes on linting apple/swift #2039

norio-nomura opened this issue Feb 5, 2018 · 6 comments
Labels
bug Unexpected and reproducible misbehavior. wontfix Issues that became stale and were auto-closed by a bot.

Comments

@norio-nomura
Copy link
Collaborator

New Issue Checklist

Bug Report

Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint lint --no-cache --enable-all-rules
Linting Swift files in current working directory
Linting 'TestsUtils.swift' (1/10577)
Linting 'DriverUtils.swift' (2/10577)
Linting 'ArgParse.swift' (3/10577)
Linting 'main.swift' (4/10577)

/Users/norio/github/swift-dev/swift/validation-test/IDE/crashers_fixed/108-swift-typechecker-typecheckcompletionsequence.swift:2:7: warning: Opening Brace Spacing Violation: Opening braces should be preceded by a single space and on the same line as the declaration. (opening_brace)
Linting '069-swift-typechecker-typecheckparameterlist.swift' (182/10577)
Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=261 "The file “033-swift-identifier-isoperatorslow.swift” couldn’t be opened using text encoding Unicode (UTF-8)." UserInfo={NSFilePath=/Users/norio/github/swift-dev/swift/validation-test/IDE/crashers_fixed/033-swift-identifier-isoperatorslow.swift, NSStringEncoding=4}: file /BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-900.0.74.1/src/swift/stdlib/public/core/ErrorType.swift, line 181
[1]    39990 illegal hardware instruction  swiftlint lint --no-cache --enable-all-rules
swiftlint lint --no-cache --enable-all-rules  8.71s user 0.88s system 175% cpu 5.453 total

Crash log:

Process:               swiftlint [39990]
Path:                  /usr/local/Cellar/swiftlint/0.24.2/bin/swiftlint
Identifier:            swiftlint
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        zsh [39916]
Responsible:           swiftlint [39990]
User ID:               501

Date/Time:             2018-02-05 18:33:02.859 +0900
OS Version:            Mac OS X 10.13.3 (17D47)
Report Version:        12
Anonymous UUID:        A1FBFA0D-8482-8860-EF34-9EBDF3671E5A

Sleep/Wake UUID:       3F341A3D-1C75-4451-A38C-9FF7DA2688F2

Time Awake Since Boot: 97000 seconds
Time Since Wake:       34000 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.root.user-initiated-qos

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [0]

Application Specific Information:
Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=261 "The file “033-swift-identifier-isoperatorslow.swift” couldn’t be opened using text encoding Unicode (UTF-8)." UserInfo={NSFilePath=/Users/norio/github/swift-dev/swift/validation-test/IDE/crashers_fixed/033-swift-identifier-isoperatorslow.swift, NSStringEncoding=4}: file /BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-900.0.74.1/src/swift/stdlib/public/core/ErrorType.swift, line 181
 

Thread 0 Crashed:: Dispatch queue: com.apple.root.user-initiated-qos
0   swiftlint                     	0x0000000107d75300 specialized _assertionFailure(_:_:file:line:flags:) + 144
1   swiftlint                     	0x0000000107b6ab2a swift_unexpectedError + 394
2   swiftlint                     	0x00000001076d655d specialized File.contents.getter + 157
3   swiftlint                     	0x00000001076d14ef File.contents.getter + 15
4   swiftlint                     	0x000000010776302a File.commands(in:) + 186
5   swiftlint                     	0x000000010776cd0f specialized File.regions(restrictingRuleIdentifiers:) + 239
6   swiftlint                     	0x0000000107792419 Linter.getStyleViolations(benchmark:) + 1209
7   swiftlint                     	0x0000000107791f36 Linter.styleViolations.getter + 278
8   swiftlint                     	0x00000001079fa088 specialized closure #1 in LintCommand.run(_:) + 2248
9   swiftlint                     	0x00000001079f6b72 closure #1 in LintCommand.run(_:) + 706
10  swiftlint                     	0x00000001079fe8f9 partial apply for closure #1 in LintCommand.run(_:) + 377
11  swiftlint                     	0x0000000107a07efd closure #2 in closure #2 in closure #2 in Configuration.visitLintableFiles(path:action:useSTDIN:quiet:useScriptInputFiles:cache:parallel:visitorBlock:) + 1069
12  swiftlint                     	0x0000000107a15c20 partial apply for closure #2 in closure #2 in closure #2 in Configuration.visitLintableFiles(path:action:useSTDIN:quiet:useScriptInputFiles:cache:parallel:visitorBlock:) + 704
13  swiftlint                     	0x0000000107a16739 closure #2 in closure #2 in closure #2 in Configuration.visitLintableFiles(path:action:useSTDIN:quiet:useScriptInputFiles:cache:parallel:visitorBlock:)partial apply + 9
14  swiftlint                     	0x0000000107a15c5f partial apply for thunk for @callee_owned () -> (@error @owned Error) + 47
15  swiftlint                     	0x0000000107a16749 thunk for @callee_owned () -> (@error @owned Error)partial apply + 9
16  swiftlint                     	0x0000000107a1ed38 autoreleasepool<A>(invoking:) + 56
17  swiftlint                     	0x0000000107a162e0 specialized closure #2 in closure #2 in Configuration.visitLintableFiles(path:action:useSTDIN:quiet:useScriptInputFiles:cache:parallel:visitorBlock:) + 1248
18  swiftlint                     	0x0000000107a079f4 closure #2 in closure #2 in Configuration.visitLintableFiles(path:action:useSTDIN:quiet:useScriptInputFiles:cache:parallel:visitorBlock:) + 548
19  swiftlint                     	0x0000000107a15856 partial apply for closure #2 in closure #2 in Configuration.visitLintableFiles(path:action:useSTDIN:quiet:useScriptInputFiles:cache:parallel:visitorBlock:) + 198
20  swiftlint                     	0x0000000107a0875d closure #4 in closure #2 in Configuration.visitLintableFiles(path:action:useSTDIN:quiet:useScriptInputFiles:cache:parallel:visitorBlock:) + 781
21  swiftlint                     	0x0000000107a15ccb partial apply for closure #4 in closure #2 in Configuration.visitLintableFiles(path:action:useSTDIN:quiet:useScriptInputFiles:cache:parallel:visitorBlock:) + 59
22  swiftlint                     	0x0000000107a3dfd7 thunk for @callee_owned (@unowned Int) -> () + 39
23  libdispatch.dylib             	0x00007fff76981168 _dispatch_client_callout2 + 8
24  libdispatch.dylib             	0x00007fff7698e7d9 _dispatch_apply_invoke_and_wait + 159
25  libdispatch.dylib             	0x00007fff76980f38 dispatch_apply_f + 820
26  swiftlint                     	0x0000000107a55722 _swift_dispatch_apply_current + 98
27  swiftlint                     	0x0000000107a3d51c static DispatchQueue.concurrentPerform(iterations:execute:) + 140
28  swiftlint                     	0x0000000107a14d02 specialized closure #2 in Configuration.visitLintableFiles(path:action:useSTDIN:quiet:useScriptInputFiles:cache:parallel:visitorBlock:) + 6450
29  swiftlint                     	0x0000000107a0773f closure #2 in Configuration.visitLintableFiles(path:action:useSTDIN:quiet:useScriptInputFiles:cache:parallel:visitorBlock:) + 47
30  swiftlint                     	0x0000000107a11448 partial apply for closure #2 in Configuration.visitLintableFiles(path:action:useSTDIN:quiet:useScriptInputFiles:cache:parallel:visitorBlock:) + 136
31  swiftlint                     	0x0000000107a114b5 partial apply for thunk for @callee_owned (@owned [Configuration : [File]]) -> (@owned Result<[File], CommandantError<()>>) + 53
32  swiftlint                     	0x0000000107690f9c Result.analysis<A>(ifSuccess:ifFailure:) + 348
33  swiftlint                     	0x0000000107691515 protocol witness for ResultProtocol.analysis<A>(ifSuccess:ifFailure:) in conformance <A, B> Result<A, B> + 165
34  swiftlint                     	0x0000000107698cc9 ResultProtocol.flatMap<A>(_:) + 185
35  swiftlint                     	0x0000000107a10ef9 specialized Configuration.visitLintableFiles(path:action:useSTDIN:quiet:useScriptInputFiles:cache:parallel:visitorBlock:) + 1817
36  swiftlint                     	0x00000001079f8c89 specialized LintCommand.run(_:) + 2713
37  swiftlint                     	0x00000001079f733a protocol witness for CommandProtocol.run(_:) in conformance LintCommand + 250
38  swiftlint                     	0x000000010767b37a closure #1 in CommandWrapper.init<A>(_:) + 922
39  swiftlint                     	0x000000010767f573 partial apply for closure #1 in CommandWrapper.init<A>(_:) + 83
40  swiftlint                     	0x000000010767bcf3 CommandRegistry.run(command:arguments:) + 243
41  swiftlint                     	0x000000010767e69b specialized CommandRegistry.main(arguments:defaultVerb:errorHandler:) + 603
42  swiftlint                     	0x000000010767bf13 CommandRegistry.main(defaultVerb:errorHandler:) + 131
43  swiftlint                     	0x00000001079f11d6 closure #1 in  + 886
44  swiftlint                     	0x00000001077793e0 thunk for @callee_owned () -> () + 32
45  libdispatch.dylib             	0x00007fff7697e591 _dispatch_call_block_and_release + 12
46  libdispatch.dylib             	0x00007fff76976d50 _dispatch_client_callout + 8
47  libdispatch.dylib             	0x00007fff76983c61 _dispatch_queue_override_invoke + 880
48  libdispatch.dylib             	0x00007fff76978941 _dispatch_root_queue_drain + 515
49  libdispatch.dylib             	0x00007fff769786ed _dispatch_worker_thread3 + 101
50  libsystem_pthread.dylib       	0x00007fff76c3b1ca _pthread_wqthread + 1387
51  libsystem_pthread.dylib       	0x00007fff76c3ac4d start_wqthread + 13

This is caused in SourceKitten that introduced for #1918.

@marcelofabri marcelofabri added the bug Unexpected and reproducible misbehavior. label Feb 10, 2018
@marcelofabri
Copy link
Collaborator

Does this happen all the time or using a specific toolchain or swift branch? We lint Swift as part of oss-check 🤔

@norio-nomura
Copy link
Collaborator Author

oss-check lints only in stdlib.
6b819a3#diff-8c010f92bab4b39533574bcdda00cf0fR98
It crashes outside of stdlib.

@mcandre
Copy link

mcandre commented Jun 8, 2018

Same error on my machine with Swift from Xcode, SwiftLint from mint. Vagrant source:

https://github.com/mcandre/tonixxx/tree/issue-58/examples/levitate/buildbot-src/levitate-buildbot-macos

@stale
Copy link

stale bot commented Nov 8, 2020

This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions!

@stale stale bot added the wontfix Issues that became stale and were auto-closed by a bot. label Nov 8, 2020
@stale stale bot closed this as completed Nov 15, 2020
@mcandre
Copy link

mcandre commented Mar 25, 2022

bruh

@SimplyDanny
Copy link
Collaborator

bruh

What does it mean?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected and reproducible misbehavior. wontfix Issues that became stale and were auto-closed by a bot.
Projects
None yet
Development

No branches or pull requests

4 participants