2241 illegal hardware instruction rails s - ruby-on-rails

Here's the problem: Unable to start an existing Rails project after upgrading to MacOS 10.15.1. The terminal shows this (below) after Rails s and going to localhost:3000.
SEGV received in SEGV handler [1]
1438 illegal hardware instruction rails s
Note: The latest version of Xcode / command line is installed.
After upgrading the OS successfully (MacOS 10.15.1), I followed the MacPorts migration guide successfully. Further, I successfully reinstalled RVM with Ruby 2.6.1, 2.6.3 and 2.6.5.
Next, installed gem Rails -v 5.2.3 without issue. Tested this out with Rails new TestProj, it created a new project successfully, bundled and started the server with Rails s. No issues and saw the "Yay you're on Rails" page. So far so good.
Then I CD into an existing Rails project, which was built on MacOS 10.14.x (Mojave) did a bundle update without any issues. Followed by a rails s, Puma started without issue. Here's where it gets strange, literally the second I goto the URL "localhost:3000" I immediately get this error.
SEGV received in SEGV handler [1] <- this repeated
1438 illegal hardware instruction rails s
I thought it might be a gem issue, tried installing the same gem set into the TestProj and everything work perfectly with a Puma starting and loading "Yay...". Finally, I've tried cloning the repo, bundling and I get the same error message. I'm pasting what I believe is the most important part of the log file into this post. I wonder if there is something in the Rails app that specifies certain hardware that needs updating? My apologies for its length, Hopefully, someone can interpret this better than I can and help troubleshoot. I'm happy to provide more information. Just not sure what else besides the log file you might need. Let me know. Thanks!
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000000000f8
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: ruby [1438]
VM Regions Near 0xf8:
-->
__TEXT 0000000103679000-000000010367a000 [ 4K] r-x/r-x SM=COW /Users/USER/*
Application Specific Information:
abort() called
Thread 11 Crashed:: thread_pool.rb*
0 libsystem_pthread.dylib 0x00007fff681ac65f pthread_kill + 276
1 libsystem_c.dylib 0x00007fff68077a1c abort + 120
2 libruby.2.6.dylib 0x00000001038261d9 ruby_abort + 9
3 libruby.2.6.dylib 0x0000000103826160 check_reserved_signal_ + 160 (signal.c:854)
4 libruby.2.6.dylib 0x0000000103825fa4 sigsegv + 36 (signal.c:997)
5 libsystem_platform.dylib 0x00007fff681a1b1d _sigtramp + 29
6 ??? 000000000000000000 0 + 0
7 libsystem_c.dylib 0x00007fff68077a1c abort + 120
I expect to cd into the existing RoR application and run rails s to start the server. Then go to http://localhost:3000 and see the application without crashing. The actual results are the following:
...
SEGV received in SEGV handler
SEGV received in SEGV handler
SEGV received in SEGV handler
SEGV received in SEGV handler
SEGV received in SEGV handler
SEGV received in SEGV handler
SEGV received in SEGV handler
SEGV received in SEGV handler
[1] 16523 illegal hardware instruction rails s

Related

Xcode 9 GM - Export and Upload to App Store crashing

I'm trying to upload my app that uses ARKit (Unity build) to iTunes Connect for TestFlight distribution. While both exporting and uploading to app store processes from Xcode -> Organizer I see crash on "Stripping extended attributes for APPNAME.app".
I checked all configuration of bitcode and symbols on/off, signing automatically, manually. Deployment target of my project is iOS 10, as 11 cannot be set.
I also tried following steps from simillar thread (https://forums.developer.apple.com/thread/83219) and added App Store 1024 icon to Images.xcassets.
Any ideas why Xcode is crashing?
Screenshot from just before the crash:
Crash report:
Process: Xcode [10862]
Path: /Applications/Xcode-9b6.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 9.0 (13238.4)
Build Info: IDEFrameworks-13238004000000000~11
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [10862]
User ID: 501
Date/Time: 2017-09-10 14:56:10.196 +0100
OS Version: Mac OS X 10.12.6 (16G29)
Report Version: 12
Anonymous UUID: FD8390BC-9E7B-969D-15A2-22A8DBBD050D
Time Awake Since Boot: 16000 seconds
System Integrity Protection: enabled
Crashed Thread: 17 Dispatch queue: ConcurrentQueue: -[IDEDistributionPackagingStepViewController viewDidInstall]_block_invoke
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000020
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
VM Regions Near 0x20:
-->
__TEXT 0000000103625000-0000000103627000 [ 8K] r-x/rwx SM=COW /Applications/Xcode-9b6.app/Contents/MacOS/Xcode
Application Specific Information:
ProductBuildVersion: 9M214v
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fffbb90634a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fffbb905797 mach_msg + 55
2 com.apple.CoreFoundation 0x00007fffa6037434 __CFRunLoopServiceMachPort + 212
3 com.apple.CoreFoundation 0x00007fffa60368c1 __CFRunLoopRun + 1361
4 com.apple.CoreFoundation 0x00007fffa6036114 CFRunLoopRunSpecific + 420
5 com.apple.HIToolbox 0x00007fffa5596ebc RunCurrentEventLoopInMode + 240
6 com.apple.HIToolbox 0x00007fffa5596cf1 ReceiveNextEventCommon + 432
7 com.apple.HIToolbox 0x00007fffa5596b26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
8 com.apple.AppKit 0x00007fffa3b2fa54 _DPSNextEvent + 1120
9 com.apple.AppKit 0x00007fffa42ab7ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
10 com.apple.dt.DVTKit 0x0000000103eb58be -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 390
11 com.apple.AppKit 0x00007fffa3b243db -[NSApplication run] + 926
12 com.apple.AppKit 0x00007fffa3aeee0e NSApplicationMain + 1237
13 libdyld.dylib 0x00007fffbb7df235 start + 1
Edit
Running xcodebuild (through fastlane gym) produces the following:
+ xcodebuild -exportArchive -exportOptionsPlist /var/folders/z1/m155xvnn42s7xl7hfw3_8w5w0000gn/T/gym_config20170912-61009-190kutb.plist -archivePath '/Users/wert/Library/Developer/Xcode/Archives/2017-09-12/towerar 2017-09-12 22.06.54.xcarchive' -exportPath /var/folders/z1/m155xvnn42s7xl7hfw3_8w5w0000gn/T/gym_output20170912-61009-42bo6w
2017-09-12 22:09:04.966 xcodebuild[62085:5372649] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/z1/m155xvnn42s7xl7hfw3_8w5w0000gn/T/Unity-iPhone_2017-09-12_22-09-04.966.xcdistributionlogs'.
2017-09-12 22:09:21.584 xcodebuild[62085:5372649] [MT] IDEDistribution: Step failed: <IDEDistributionPackagingStep: 0x7fc3c75f18b0>: <IDEDistributionPackagingStep: 0x7fc3c75f18b0>
2017-09-12 22:09:21.584 xcodebuild[62085:5372649] -[__NSCFString userInfo]: unrecognized selector sent to instance 0x7fc3c74d72f0
** INTERNAL ERROR: Uncaught exception **
Uncaught Exception: -[__NSCFString userInfo]: unrecognized selector sent to instance 0x7fc3c74d72f0
Stack:
0 __exceptionPreprocess (in CoreFoundation)
1 objc_exception_throw (in libobjc.A.dylib)
2 -[NSObject(NSObject) doesNotRecognizeSelector:] (in CoreFoundation)
3 ___forwarding___ (in CoreFoundation)
4 _CF_forwarding_prep_0 (in CoreFoundation)
5 __55-[Xcode3CommandLineBuildTool _distributeArchiveAndExit]_block_invoke (in Xcode3Core)
6 -[Xcode3CommandLineBuildTool _distributeArchiveAndExit] (in Xcode3Core)
7 -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
8 0x0000000104d752af (in xcodebuild)
9 start (in libdyld.dylib)
I've had to uncheck all checkboxes and use manual managing signing, then it was possible to proceed in the wizard.
Does the xattr command line tool work? It's possible your python installation is damaged, or if you've replaced the installed xattr module then you may need to reinstall the system provided one.
I had been experiencing same frustating problem and it happen almost all day , Xcode 9 suddenly crashes in the middle of the archiving process, resulting in the same error report.
#dangercheng gave me insight about archive process in xcode 9, which is, it needs the xattr command , therefore I go check xattr command in my macbook and somehow xattr doesn't work. From the verbose message, it reveals that the error is related to file permission owned by folders/files inside /Library/Python/2.7 . Somehow a user other than root has no right to write (w/ 2) on those files/folders.
From above facts I concluded that I need to change file permission in this case chmod -R 775 and apply it to all folders and its content on /Library/Python/2.7. After that my xattr is running well and my Archive process in Xcode 9 is running smoothly, experiencing no crash.
Thanks for all of you guys
In my case, it was due to permissions issues with python.
When running xattr from terminal I had the following error:
IOError: [Errno 13] Permission denied: '/Users/cb/Library/Python/2.7/lib/python/site-packages/zc.buildout-1.5.2-py2.7.egg-info/namespace_packages.txt'
Taking a look inside the /Users/cb/Library folder I found that all of the folders were owned by cb:staff (my currently logged in user and group) but the /Users/cb/Library/Python folder was owned by root:wheel
Running the following will eliminate the error:
sudo chown -R $USER:$(id -g) /Users/$USER/Library/Python
After the sudo chown you can run xattr again to verify. There should be no errors or other output from the xattr command.
Probably not your fault but do file a bug with Apple. But when the Xcode uploader fails for any reason try the good ol' Application Loader:
Xcode.app/Contents/Applications/Application Loader.app
run 'xattr' command in mac terminal,if result like bellow:
python version 2.7.10 can't run /usr/bin/xattr. Try the alternative(s):
/usr/bin/xattr-2.6 (uses python 2.6)
/usr/bin/xattr-2.7 (uses python 2.7)
Run "man python" for more information about multiple version support in
Mac OS X.
you should creat a new soft link to '/usr/bin/xattr-2.7'
run bellow commands:
cd /usr/bin
sudo rm xattr
sudo ln -s xattr-2.7 xattr
this solve my problem!
I solved my problem following #dangercheng's answer.
I upgraded my python to python 3.6 two days ago.And it seems that the xattr command was executed under python3.6 .
However, when I execute xattr in terminal.
File "/usr/bin/xattr", line 31
continue
^
TabError: inconsistent use of tabs and spaces in indentation
Something bad happened!
So I edit the source code of xattr.
for i in g:
vers = vpat.search(i)
if vers is None:
continue //add 4 space
sys.stderr.write("%s (uses python %s)\n" % (i, i[vers.start():vers.end()]))
n = 1
```
python version 3.6.3 can't run /usr/bin/xattr. Try the alternative(s):
(Error: no alternatives found)
Run "man python" for more information about multiple version support in
Mac OS X.
```
another error!
I guess the xattr command should judge the version of python and execute suitable codes and the code of python3 contains some error.
Finally I change the default version of python to python2.7 and replace softlink of xattr to xattr-2.7. It works.
Attention, when xcodebuild execute xattr command the path of python was "/usr/bin/python".
The path "/usr/bin/python" was softlink too.
So, I resolved this problem following this step.
Step1:
cd /usr/bin
Step2:
sudo rm python
sudo ln -s python2.7 python
Step3:
sudo rm xattr
sudo ln -s xattr-2.7 xattr
If you can not found python2.7 under "/usr/bin", please find another suitable python path such as "/Library/Frameworks/Python.framework/Versions/2.7" etc.

Error compiling in Dart

I have a Dart with AngluarDart in local.
Ubuntu 16.04.2
DartSdk v1.23.0
"pub serve" seems work fine
$ pub serve
Loading source assets...
Loading angular2, dart_to_js_script_rewriter and dart_sass_transformer
transformers... (3.4s)
Serving xxx web on http://localhost:8080
Build completed successfully
But when I try to load the web into my browser I get this error:
[web] GET Served 3 cached assets.
[Info from Dart2JS]:
Compiling xxx|web/main.dart...
[Error from Dart2JS]:
web/main.dart:
The compiler crashed when compiling this element.
The compiler is broken.
When compiling the above element, the compiler crashed.
It is not possible to tell if this is caused by a problem in your program or not.
Regardless, the compiler should not crash.
The Dart team would greatly appreciate if you would take a moment to
report this problem at http://dartbug.com/new.
Please include the following information:
* the name and version of your operating system,
* the Dart SDK build number (build number could not be determined), and
* the entire message you see here (including the full stack trace
below as well as the source location above).
Build error:
Transform Dart2JS on xxx|web/main.dart threw error: The getter 'uses'
was called on null.
Receiver: null
Tried calling: uses
dart:core
Object.noSuchMethod
package:compiler_unsupported/src/dump_info.dart 576
DumpInfoTask.dumpInfoJson
package:compiler_unsupported/src/dump_info.dart 536
DumpInfoTask.dumpInfo.<fn>
package:compiler_unsupported/src/common/tasks.dart 63
CompilerTask.measure
package:compiler_unsupported/src/dump_info.dart 533
DumpInfoTask.dumpInfo
package:compiler_unsupported/src/compiler.dart 703
Compiler.compileLoadedLibraries.<fn>
package:compiler_unsupported/src/common/tasks.dart 176
CompilerTask.measureSubtask
package:compiler_unsupported/src/compiler.dart 582
Compiler.compileLoadedLibraries
package:compiler_unsupported/src/compiler.dart 471
Compiler.runInternal
===== asynchronous gap ===========================
package:compiler_unsupported/src/compiler.dart 310 Compiler.run.
<fn>.<fn>
dart:async
Future.Future.sync
package:compiler_unsupported/src/compiler.dart 310 Compiler.run.
<fn>
package:compiler_unsupported/src/common/tasks.dart 176
CompilerTask.measureSubtask
package:compiler_unsupported/src/compiler.dart 307 Compiler.run
package:compiler_unsupported/src/apiimpl.dart 245 CompilerImpl.run.<fn>.<fn>
Build completed with 2 errors.
[web] GET main.dart.js → Could not find asset xxx|web/main.dart.js.
[web] GET favicon.ico → (cached) xxx|web/favicon.ico
I tried to get DartSDK again, revised the PATH...
What can be the problem?
I solved the problem downgrading Dart SDK version.
From 1.23.0 to 1.21.1
Now the complilator do his job without problems.

mvvmcross 5.0 Fatal signal 11 (SIGSEGV)

After updating mvvmcross to version 5.0.1 application crashes during start with exception
No native Android stacktrace (see debuggerd output).
[mono-rt] Got a SIGSEGV while executing native code. This usually indicates
[mono-rt] a fatal error in the mono runtime or one of the native libraries
[mono-rt] used by your application.
Fatal signal 11 (SIGSEGV), code 2, fault addr 0xc5c3ff70 in tid 9451 (Thread-5)
No any stacktrace or error message appeared
What changed on this framework version?

Xcode crashes when trying to run project due to LLDB

When I click 'Run', Xcode crashes instantly, regardless of my code.
The crash report says that the LLDB plugin can not be read correctly:
Error getting value for key 'workerClass' of extension 'Xcode.DebuggerFoundation.Debugger.LLDB' in plug-in 'com.apple.dt.dbg.DebuggerLLDB'
The crash report:
Process: Xcode [2184]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 5.0.2 (3335.32)
Build Info: IDEApplication-3335032000000000~4
Code Type: X86-64 (Native)
Parent Process: launchd [147]
Responsible: Xcode [2184]
User ID: 501
Date/Time: 2014-02-26 18:41:28.657 +0100
OS Version: Mac OS X 10.9.2 (13C64)
Report Version: 11
Anonymous UUID: B5F54D76-660F-C9CE-0C9C-D0D41BA7332B
Sleep/Wake UUID: 9A19E5A2-14DE-40FF-8993-668257EF9F44
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
Sending performRunAction: to <IDERunPauseContinueToolbarButton: 0x7f8494673e80> from <IDERunPauseContinueToolbarButton: 0x7f8494673e80>
ProductBuildVersion: 5A3005
UNCAUGHT EXCEPTION (NSInternalInconsistencyException): Error getting value for key 'workerClass' of extension 'Xcode.DebuggerFoundation.Debugger.LLDB' in plug-in 'com.apple.dt.dbg.DebuggerLLDB'
UserInfo: {
NSUnderlyingError = "Error Domain=DVTPlugInErrorDomain Code=2 \"Loading a plug-in failed.\" UserInfo=0x7f8496dca9a0 {DVTPlugInIdentifierErrorKey=com.apple.dt.dbg.DebuggerLLDB, DVTPlugInExecutablePathErrorKey=/Applications/Xcode.app/Contents/PlugIns/DebuggerLLDB.ideplugin/Contents/MacOS/DebuggerLLDB, NSLocalizedRecoverySuggestion=The plug-in or one of its prerequisite plug-ins may be missing or damaged and may need to be reinstalled., NSLocalizedDescription=Loading a plug-in failed., NSFilePath=/Applications/Xcode.app/Contents/PlugIns/DebuggerLLDB.ideplugin, NSLocalizedFailureReason=The plug-in \U201ccom.apple.dt.dbg.DebuggerLLDB\U201d at path \U201c/Applications/Xcode.app/Contents/PlugIns/DebuggerLLDB.ideplugin\U201d could not be loaded. The plug-in or one of its prerequisite plug-ins may be missing or damaged., NSUnderlyingError=0x7f8496dc98f0 \"The bundle \U201cDebuggerLLDB\U201d couldn\U2019t be loaded because it is damaged or missing necessary resources.\"}";
}
Hints:
0: Sending performRunAction: to <IDERunPauseContinueToolbarButton: 0x7f8494673e80> from <IDERunPauseContinueToolbarButton: 0x7f8494673e80>
1: Sending performAction: to <DVTDelayedMenuButtonCell: 0x7f8494674490> from <IDERunPauseContinueToolbarButton: 0x7f8494673e80>
Backtrace:
0 0x00007fff91211244 __exceptionPreprocess (in CoreFoundation)
1 0x00000001082ddd73 DVTFailureHintExceptionPreprocessor (in DVTFoundation)
2 0x00007fff940a2e75 objc_exception_throw (in libobjc.A.dylib)
3 0x000000010826bcd2 -[DVTExtension valueForKey:] (in DVTFoundation)
4 0x000000010d3d1109 -[DBGLLDBDebugLocalService operationWorkerWithLaunchSession:error:] (in DebuggerLLDBService)
5 0x0000000110106e17 -[IDERuniPhoneSimulatorService operationWorkerWithLaunchSession:error:] (in IDEiOSSupportCore)
6 0x0000000108d38d49 -[IDERunDestination runWorkerForLaunchSession:error:] (in IDEFoundation)
7 0x0000000108d38a74 -[IDERunDestination runOperationForLaunchSession:error:] (in IDEFoundation)
8 0x0000000108da0fee -[IDELaunchSchemeAction runOperationForExecutionEnvironment:withBuildOperation:buildParameters:buildableProductDirectories:schemeActionRecord:outError:actionCallbackBlock:] (in IDEFoundation)
9 0x0000000108d94f5b -[IDEScheme _executionOperationForExecutionEnvironment:build:onlyBuild:buildPurpose:buildCommand:schemeCommand:title:overridingProperties:destination:buildLog:filePath:overridingBuildConfiguration:restorePersistedBuildResults:invocationRecord:overridingTestingSpecifiers:error:actionCallbackBlock:] (in IDEFoundation)
This may happen due to a broken LLDB debugger, which could only be solved by Apple.
However, I haven't found many similar problems from others on the internet yet, so this may only happen with my Xcode.
I had the same problem: was not able to run any Xcode projects. Reason was I was playing around on Python and downgraded it to 2.6.8 from 2.7.x. So, I have updated the python to 2.7.8 from older version, No problems so far, Xcode deploys everything very smoothly. Other things that I have tried was even uninstalling the X-code and install again, this didn't help. Very useful page to upgrade your python on macbook : http://wolfpaulus.com/jounal/mac/installing_python_osx/
It has nothing to do with your project. Somehow the Xcode.app that you launched has been damaged. Try downloading the latest Xcode from the App Store or ADC.
If this don't helps, try to report your problem: Apple Bug Reporter
If anyone still has the same problem, Apple told me that this happens if a wrong "custom" version of Python is installed. I installed Python 2.7.6 and it worked.

Nginx + Passenger - Uncaught exception in PassengerServer client thread

I've installed Passenger with Nginx for testing here and I keep getting this error after some thousand requests:
[ pid=57259 thr=0x40f07780 file=ext/nginx/HelperAgent.cpp:576 time=2010-12-15 14:04:25.876 ]: Uncaught exception in PassengerServer client thread:
exception: write() failed: Socket is not connected (57)
backtrace:
in 'void Client::forwardResponse(Passenger::SessionPtr&, Passenger::FileDescriptor&)' (HelperAgent.cpp:368)
in 'void Client::handleRequest(Passenger::FileDescriptor&)' (HelperAgent.cpp:502)
in 'void Client::threadMain()' (HelperAgent.cpp:595)
[ pid=57259 thr=0x40f07080 file=ext/nginx/HelperAgent.cpp:566 time=2010-12-15 14:04:26.416 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
I have 2 servers, and I was running haproxy+apache+mongrel on them, I switched one of them for haproxy+nginx+passenger (haproxy is only a backup for my testing, so I can redirect to the old schema quickly in case of fire).
So I noticed that my passenger dies after this message.
Im using ruby-ee 1.8.7, rails 2.3.5 and FreeBSD.
That turns out to be a FreeBSD kernel bug. We're slowly putting more workarounds in the Phusion Passenger codebase to work around this.

Resources