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

require('gcloud') crashing on Mac #681

Closed
javorosas opened this issue Jun 20, 2015 · 56 comments
Closed

require('gcloud') crashing on Mac #681

javorosas opened this issue Jun 20, 2015 · 56 comments
Assignees

Comments

@javorosas
Copy link

My old computer and my server instance both run Ubuntu and I never had any problem at all. Recently I'm using a Mac to code and have not been able to make this module work.

How to reproduce

I started a new project to isolate the issue to a minimum. This is the content of my server.js:

var gcloud = require('gcloud');
console.log("I'm here!");

I'm using:

  • A Mac with OS X 10.10.3
  • Tested with [email protected] and 0.13.2 with same results.
  • Tested with node.js 0.12.4 and 0.10.26 with same results.

Reproducing:

  1. I run node server.js on the terminal
  2. App crashes with the following output:
[1]    3488 illegal hardware instruction  node server.js

What I suspect

When I'm installing the npm module:

npm install [email protected]

I get the following output:

npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data

> [email protected] install /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/sse4_crc32
> node-gyp rebuild

2015-06-20 01:30:56.147 xcodebuild[4882:196113] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/VVDocumenter-Xcode.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-20 01:30:56.184 xcodebuild[4882:196113] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSImageNamed.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-20 01:30:56.206 xcodebuild[4882:196113] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/BBUDebuggerTuckAway.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-20 01:30:56.254 xcodebuild[4882:196113] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/AdjustFontSize.xcplugin' not present in DVTPlugInCompatibilityUUIDs
  CXX(target) Release/obj.target/sse4_crc32/src/sse4_crc32.o
  SOLINK_MODULE(target) Release/sse4_crc32.node
[email protected] node_modules/gcloud
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected])

I've googled those xcode-related warnings but haven't found anything relevant. I don't know if it's related with the issue, though.

Any clues?

@jgeewax
Copy link
Contributor

jgeewax commented Jun 20, 2015

I think this might be related to #425. Can you take a look ?

@ofrobots
Copy link
Contributor

@javorosas can you check if the following works:

$ npm install sse4_crc32
...
$ node -pe "require('sse4_crc32')"
{ isHardwareCrcSupported: [Function: isHardwareCrcSupported],
  calculateInSoftware: [Function: swCrc32c],
  calculateOnHardware: [Function: hwCrc32c],
  CRC32: [Function: Crc32C],
  calculate: [Function: hwCrc32c] }

@javorosas
Copy link
Author

Running

$ node -pe "require('sse4_crc32')"

Output:

[1]    64755 illegal hardware instruction  node -pe "require('sse4_crc32')"

Sorry I don't really know what I'm supposed to do with

{ isHardwareCrcSupported: [Function: isHardwareCrcSupported],
  calculateInSoftware: [Function: swCrc32c],
  calculateOnHardware: [Function: hwCrc32c],
  CRC32: [Function: Crc32C],
  calculate: [Function: hwCrc32c] }

@ofrobots
Copy link
Contributor

Thanks for verifying. The rest of text is the output I see on my Mac.

Your output confirms that the problem you're running into is indeed related to #425 and the sse4_crc32 module, but for some reason it happens on your machine, but not mine. Can you report back the exact CPU model in your mac using the following command:

$ sysctl -n machdep.cpu.brand_string

On my machine it outputs: 'Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz'.

@anandsuresh FYI.

@javorosas
Copy link
Author

I'm running a pretty shitty hardware actually. Mid 2007.

Output: Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz

@anandsuresh
Copy link
Contributor

Hey all. My first guess is that my CPU detection code might not be airtight on some platforms, esp. older ones. Can you all please run the following commands on your boxes and paste the output here. It would help debug this issue.

$ sysctl -n machdep.cpu.brand_string
Intel(R) Core(TM) i7-4650U CPU @ 1.70GHz
$ uname -a
Darwin AnandSuresh-23981.local 13.4.0 Darwin Kernel Version 13.4.0: Wed Mar 18 16:20:14 PDT 2015; root:xnu-2422.115.14~1/RELEASE_X86_64 x86_64
$ node -pe "require('sse4_crc32').isHardwareCrcSupported()"
true
$

@javorosas
Copy link
Author

$ sysctl -n machdep.cpu.brand_string
Intel(R) Core(TM)2 Duo CPU     T7300  @ 2.00GHz

$ uname -a
Darwin jrosas.local 14.3.0 Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64

$ node -pe "require('sse4_crc32').isHardwareCrcSupported()"
/Users/jrosas/dev/testgcloud/node_modules/sse4_crc32/node_modules/bindings/bindings.js:83
        throw e
              ^
Error: Module did not self-register.
    at Error (native)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at bindings (/Users/jrosas/dev/testgcloud/node_modules/sse4_crc32/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/Users/jrosas/dev/testgcloud/node_modules/sse4_crc32/sse4_crc32.js:8:36)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)

@ryanseys
Copy link
Contributor

Did you recently update node.js on your machine? If so try running npm rebuild and trying again.

@javorosas
Copy link
Author

I installed node using nvm and changed the node version when it first crashed. I rebuilt the modules every time I changed the version, though.

This is my output for npm rebuild

> [email protected] install /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/sse4_crc32
> node-gyp rebuild

2015-06-22 18:02:02.855 xcodebuild[4342:1353091] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/VVDocumenter-Xcode.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-22 18:02:02.892 xcodebuild[4342:1353091] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSImageNamed.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-22 18:02:02.947 xcodebuild[4342:1353091] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/BBUDebuggerTuckAway.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-22 18:02:03.008 xcodebuild[4342:1353091] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/AdjustFontSize.xcplugin' not present in DVTPlugInCompatibilityUUIDs
  CXX(target) Release/obj.target/sse4_crc32/src/sse4_crc32.o
  SOLINK_MODULE(target) Release/sse4_crc32.node

> [email protected] install /Users/jrosas/dev/testgcloud/node_modules/sse4_crc32
> node-gyp rebuild

2015-06-22 18:02:22.155 xcodebuild[4416:1355234] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/VVDocumenter-Xcode.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-22 18:02:22.174 xcodebuild[4416:1355234] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSImageNamed.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-22 18:02:22.196 xcodebuild[4416:1355234] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/BBUDebuggerTuckAway.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-22 18:02:22.235 xcodebuild[4416:1355234] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/AdjustFontSize.xcplugin' not present in DVTPlugInCompatibilityUUIDs
  CXX(target) Release/obj.target/sse4_crc32/src/sse4_crc32.o
  SOLINK_MODULE(target) Release/sse4_crc32.node
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/async
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/buffer-equal
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/configstore
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/configstore/node_modules/graceful-fs
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/configstore/node_modules/js-yaml
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/configstore/node_modules/js-yaml/node_modules/argparse
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/sprintf-js
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/configstore/node_modules/js-yaml/node_modules/esprima
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/configstore/node_modules/mkdirp
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/configstore/node_modules/mkdirp/node_modules/minimist
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/configstore/node_modules/object-assign
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/configstore/node_modules/osenv
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/configstore/node_modules/osenv/node_modules/os-tmpdir
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/configstore/node_modules/user-home
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/configstore/node_modules/uuid
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/configstore/node_modules/xdg-basedir
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/duplexify
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/duplexify/node_modules/end-of-stream
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/once
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/once/node_modules/wrappy
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/duplexify/node_modules/readable-stream
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/duplexify/node_modules/readable-stream/node_modules/core-util-is
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/duplexify/node_modules/readable-stream/node_modules/process-nextick-args
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/duplexify/node_modules/readable-stream/node_modules/inherits
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/duplexify/node_modules/readable-stream/node_modules/isarray
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/duplexify/node_modules/readable-stream/node_modules/string_decoder
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/duplexify/node_modules/readable-stream/node_modules/util-deprecate
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/extend
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/sse4_crc32
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/sse4_crc32/node_modules/bindings
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/sse4_crc32/node_modules/nan
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/google-p12-pem
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/google-p12-pem/node_modules/node-forge
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/jwa
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/jwa/node_modules/base64url
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/jwa/node_modules/buffer-equal-constant-time
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/base64url
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/base64url/node_modules/concat-stream
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/base64url/node_modules/concat-stream/node_modules/inherits
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/base64url/node_modules/concat-stream/node_modules/typedarray
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/base64url/node_modules/concat-stream/node_modules/readable-stream
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/base64url/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/base64url/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/base64url/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/base64url/node_modules/meow
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/base64url/node_modules/meow/node_modules/camelcase-keys
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/base64url/node_modules/meow/node_modules/camelcase-keys/node_modules/camelcase
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/base64url/node_modules/meow/node_modules/camelcase-keys/node_modules/map-obj
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/base64url/node_modules/meow/node_modules/indent-string
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/base64url/node_modules/meow/node_modules/indent-string/node_modules/get-stdin
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/base64url/node_modules/meow/node_modules/minimist
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/base64url/node_modules/meow/node_modules/indent-string/node_modules/repeating
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/base64url/node_modules/meow/node_modules/indent-string/node_modules/repeating/node_modules/is-finite
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/base64url/node_modules/meow/node_modules/indent-string/node_modules/repeating/node_modules/is-finite/node_modules/number-is-nan
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/jws/node_modules/base64url/node_modules/meow/node_modules/object-assign
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/mime
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/bl
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/bl/node_modules/readable-stream
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/inherits
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/caseless
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/forever-agent
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/form-data
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/form-data/node_modules/async
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/combined-stream
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/form-data/node_modules/mime-types
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/form-data/node_modules/mime-types/node_modules/mime-db
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/json-stringify-safe
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/mime-types
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/mime-types/node_modules/mime-db
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/node-uuid
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/qs
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/tunnel-agent
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/tough-cookie
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/http-signature
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/http-signature/node_modules/assert-plus
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/http-signature/node_modules/asn1
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/http-signature/node_modules/ctype
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/oauth-sign
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/hawk
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/hawk/node_modules/hoek
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/hawk/node_modules/boom
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/hawk/node_modules/cryptiles
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/hawk/node_modules/sntp
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/aws-sign2
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/stringstream
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/isstream
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/har-validator
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/har-validator/node_modules/bluebird
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/har-validator/node_modules/chalk
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/strip-ansi
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/har-validator/node_modules/commander
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/gtoken/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/lodash.noop
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/bl
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/bl/node_modules/readable-stream
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/inherits
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/caseless
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/forever-agent
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/form-data
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/combined-stream
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/form-data/node_modules/mime-types
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/form-data/node_modules/mime-types/node_modules/mime-db
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/json-stringify-safe
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/mime-types
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/qs
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/tunnel-agent
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/tough-cookie
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/http-signature
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/http-signature/node_modules/assert-plus
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/http-signature/node_modules/asn1
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/http-signature/node_modules/ctype
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/oauth-sign
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/hawk
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/hawk/node_modules/hoek
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/hawk/node_modules/boom
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/hawk/node_modules/cryptiles
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/hawk/node_modules/sntp
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/aws-sign2
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/request/node_modules/stringstream
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/google-auth-library/node_modules/string-template
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/mime-types
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/mime-types/node_modules/mime-db
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/protobufjs
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/protobufjs/node_modules/bytebuffer
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/protobufjs/node_modules/bytebuffer/node_modules/long
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/protobufjs/node_modules/bytebuffer/node_modules/bufferview
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/protobufjs/node_modules/ascli
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/protobufjs/node_modules/ascli/node_modules/colour
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/protobufjs/node_modules/ascli/node_modules/optjs
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/bl
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/bl/node_modules/readable-stream
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/inherits
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/caseless
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/forever-agent
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/form-data
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/form-data/node_modules/async
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/combined-stream
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/form-data/node_modules/mime-types
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/form-data/node_modules/mime-types/node_modules/mime-db
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/json-stringify-safe
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/mime-types
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/mime-types/node_modules/mime-db
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/qs
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/tunnel-agent
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/tough-cookie
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/http-signature
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/http-signature/node_modules/assert-plus
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/http-signature/node_modules/asn1
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/http-signature/node_modules/ctype
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/oauth-sign
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/hawk
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/hawk/node_modules/hoek
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/hawk/node_modules/boom
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/hawk/node_modules/cryptiles
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/hawk/node_modules/sntp
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/aws-sign2
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/stringstream
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/isstream
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/har-validator
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/har-validator/node_modules/bluebird
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/har-validator/node_modules/chalk
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/get-stdin
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/strip-ansi
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/har-validator/node_modules/commander
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/stream-events
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/stream-events/node_modules/stubs
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/through2
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/through2/node_modules/readable-stream
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/through2/node_modules/readable-stream/node_modules/isarray
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/through2/node_modules/readable-stream/node_modules/inherits
[email protected] /Users/jrosas/dev/testgcloud/node_modules/gcloud/node_modules/through2/node_modules/xtend
[email protected] /Users/jrosas/dev/testgcloud/node_modules/sse4_crc32
[email protected] /Users/jrosas/dev/testgcloud/node_modules/sse4_crc32/node_modules/bindings
[email protected] /Users/jrosas/dev/testgcloud/node_modules/sse4_crc32/node_modules/nan

