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

Unknown system error -86 when spawning binary from @cubejs-backend/query-orchestrator (darwin-arm64) #8949

Closed
vieira opened this issue Nov 12, 2024 · 2 comments · Fixed by #8950
Assignees
Labels

Comments

@vieira
Copy link
Contributor

vieira commented Nov 12, 2024

Describe the bug
When running cube-server I see some errors in the logs like:

Error querying db scheduler-b760bd0f-c771-4b85-9f41-47c90f65225f
   Error: spawn Unknown system error -86
    at QueryQueue.parseResult (/Users/vieira/Developer/platform/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/QueryQueue.js:394:13)
    at QueryQueue.executeInQueue (/Users/vieira/Developer/platform/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/QueryQueue.js:225:19)
    at PreAggregationLoadCache.keyQueryResult (/Users/vieira/Developer/platform/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/PreAggregations.ts:439:75)
    at async Promise.all (index 0)
    at PreAggregationLoader.loadPreAggregationWithKeys (/Users/vieira/Developer/platform/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/PreAggregations.ts:649:30)
    at PreAggregationLoader.loadPreAggregation (/Users/vieira/Developer/platform/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/PreAggregations.ts:579:22)
    at preAggregationPromise (/Users/vieira/Developer/platform/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/PreAggregations.ts:2238:30)
    at QueryOrchestrator.fetchQuery (/Users/vieira/Developer/platform/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/QueryOrchestrator.ts:218:9)
    at OrchestratorApi.executeQuery (/Users/vieira/Developer/platform/node_modules/@cubejs-backend/server-core/src/core/OrchestratorApi.ts:98:20)
    at /Users/vieira/Developer/platform/node_modules/@cubejs-backend/server-core/src/core/RefreshScheduler.ts:605:13
    at async Promise.all (index 0)
    at RefreshScheduler.refreshPreAggregations (/Users/vieira/Developer/platform/node_modules/@cubejs-backend/server-core/src/core/RefreshScheduler.ts:590:5)

During install I noticed there was a post install step that downloads a native binary.

I have downloaded this file directly and after extracting it, trying to run index.node directly also produces an error.

EDIT: This seems to be unrelated.

The cause seems to be the cubestored binary in @cubejs-backend/cubestore/downloaded/latest/bin. On an Intel mac it runs fine but on ARM mac it fails to exec:

exec: Failed to execute process './cubestored': Bad CPU type in executable.

The environment where I'm running is macOS 15.1 on M4 MBP:

$ uname -a
Darwin giant.local 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:06:57 PDT 2024; root:xnu-11215.41.3~3/RELEASE_ARM64_T6041 arm64
$ sysctl machdep.cpu
machdep.cpu.cores_per_package: 12
machdep.cpu.core_count: 12
machdep.cpu.logical_per_package: 12
machdep.cpu.thread_count: 12
machdep.cpu.brand_string: Apple M4 Pro

To Reproduce
Steps to reproduce the behavior:

  1. Install @cubejs-backend/server on an ARM64 Mac (?)
  2. Run cubejs-server dev-server
  3. Notice some query-orchestrator errors in the logs spawning.

Minimally reproducible Cube Schema
It doesn't seem to be exclusive to preAggregations but having a preAggregation triggers the error quickly and any query that would use the preAggregation fails. Some other queries still succeed.

Version:
1.1.3 (also tested with 1.0.5 and 1.1.4, same issue)

vieira added a commit to vieira/cube.js that referenced this issue Nov 13, 2024
@vieira vieira changed the title Unknown system error -86 when spawning binary from @cubejs-backend/native (darwin-arm64) Unknown system error -86 when spawning binary from @cubejs-backend/query-orchestrator (darwin-arm64) Nov 13, 2024
@ovr ovr closed this as completed in #8950 Nov 13, 2024
ovr added a commit that referenced this issue Nov 13, 2024
#8950)

Fixes: #8949

---------

Co-authored-by: Dmitry Patsura <zaets28rus@gmail.com>
@ovr ovr reopened this Nov 13, 2024
@ovr
Copy link
Member

ovr commented Nov 13, 2024

@vieira, Could you give a try with the new release?

Thanks

@igorlukanin igorlukanin self-assigned this Nov 13, 2024
@vieira
Copy link
Contributor Author

vieira commented Nov 13, 2024

@ovr Confirmed as fixed in 1.1.5. Thanks a lot!

@vieira vieira closed this as completed Nov 13, 2024
ptiurin pushed a commit to firebolt-db/cube that referenced this issue Nov 27, 2024
cube-js#8950)

Fixes: cube-js#8949

---------

Co-authored-by: Dmitry Patsura <zaets28rus@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants