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

router-simple segfaults #1207

Open
japhar81 opened this issue Sep 22, 2024 · 3 comments
Open

router-simple segfaults #1207

japhar81 opened this issue Sep 22, 2024 · 3 comments
Labels
bug Something isn't working internally-reviewed The issue has been reviewed internally.

Comments

@japhar81
Copy link

Component(s)

router

Component version

bc6a2ae

wgc version

bc6a2ae

controlplane version

bc6a2ae

router version

bc6a2ae

What happened?

Description

The router-simple example crashes

Steps to Reproduce

  1. Clone main branch
  2. cd examples/router-simple
  3. ./start.sh
  4. Run query from README.md

Expected Result

Query runs

Actual Result

./start.sh

changed 308 packages in 8s

66 packages are looking for funding
  run `npm fund` for details
17:53:06 PM INFO Found default config file. Values in the config file have higher priority than environment variables {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "config_file": "config.yaml"}
17:53:06 PM INFO GOMEMLIMIT set automatically {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "limit": "294 GB"}
17:53:06 PM WARN No graph token provided. The following Cosmo Cloud features are disabled. Not recommended for Production. {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "features": ["Schema Usage Tracking", "Persistent operations", "Cosmo Cloud Tracing", "Cosmo Cloud Metrics"]}
17:53:06 PM WARN Development mode enabled. This should only be used for testing purposes {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0"}
17:53:06 PM INFO Prometheus metrics enabled {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "listen_addr": "127.0.0.1:8088", "endpoint": "/metrics"}
17:53:06 PM INFO Serving GraphQL playground {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "url": "http://localhost:3002/"}
17:53:06 PM INFO Server listening and serving {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "listen_addr": "localhost:3002", "playground": true, "introspection": true, "config_version": "d92f801d-4406-44e1-ba59-30444d568d1c"}
17:53:06 PM INFO Watching config file for changes. Router will hot-reload automatically without downtime {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "path": "config.json"}
17:53:07 PM INFO /graphql {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "method": "POST", "path": "/graphql", "query": "", "ip": "[REDACTED]", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:130.0) Gecko/20100101 Firefox/130.0", "config_version": "d92f801d-4406-44e1-ba59-30444d568d1c", "request_id": "Henrys-Mac-Pro-3.local/Mxlyjnsdh3-000003", "trace_id": "8543bdab3a5cefd9dea8766c72637510", "latency": 0.01642465, "status": 200}
17:53:07 PM INFO /graphql {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "method": "POST", "path": "/graphql", "query": "", "ip": "[REDACTED]", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:130.0) Gecko/20100101 Firefox/130.0", "config_version": "d92f801d-4406-44e1-ba59-30444d568d1c", "request_id": "Henrys-Mac-Pro-3.local/Mxlyjnsdh3-000002", "trace_id": "79c2fac1f377016bc36adc1238a1dcfb", "latency": 0.01843879, "status": 200}
17:53:08 PM INFO /graphql {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "method": "POST", "path": "/graphql", "query": "", "ip": "[REDACTED]", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:130.0) Gecko/20100101 Firefox/130.0", "config_version": "d92f801d-4406-44e1-ba59-30444d568d1c", "request_id": "Henrys-Mac-Pro-3.local/Mxlyjnsdh3-000004", "trace_id": "bfa79ee5d97abba27e438babfad08d5a", "latency": 0.012615133, "status": 200}
17:53:08 PM INFO /graphql {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "method": "POST", "path": "/graphql", "query": "", "ip": "[REDACTED]", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:130.0) Gecko/20100101 Firefox/130.0", "config_version": "d92f801d-4406-44e1-ba59-30444d568d1c", "request_id": "Henrys-Mac-Pro-3.local/Mxlyjnsdh3-000005", "latency": 0.001385419, "status": 200}
17:53:17 PM INFO /graphql {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "method": "POST", "path": "/graphql", "query": "", "ip": "[REDACTED]", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:130.0) Gecko/20100101 Firefox/130.0", "config_version": "d92f801d-4406-44e1-ba59-30444d568d1c", "request_id": "Henrys-Mac-Pro-3.local/Mxlyjnsdh3-000006", "trace_id": "e3407edfc24b1d2a2879b128ca275627", "latency": 1.009480639, "status": 200}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x79 pc=0xe8eac7b]

goroutine 616 [running]:
github.com/wundergraph/graphql-go-tools/v2/pkg/engine/resolve.(*Loader).executeSourceLoad.func7({0xf65ec5d, 0x3}, {0xc00025dca0, 0x1a}, {0xffd7f60, 0xc000996960})
	github.com/wundergraph/graphql-go-tools/[email protected]/pkg/engine/resolve/loader.go:1494 +0xfb
net.(*sysDialer).dialSingle.func1()
	net/dial.go:660 +0x43
net.(*sysDialer).dialSingle(0xc0021aa3c0, {0xffe9c18, 0xc0009965a0}, {0xffe1f18, 0xc001bc2a20})
	net/dial.go:685 +0x509
net.(*sysDialer).dialSerial(0xc0021aa3c0, {0xffe9c18, 0xc0009965a0}, {0xc00198af90?, 0x1, 0xc000ec4150?})
	net/dial.go:635 +0x24e
net.(*sysDialer).dialParallel.func1({0xffe9c18?, 0xc0009965a0?}, 0x0)
	net/dial.go:555 +0x86
created by net.(*sysDialer).dialParallel in goroutine 599
	net/dial.go:581 +0x61f

Environment information

Environment

MacOS 15.0
Docker Desktop

Router configuration

No response

Router execution config

No response

Log output

./start.sh

changed 308 packages in 8s

66 packages are looking for funding
  run `npm fund` for details
17:53:06 PM INFO Found default config file. Values in the config file have higher priority than environment variables {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "config_file": "config.yaml"}
17:53:06 PM INFO GOMEMLIMIT set automatically {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "limit": "294 GB"}
17:53:06 PM WARN No graph token provided. The following Cosmo Cloud features are disabled. Not recommended for Production. {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "features": ["Schema Usage Tracking", "Persistent operations", "Cosmo Cloud Tracing", "Cosmo Cloud Metrics"]}
17:53:06 PM WARN Development mode enabled. This should only be used for testing purposes {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0"}
17:53:06 PM INFO Prometheus metrics enabled {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "listen_addr": "127.0.0.1:8088", "endpoint": "/metrics"}
17:53:06 PM INFO Serving GraphQL playground {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "url": "http://localhost:3002/"}
17:53:06 PM INFO Server listening and serving {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "listen_addr": "localhost:3002", "playground": true, "introspection": true, "config_version": "d92f801d-4406-44e1-ba59-30444d568d1c"}
17:53:06 PM INFO Watching config file for changes. Router will hot-reload automatically without downtime {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "path": "config.json"}
17:53:07 PM INFO /graphql {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "method": "POST", "path": "/graphql", "query": "", "ip": "[REDACTED]", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:130.0) Gecko/20100101 Firefox/130.0", "config_version": "d92f801d-4406-44e1-ba59-30444d568d1c", "request_id": "Henrys-Mac-Pro-3.local/Mxlyjnsdh3-000003", "trace_id": "8543bdab3a5cefd9dea8766c72637510", "latency": 0.01642465, "status": 200}
17:53:07 PM INFO /graphql {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "method": "POST", "path": "/graphql", "query": "", "ip": "[REDACTED]", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:130.0) Gecko/20100101 Firefox/130.0", "config_version": "d92f801d-4406-44e1-ba59-30444d568d1c", "request_id": "Henrys-Mac-Pro-3.local/Mxlyjnsdh3-000002", "trace_id": "79c2fac1f377016bc36adc1238a1dcfb", "latency": 0.01843879, "status": 200}
17:53:08 PM INFO /graphql {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "method": "POST", "path": "/graphql", "query": "", "ip": "[REDACTED]", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:130.0) Gecko/20100101 Firefox/130.0", "config_version": "d92f801d-4406-44e1-ba59-30444d568d1c", "request_id": "Henrys-Mac-Pro-3.local/Mxlyjnsdh3-000004", "trace_id": "bfa79ee5d97abba27e438babfad08d5a", "latency": 0.012615133, "status": 200}
17:53:08 PM INFO /graphql {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "method": "POST", "path": "/graphql", "query": "", "ip": "[REDACTED]", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:130.0) Gecko/20100101 Firefox/130.0", "config_version": "d92f801d-4406-44e1-ba59-30444d568d1c", "request_id": "Henrys-Mac-Pro-3.local/Mxlyjnsdh3-000005", "latency": 0.001385419, "status": 200}
17:53:17 PM INFO /graphql {"hostname": "Henrys-Mac-Pro-3.local", "pid": 54869, "component": "@wundergraph/router", "service_version": "0.113.0", "method": "POST", "path": "/graphql", "query": "", "ip": "[REDACTED]", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:130.0) Gecko/20100101 Firefox/130.0", "config_version": "d92f801d-4406-44e1-ba59-30444d568d1c", "request_id": "Henrys-Mac-Pro-3.local/Mxlyjnsdh3-000006", "trace_id": "e3407edfc24b1d2a2879b128ca275627", "latency": 1.009480639, "status": 200}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x79 pc=0xe8eac7b]

goroutine 616 [running]:
github.com/wundergraph/graphql-go-tools/v2/pkg/engine/resolve.(*Loader).executeSourceLoad.func7({0xf65ec5d, 0x3}, {0xc00025dca0, 0x1a}, {0xffd7f60, 0xc000996960})
	github.com/wundergraph/graphql-go-tools/[email protected]/pkg/engine/resolve/loader.go:1494 +0xfb
net.(*sysDialer).dialSingle.func1()
	net/dial.go:660 +0x43
net.(*sysDialer).dialSingle(0xc0021aa3c0, {0xffe9c18, 0xc0009965a0}, {0xffe1f18, 0xc001bc2a20})
	net/dial.go:685 +0x509
net.(*sysDialer).dialSerial(0xc0021aa3c0, {0xffe9c18, 0xc0009965a0}, {0xc00198af90?, 0x1, 0xc000ec4150?})
	net/dial.go:635 +0x24e
net.(*sysDialer).dialParallel.func1({0xffe9c18?, 0xc0009965a0?}, 0x0)
	net/dial.go:555 +0x86
created by net.(*sysDialer).dialParallel in goroutine 599
	net/dial.go:581 +0x61f


### Additional context

_No response_
@japhar81 japhar81 added the bug Something isn't working label Sep 22, 2024
Copy link

WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible.
The roadmap is driven by our customers and we have to prioritize issues that are important to them.
You can influence the priority by becoming a customer. Please contact us here.

@devsergiy
Copy link
Member

Hi @japhar81

Could you give us more details?

We can't reproduce it with the latest version

@devsergiy devsergiy added the internally-reviewed The issue has been reviewed internally. label Sep 23, 2024
@japhar81
Copy link
Author

japhar81 commented Oct 3, 2024

@devsergiy happy to.. what do you need? I just pulled latest main and tried it again with docker desktop (latest release) reset to factory defaults on MacOS Sequoia 15.0 (all updates installed).

cd cosmo/examples/router-simple
./start.sh

Once it's up, hit http://localhost:3002/ and run the provided query in the README:

query MyEmployees {
  employees {
    details {
      forename
    }
    currentMood
    derivedMood
    isAvailable
    notes
    products
  }
}

Data comes back (screenshot attached), but the server segfaults (screenshot attached)
image
image

Happy to provide anything else you need..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working internally-reviewed The issue has been reviewed internally.
Projects
None yet
Development

No branches or pull requests

2 participants