@abelino
Copy link

abelino commented Jun 23, 2015

from the errors this deff looks like an assembly prob. Try to compile and running that portion on your own and see if it blows up. I'll try to research what instruction it doesn't like, but not easy without having a machine with your cpu.

#include <iostream>

using namespace std;

void cpuid(uint32_t op, uint32_t reg[4]) {
#if defined(__x86_64__)
  __asm__ volatile(
    "pushq %%rbx       \n\t"
    "cpuid             \n\t"
    "movl  %%ebx, %1   \n\t"
    "popq  %%rbx       \n\t"
    : "=a"(reg[0]), "=r"(reg[1]), "=c"(reg[2]), "=d"(reg[3])
    : "a"(op)
    : "cc");
#elif defined(_WIN64) || defined(_WIN32)
  #include <intrin.h>

  __cpuid((int *)reg, 1);
#else
  __asm__ volatile(
    "pushl %%ebx       \n\t"
    "cpuid             \n\t"
    "movl  %%ebx, %1   \n\t"
    "popl  %%ebx       \n\t"
    : "=a"(reg[0]), "=r"(reg[1]), "=c"(reg[2]), "=d"(reg[3])
    : "a"(op)
    : "cc");
#endif
}

int main(int argc, char *argv[]) {
  uint32_t reg[4];
  cpuid(1, reg);
  printf(((reg[2] >> 20) & 1) == 1 ? "yes\n" : "no\n");
}

compile

g++ -o cpuid cpuid.cpp

@javorosas
Copy link
Author

I compiled and ran the code. The output is:

no

@abelino
Copy link

abelino commented Jun 23, 2015

not an assembly issue then. reviewing the cpp code now

@anandsuresh
Copy link
Contributor

@javorosas @abelino The output seems to be expected. The Intel T7300 processor does not have the SSE 4.2 chipset and consequently we get a negative output. What baffles me is the fact that the library isn't using the software fallback.

Based on a previous message posted by @javorosas (pasted below for reference), it seems that the library is attempting to use H/w CRC even though the platform doesn't support it. The calculate function, which is the one that performs the CRC calculation is set to [Function: hwCrc32c] when it fact it should be set to [Function: swCrc32C]

{ isHardwareCrcSupported: [Function: isHardwareCrcSupported],
  calculateInSoftware: [Function: swCrc32c],
  calculateOnHardware: [Function: hwCrc32c],
  CRC32: [Function: Crc32C],
  calculate: [Function: hwCrc32c] }

@anandsuresh
Copy link
Contributor

@javorosas Can you confirm that the output I pasted in the last message was indeed something that you saw at your end or did I misinterpret your message?

@abelino
Copy link

abelino commented Jun 23, 2015

Yea I would like to know the same.

From my understanding, I don't think he got that far.

@javorosas
Copy link
Author

No, I never saw that in the terminal.

@abelino
Copy link

abelino commented Jun 23, 2015

ok so this is deff a compile time error, but at least we know its not an assembly code issue.

@anandsuresh
Copy link
Contributor

@javorosas Do you have node-gyp globally installed on your machine? My guess is that this might be a node-gyp version compatibility issue due to the Module did not self register error.

@javorosas
Copy link
Author

@anandsuresh No

@anandsuresh
Copy link
Contributor

@javorosas Can you also confirm that you can run an npm install to completion without any errors?

@abelino
Copy link

abelino commented Jun 23, 2015

do you think the functions mm_crc32* can be causing the prob on non sse4 systems?

@javorosas
Copy link
Author

I installed node-gyp globally with npm install -g node-gyp and then I tried npm rebuild. Still getting

[1]    5950 illegal hardware instruction  node server.js

@anandsuresh npm install gives me this:

> [email protected] install /Users/jrosas/dev/testgcloud/node_modules/sse4_crc32
> node-gyp rebuild

2015-06-23 10:53:53.171 xcodebuild[5974:1723215] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/VVDocumenter-Xcode.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-23 10:53:53.173 xcodebuild[5974:1723215] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSImageNamed.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-23 10:53:53.174 xcodebuild[5974:1723215] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/BBUDebuggerTuckAway.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-23 10:53:53.175 xcodebuild[5974:1723215] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/AdjustFontSize.xcplugin' not present in DVTPlugInCompatibilityUUIDs
  CXX(target) Release/obj.target/sse4_crc32/src/sse4_crc32.o
  SOLINK_MODULE(target) Release/sse4_crc32.node

@anandsuresh
Copy link
Contributor

@javorosas I'm guessing running node-gyp -v is returning v2.0.1?

@javorosas
Copy link
Author

@anandsuresh yes

@anandsuresh
Copy link
Contributor

@abelino The mm_crc32* functions are only part of the hardware function. So that function should not be called on @javorosas' platform since it doesn't support H/W CRC. Seems to be some weird linkage issue where the calculate function seems to be calling out to the h/w crc function instead of the s/w crc function.

@anandsuresh
Copy link
Contributor

@javorosas Can you paste the output of node -e "console.log('H/w CRC Support: ' + require('./sse4_crc32').isHardwareCrcSupported());" once again please?

@anandsuresh
Copy link
Contributor

Also @javorosas , node -pe "require('./sse4_crc32');" You might have to tweak the path to the module.

@abelino
Copy link

abelino commented Jun 23, 2015

@anandsuresh I don't even think its getting past NODE_MODULE(sse4_crc32, init)

since we are exporting the hwCrc, and since hwCrc32c is compiled, the following lines might be the prob at compile time 188, 195-197

@javorosas
Copy link
Author

