router-simple segfaults
Component(s)
router
Component version
bc6a2ae06bdcf50308ea93072b797400cf9d61c8
wgc version
bc6a2ae06bdcf50308ea93072b797400cf9d61c8
controlplane version
bc6a2ae06bdcf50308ea93072b797400cf9d61c8
router version
bc6a2ae06bdcf50308ea93072b797400cf9d61c8
What happened?
Description
The router-simple example crashes
Steps to Reproduce
- Clone main branch
- cd examples/router-simple
- ./start.sh
- 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_
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.
Hi @japhar81
Could you give us more details?
We can't reproduce it with the latest version
@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)
Happy to provide anything else you need..