-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
bug: openid-connect plugin causes nginx to crash on ARM64 #6666
Comments
Update: Looks like the issue is specific to Alpine Linux for ARM 64. I've switched to Centos based docker image (apache/apisix:2.12.1-centos) and the error is gone. |
Yes, support on M1 is not perfect at the moment. It would be nice if you could provide core dump file about this |
@soulbird @shuaijinchao pls take a look this issue |
I'll take a look |
I think Apache APISIX should add ARM64 to CI |
I used the same test environment as you, but I didn't reproduce it. And a difference is the |
@soulbird Did you use the arm64 local environment? |
I used MacOS with M1 and docker to reproduce it, but did not get the expected result. |
When the process exits unexpectedly, you can use the following method to get coredump file steup 1: adjust apisix mirror startup parameters apisix:
image: apache/apisix:2.12.1-alpine
restart: always
privileged: true
volumes:
- ./apisix_log:/usr/local/apisix/logs
- ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
depends_on:
- etcd
ports:
- "9080:9080/tcp"
- "9091:9091/tcp"
- "9443:9443/tcp"
- "9092:9092/tcp"
networks:
apisix: steup 2: adjust core file size ulimit -c
unlimited
# If 0, use the following commands to lift the limit or set a custom size.
$ ulimit -c unlimited steup 3: change the default core file directory $ sysctl -w kernel.core_pattern=/tmp/core-%e.%p.%t
$ sysctl -p /etc/sysctl.conf You will see the coredump file in the $ ll /tmp
rw------- 1 root root 280 MiB Mon Mar 21 14:11:22 2022 core-openresty.29770.1647843081 |
This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions. |
This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time. |
Current Behavior
I've enabled
openid-connect
plugin on a route but it when making a request to this route causes nginx process to crash (see debug level logs below). I'm running it on Mac M1 (arm64) so this issue could be specific to arm64.It looks like it executes successfully up to this point:
https://github.com/zmartzone/lua-resty-openidc/blob/master/lib/resty/openidc.lua#L567
Then client.lua and resolver.lua somehow get involved and it results in
nginx
crashing:This could be specific to arm64. I haven't tried it with x64.
Expected Behavior
Expected normal oidc flow
Error Logs
Steps to Reproduce
docker-compose
with this file: https://github.com/apache/apisix-docker/blob/master/example/docker-compose-arm64.ymlopenid-connect
plugin:Environment
macOS 12.2.1
20.10.13
2.12.1
Linux dc3c486f70f2 5.10.104-linuxkit #1 SMP PREEMPT Wed Mar 9 19:01:25 UTC 2022 aarch64 Linux
openresty/1.19.9.1
3.4.16
3.8.0
The text was updated successfully, but these errors were encountered: