caddyserver / caddy

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
https://caddyserver.com
Apache License 2.0
57.11k stars 3.99k forks source link

Illegal instruction on Asus RT-AC68U router #1822

Closed Enver-Yilmaz closed 7 years ago

Enver-Yilmaz commented 7 years ago

1. What version of Caddy are you using (caddy -version)?

Website says 10.0.6, caddy -version gives "illegal instruction"

2. What are you trying to do?

this is my first try to run Caddy on Asus RT-AC68U router with custom "Merlin" firmware. uname output is "Linux router 2.6.36.4brcmarm #2 SMP PREEMPT Sun Jul 16 13:04:40 EDT 2017 armv7l ASUSWRT-Merlin" I tried both Linux ARMv7 and ARMv6 versions of caddy. For your information I successfully run portainer which is build with golang on this platform.

3. What is your entire Caddyfile?

there's no caddy file yet

4. How did you run Caddy (give the full command and describe the execution environment)?

caddy - version

5. Please paste any relevant HTTP request(s) here.

6. What did you expect to see?

7. What did you see instead (give full error messages and/or log)?

Illegal instruction

8. How can someone who is starting from scratch reproduce the bug as minimally as possible?

To reproduce this you need an Asus RT series router hardware with stock or "merlin" firmware

mholt commented 7 years ago

Uhhh, huh, that's weird. I don't have that router (or access to one, that I know of) so you'll have to help out a bit!

Do you have any experience with gdb? Could you possibly run it with gdb and see if we can find the area where it's crashing?

Enver-Yilmaz commented 7 years ago

I have no experience with gdb. I tried "gdb caddy" but it raised an error about autoload scripts. I can go further and figure out how to use gdb or I can give you ssh access to my router. Which one do you prefer?

wader commented 7 years ago

Could it be something similar to https://github.com/golang/go/issues/18483 ?

Enver-Yilmaz commented 7 years ago

@wader Yes that's it. Either CPU or kernel doesn't has cpu support. I tried armv5 and it works. Here is /proc/cpuinfo

Processor : ARMv7 Processor rev 0 (v7l) processor : 0 BogoMIPS : 1599.07

processor : 1 BogoMIPS : 1595.80

Features : swp half thumb fastmult edsp CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x3 CPU part : 0xc09 CPU revision : 0

Hardware : Northstar Prototype Revision : 0000 Serial : 0000000000000000

I actually tried to download armv5 with curl before but I guess I didn't give download server to enough time to compile before download and I thought download is broken. I did wait this time and took 58 seconds to compile and download.

wader commented 7 years ago

👍