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

segmentation fault while running swiftlint in Xcode build phase #1361

Closed
OliverDobner-flinc opened this issue Mar 16, 2017 · 5 comments
Closed

Comments

@OliverDobner-flinc
Copy link

Randomly but many times a day we got this segmentation fault while running swiftlint. We use the Xcode build phase example from swiftlint website. Retrying the build always succeeds. This happens on the local machine as well as on our ci server.

I don#t know how to gather further information.

PhaseScriptExecution Run\ Swiftlint /Users/XXX/Library/Developer/Xcode/DerivedData/YYYY-aolnrbfklebwpkalxqydfbqcfhkn/Build/Intermediates/YYYY.build/Release-iphoneos/YYYY.build/Script-E2C189DC1E64AA330067ABBD.sh
cd /Users/XXX/Projects/YYYY
/bin/sh -c /Users/XXX/Library/Developer/Xcode/DerivedData/YYYY-aolnrbfklebwpkalxqydfbqcfhkn/Build/Intermediates/YYYY.build/Release-iphoneos/YYYY.build/Script-E2C189DC1E64AA330067ABBD.sh

Loading configuration from '.swiftlint.yml'
Linting Swift files in current working directory
Linting 'AppDelegate.swift' (1/25)
Linting 'ApplicationController.swift' (2/25)
Linting 'CurvedArrowOverlay.swift' (3/25)
Linting 'CurvedArrowOverlayRenderer.swift' (4/25)
Linting 'DebugMapViewController.swift' (5/25)
Linting 'DebugUUIDViewController.swift' (6/25)
Linting 'PromiseKit+Race.swift' (7/25)
Linting 'LocationService.swift' (8/25)
/Users/XXX/Library/Developer/Xcode/DerivedData/YYYY-aolnrbfklebwpkalxqydfbqcfhkn/Build/Intermediates/YYYY.build/Release-iphoneos/YYYY.build/Script-E2C189DC1E64AA330067ABBD.sh: line 6: 1560 Segmentation fault: 11 swiftlint lint --no-cache
Command /bin/sh failed with exit code 139

@alanzeino
Copy link

I updated from 0.12.0 to 0.16.1 to test out the parallelization improvements in #1077 and it crashed pretty much instantly (file names obfuscated):

Linting 'A.swift' (1/6816)
Linting 'B.swift' (2/6816)
Linting 'C.swift' (3/6816)
Linting 'main.swift' (4/6816)
Linting 'D.swift' (5/6816)
Linting 'E.swift' (6/6816)
Linting 'F.swift' (7/6816)
Linting 'G.swift' (8/6816)
objc[23486]: NSRegularExpression object 0x7f9c4e51f640 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
Linting 'H.swift' (9/6816)
Linting 'I.swift' (10/6816)
Linting 'J.swift' (11/6816)
Linting 'K.swift' (12/6816)
Linting 'L.swift' (13/6816)
Segmentation fault: 11

@alanzeino
Copy link

Interestingly, I think this is resolved on master. I cloned and ran via Xcode, it worked just fine on the first pass. I'll try a few more times just to be sure.

@marcelofabri
Copy link
Collaborator

master has #1347, which solved a threading problem.

@YuriiTrach
Copy link

I've faced with this issue on 0.16.1. Removing derived data helped me

@marcelofabri
Copy link
Collaborator

I'm closing this since we fixed a threading issue on 0.17.0. Feel free to reopen if this happens again.

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

4 participants