I changed require('./sse4_crc32") to require('sse4_crc32")

$ node -e "console.log('H/w CRC Support: ' + require('sse4_crc32').isHardwareCrcSupported());"
[1]    6207 illegal hardware instruction  node -e 

$ node -pe "require('sse4_crc32');"
[1]    6221 illegal hardware instruction  node -pe "require('sse4_crc32');"

@abelino
Copy link

abelino commented Jun 23, 2015

any particular reason why we aren't using the something like:

#ifdef __SSE4_2__
#include <smmintrin.h>
#endif

#ifdef __SSE4_2__
uint32_t hwCrc32c(uint32_t initialCrc, const char *buf, size_t len) {
  //stuff
}

NAN_METHOD(hwCrc) {
  //stuff
}
#endif

#ifdef __SSE4_2__
NODE_SET_METHOD(exports, "hwCrc", hwCrc);
#endif

@javorosas
Copy link
Author

$ npm i sse4_crc32
/
> [email protected] install /Users/jrosas/dev/sse4_test/node_modules/sse4_crc32
> node-gyp rebuild

2015-06-23 12:14:39.608 xcodebuild[7008:2060025] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/VVDocumenter-Xcode.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-23 12:14:39.664 xcodebuild[7008:2060025] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSImageNamed.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-23 12:14:39.686 xcodebuild[7008:2060025] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/BBUDebuggerTuckAway.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-23 12:14:39.731 xcodebuild[7008:2060025] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/AdjustFontSize.xcplugin' not present in DVTPlugInCompatibilityUUIDs
  CXX(target) Release/obj.target/sse4_crc32/src/sse4_crc32.o
  SOLINK_MODULE(target) Release/sse4_crc32.node
[email protected] node_modules/sse4_crc32
├── [email protected]
└── [email protected]


$ node -pe "require('sse4_crc32')"
[1]    7071 illegal hardware instruction  node -pe "require('sse4_crc32')"

Are you guys sure the xcode warnings I'm getting don't have anything to do with this issue?

@anandsuresh
Copy link
Contributor

@abelino @javorosas From the log pasted, we can see that the initialization is running just fine.

.....
./node_modules/.bin/node-gyp build
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make[1]: Nothing to be done for `all'.
gyp info ok 
./node_modules/.bin/mocha test/*.test.js
:init:
make: *** [test] Illegal instruction: 4

The :init: line is printed at the end of the init function. So the compilation works just fine, as does the linking and loading of the node module in node.

Also, I get no xcode warnings on my system.

@abelino
Copy link

abelino commented Jun 23, 2015

@anandsuresh you are 100% correct on that. A very curious case here

@abelino
Copy link

abelino commented Jun 23, 2015

@javorosas here comes another test :D

If this compiles and runs properly, then its deff an issue with the js bindings.

cd /tmp
git clone [email protected]:abelino/sse4_crc32.git
cd sse4_crc32
git checkout cpptest
cd test
make

@anandsuresh
Copy link
Contributor

@javorosas @abelino I apologize for my last test. I had the log lines in the wrong place. I've updated the branch. Please do a git pull --rebase on the anand-crc-test branch and run make clean; make again. The output should show us where the code breaks.

@javorosas
Copy link
Author

@abelino :D yaay! another test

$ make
g++ -o sse4_crc32 sse4_crc32.cpp -msse4.2
./sse4_crc32
crc32c 3381945770

No errors apparently

@abelino
Copy link

abelino commented Jun 23, 2015

@javorosas wow ok that totally proves the c++ code is good. Now let us know what you get from the test on branch anand-crc-test.

@javorosas
Copy link
Author

@anandsuresh

$ make clean; make
./node_modules/.bin/node-gyp clean
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info ok 
./node_modules/.bin/node-gyp clean
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info ok 
npm install .

> [email protected] install /Users/jrosas/dev/sse4_test/sse4_crc32
> node-gyp rebuild

2015-06-23 15:38:31.352 xcodebuild[9139:2349932] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/VVDocumenter-Xcode.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-23 15:38:31.356 xcodebuild[9139:2349932] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSImageNamed.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-23 15:38:31.379 xcodebuild[9139:2349932] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/BBUDebuggerTuckAway.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-23 15:38:31.414 xcodebuild[9139:2349932] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/AdjustFontSize.xcplugin' not present in DVTPlugInCompatibilityUUIDs
  CXX(target) Release/obj.target/sse4_crc32/src/sse4_crc32.o
  SOLINK_MODULE(target) Release/sse4_crc32.node
./node_modules/.bin/node-gyp configure
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn python2
gyp info spawn args [ '/Users/jrosas/dev/sse4_test/sse4_crc32/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/jrosas/dev/sse4_test/sse4_crc32/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/jrosas/dev/sse4_test/sse4_crc32/common.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/jrosas/dev/sse4_test/sse4_crc32/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/jrosas/.node-gyp/0.12.4/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/jrosas/.node-gyp/0.12.4',
gyp info spawn args   '-Dmodule_root_dir=/Users/jrosas/dev/sse4_test/sse4_crc32',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
2015-06-23 15:38:36.520 xcodebuild[9198:2350055] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/VVDocumenter-Xcode.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-23 15:38:36.523 xcodebuild[9198:2350055] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/KSImageNamed.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-23 15:38:36.524 xcodebuild[9198:2350055] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/BBUDebuggerTuckAway.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2015-06-23 15:38:36.525 xcodebuild[9198:2350055] [MT] PluginLoading: Required plug-in compatibility UUID E969541F-E6F9-4D25-8158-72DC3545A6C6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/AdjustFontSize.xcplugin' not present in DVTPlugInCompatibilityUUIDs
gyp info ok 
./node_modules/.bin/node-gyp build
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make[1]: Nothing to be done for `all'.
gyp info ok 
./node_modules/.bin/mocha test/*.test.js
:init:
make: *** [test] Illegal instruction: 4

@abelino
Copy link

abelino commented Jun 23, 2015

@javorosas just to be 100% did you do git pull --rebase on the anand-crc-test

@anandsuresh
Copy link
Contributor

@javorosas If you did do a git pull --rebase before running that test, then the problem is coming from this line:

NODE_SET_METHOD(exports, "isHardwareCrcSupported", isHardwareCrcSupported);

@javorosas
Copy link
Author

@abelino yes, I'm actually removing the whole folder every time I'm making the test

@anandsuresh
Copy link
Contributor

@javorosas Can you add a printf to line 317 in src/sse4_crc32.cpp and confirm that you see the first 2 log lines (:init: and the new line you added)? I just want to rule out the possibility of the initCrcTable() function doing something weird.

@javorosas
Copy link
Author

I inserted the following logs:

Around line 98:

...
void initCrcTable() {
    uint32_t i, j, crc;
    printf("%s:\n", "one");
    for (i = 0; i < 256; i++) {
        crc = i;
        crc = crc & 1 ? (crc >> 1) ^ CRC32C_POLYNOMIAL : crc >> 1;
        crc = crc & 1 ? (crc >> 1) ^ CRC32C_POLYNOMIAL : crc >> 1;
        crc = crc & 1 ? (crc >> 1) ^ CRC32C_POLYNOMIAL : crc >> 1;
        crc = crc & 1 ? (crc >> 1) ^ CRC32C_POLYNOMIAL : crc >> 1;
        crc = crc & 1 ? (crc >> 1) ^ CRC32C_POLYNOMIAL : crc >> 1;
        crc = crc & 1 ? (crc >> 1) ^ CRC32C_POLYNOMIAL : crc >> 1;
        crc = crc & 1 ? (crc >> 1) ^ CRC32C_POLYNOMIAL : crc >> 1;
        crc = crc & 1 ? (crc >> 1) ^ CRC32C_POLYNOMIAL : crc >> 1;
        crc32cTable[0][i] = crc;
    }
    printf("%s:\n", "two");

    for (i = 0; i < 256; i++) {
        crc = crc32cTable[0][i];
        for (j = 1; j < 8; j++) {
            crc = crc32cTable[0][crc & 0xff] ^ (crc >> 8);
            crc32cTable[j][i] = crc;
        }
    }
    printf("%s:\n", "three");
}
...

Around line 316:

...
void init(Handle<Object> exports) {
    printf(":%s:\n", "init");
    printf(":%s:\n", "Hey!");
    initCrcTable();
    printf(":%s:\n", "Listen!");
...

These are the last lines in the output when running make clean; make

...
make[1]: Nothing to be done for `all'.
gyp info ok 
./node_modules/.bin/mocha test/*.test.js
:init:
:Hey!:
one:
make: *** [test] Illegal instruction: 4

@abelino
Copy link

abelino commented Jun 23, 2015

that is very interesting. The initCrcTable function ran fine when you ran the cpptest earlier. Something funky is going on.

@anandsuresh
Copy link
Contributor

The good news: Now we have more information and know where to start our debugging.
The bad news: This is some really funky stuff and I'd need to be on the same hardware/platform in order to debug this.

Since you were able to run the initCrcTable function without errors using @abelino's code, it stands to reason that it should work in this scenario too. But as we can see, our assumption is being proven wrong!

Seems that we will need more information:

  • The platform (OS version specifics) uname -a should get that info.
  • The compiler specifics: gcc -v, or clang -v (in the case of MacOS)

@anandsuresh
Copy link
Contributor

I have a feeling that you've recently upgraded to the latest/greatest Darwin kernel, and have received the corresponding Clang compiler, which might be responsible for this.

@anandsuresh
Copy link
Contributor

@abelino I might consider adding #ifdef __SSE4_2__ all over the code to deal with platform specific compilation. The code was written for our own platform (all Intel processors) which never had any of these issues. The software fallback was added way down the line. :)

@javorosas
Copy link
Author

$ uname -a
Darwin jrosas.local 14.3.0 Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64

$ clang -v
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix

@anandsuresh
Copy link
Contributor

@javorosas I'm running clang 6.0 on kernel 13.4 and face no issues. Can you try this on a different OS platform, like a lower kernel version? I'm trying to get my hands on an updated kernel to test at my end as well.

@javorosas
Copy link
Author

I'm not able to try it in a different kernel version, since it's the computer from my job. But I can keep executing tests if it helps.

@abelino
Copy link

abelino commented Jun 25, 2015

@javorosas locally can you replace the type on line 97 from uint32_t i, j, crc; to uint64_t i, j, crc; and re-run the test with all the logs.

@stephenplusplus
Copy link
Contributor

We have quite a few of these issues popping up here that are actually coming from https://github.com/Voxer/sse4_crc32. I think since it's been almost 2 months since a reply here, this has been resolved. If not, it will probably be easier to open this up over at their repo for better, quicker help: https://github.com/Voxer/sse4_crc32.

sofisl pushed a commit that referenced this issue Oct 11, 2022
* chore(main): release 5.0.2

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this issue Oct 13, 2022
* chore(main): release 5.0.2

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
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

7 participants