Skip to content
This repository has been archived by the owner on Jun 22, 2021. It is now read-only.

VCL from make check does not compile on arm64 (QEMU) #19

Closed
csandanov opened this issue Jun 18, 2021 · 4 comments
Closed

VCL from make check does not compile on arm64 (QEMU) #19

csandanov opened this issue Jun 18, 2021 · 4 comments

Comments

@csandanov
Copy link

I'm building a docker image for varnish with libvmod geo ip for amd64 and arm64, I use QEMU to build arm64 variant on amd64 machines (github actions).

Installation works fine on amd64 but fails on arm64 during make check (VCL does not compile):

#10 913.4 + make check
#10 913.5 Making check in src
#10 913.6 make[1]: Entering directory '/tmp/libvmod-geoip-libvmod-geoip-1.0.3/src'
#10 913.6 /usr/bin/varnishtest -Dvarnishd=/usr/sbin/varnishd -Dvmod_topbuild=/tmp/libvmod-geoip-libvmod-geoip-1.0.3 ../src/tests/test01.vtc
#10 918.2 **** top   0.0 extmacro def ***
#10 918.2 **** top   0.0 extmacro def varnishd=/usr/sbin/varnishd
#10 918.2 **** top   0.0 extmacro def vmod_topbuild=/tmp/libvmod-geoip-libvmod-geoip-1.0.3
#10 918.2 **** top   0.0 extmacro def localhost=127.0.0.1
#10 918.2 **** top   0.0 extmacro def bad_backend=127.0.0.1 43371
#10 918.2 **** top   0.0 extmacro def bad_ip=192.0.2.255
#10 918.2 **** top   0.0 macro def testdir=/tmp/libvmod-geoip-libvmod-geoip-1.0.3/src/../src/tests
#10 918.2 **** top   0.0 macro def tmpdir=/tmp/vtc.32985.208d4675
#10 918.2 *    top   0.0 TEST ../src/tests/test01.vtc starting
#10 918.2 **   top   0.0 === varnishtest "Test an unknown IP address"
#10 918.2 *    top   0.0 TEST Test an unknown IP address
#10 918.2 **   top   0.0 === server s1 {
#10 918.2 **   s1    0.0 Starting server
#10 918.2 **** s1    0.0 macro def s1_addr=127.0.0.1
#10 918.2 **** s1    0.0 macro def s1_port=46763
#10 918.2 **** s1    0.0 macro def s1_sock=127.0.0.1 46763
#10 918.2 *    s1    0.0 Listen on 127.0.0.1 46763
#10 918.2 **   top   0.0 === varnish v1 -vcl+backend {
#10 918.2 **   s1    0.0 Started on 127.0.0.1 46763 (1 iterations)
#10 918.2 **   v1    0.1 Launch
#10 918.2 ***  v1    0.1 CMD: cd ${pwd} && exec varnishd  -d -n /tmp/vtc.32985.208d4675/v1 -l 2m -p auto_restart=off -p syslog_cli_traffic=off -p sigsegv_handler=on -p thread_pool_min=10 -p debug=+vtc_mode -a '127.0.0.1:0' -M '127.0.0.1 39681' -P /tmp/vtc.32985.208d4675/v1/varnishd.pid 
#10 918.2 ***  v1    0.1 CMD: cd /tmp/libvmod-geoip-libvmod-geoip-1.0.3/src && exec varnishd  -d -n /tmp/vtc.32985.208d4675/v1 -l 2m -p auto_restart=off -p syslog_cli_traffic=off -p sigsegv_handler=on -p thread_pool_min=10 -p debug=+vtc_mode -a '127.0.0.1:0' -M '127.0.0.1 39681' -P /tmp/vtc.32985.208d4675/v1/varnishd.pid 
#10 918.2 ***  v1    0.1 PID: 32998
#10 918.2 **** v1    0.1 macro def v1_pid=32998
#10 918.2 **** v1    0.1 macro def v1_name=/tmp/vtc.32985.208d4675/v1
#10 918.2 ***  v1    2.3 debug|Debug: Version: varnish-6.0.7 revision 525d371e3ea0e0c38edd7baf0f80dc226560f26e
#10 918.2 ***  v1    2.3 debug|Debug: Platform: Linux,5.8.0-1033-azure,aarch64,-junix,-sdefault,-sdefault,-hcritbit
#10 918.2 ***  v1    2.3 debug|200 318     
#10 918.2 ***  v1    2.3 debug|-----------------------------
#10 918.2 ***  v1    2.3 debug|Varnish Cache CLI 1.0
#10 918.2 ***  v1    2.3 debug|-----------------------------
#10 918.2 ***  v1    2.3 debug|Linux,5.8.0-1033-azure,aarch64,-junix,-sdefault,-sdefault,-hcritbit
#10 918.2 ***  v1    2.3 debug|varnish-6.0.7 revision 525d371e3ea0e0c38edd7baf0f80dc226560f26e
#10 918.2 ***  v1    2.3 debug|
#10 918.2 ***  v1    2.3 debug|Type 'help' for command list.
#10 918.2 ***  v1    2.3 debug|Type 'quit' to close CLI session.
#10 918.2 ***  v1    2.3 debug|Type 'start' to launch worker process.
#10 918.2 ***  v1    2.3 debug|
#10 918.2 **** v1    2.4 CLIPOLL 1 0x1 0x0
#10 918.2 ***  v1    2.4 CLI connection fd = 7
#10 918.2 ***  v1    2.4 CLI RX  107
#10 918.2 **** v1    2.4 CLI RX|yrvvivrbcncftqbjlezcoqosbyxmtdip
#10 918.2 **** v1    2.4 CLI RX|
#10 918.2 **** v1    2.4 CLI RX|Authentication required.
#10 918.2 **** v1    2.4 CLI TX|auth 962d378cfa9b8d65a938015b8ba63c82297c86612aee9f3fb0aeba6064fb5a7a
#10 918.2 ***  v1    2.4 CLI RX  200
#10 918.2 **** v1    2.4 CLI RX|-----------------------------
#10 918.2 **** v1    2.4 CLI RX|Varnish Cache CLI 1.0
#10 918.2 **** v1    2.4 CLI RX|-----------------------------
#10 918.2 **** v1    2.4 CLI RX|Linux,5.8.0-1033-azure,aarch64,-junix,-sdefault,-sdefault,-hcritbit
#10 918.2 **** v1    2.4 CLI RX|varnish-6.0.7 revision 525d371e3ea0e0c38edd7baf0f80dc226560f26e
#10 918.2 **** v1    2.4 CLI RX|
#10 918.2 **** v1    2.4 CLI RX|Type 'help' for command list.
#10 918.2 **** v1    2.4 CLI RX|Type 'quit' to close CLI session.
#10 918.2 **** v1    2.4 CLI RX|Type 'start' to launch worker process.
#10 918.2 **** v1    2.4 CLI TX|vcl.inline vcl1 << %XJEIFLH|)Xspa8P
#10 918.2 **** v1    2.4 CLI TX|vcl 4.1;
#10 918.2 **** v1    2.4 CLI TX|backend s1 { .host = "127.0.0.1"; .port = "46763"; }
#10 918.2 **** v1    2.4 CLI TX|
#10 918.2 **** v1    2.4 CLI TX|
#10 918.2 **** v1    2.4 CLI TX|\timport geoip from "/tmp/libvmod-geoip-libvmod-geoip-1.0.3/src/.libs/libvmod_geoip.so";
#10 918.2 **** v1    2.4 CLI TX|
#10 918.2 **** v1    2.4 CLI TX|\tsub vcl_deliver {
#10 918.2 **** v1    2.4 CLI TX|\t\tset resp.http.X-Country-Code = geoip.country_code("127.0.0.1");
#10 918.2 **** v1    2.4 CLI TX|\t\tset resp.http.X-Country-Name = geoip.country_name("127.0.0.1");
#10 918.2 **** v1    2.4 CLI TX|
#10 918.2 **** v1    2.4 CLI TX|\t\tset resp.http.X-IP-Country-Code = geoip.country_code(client.ip);
#10 918.2 **** v1    2.4 CLI TX|\t\tset resp.http.X-IP-Country-Name = geoip.country_name(client.ip);
#10 918.2 **** v1    2.4 CLI TX|\t}
#10 918.2 **** v1    2.4 CLI TX|
#10 918.2 **** v1    2.4 CLI TX|%XJEIFLH|)Xspa8P
#10 918.2 ***  v1    2.5 vsl|No VSL chunk found (child not started ?)
#10 918.2 ***  v1    2.6 vsl|No VSL chunk found (child not started ?)
#10 918.2 ***  v1    2.7 vsl|No VSL chunk found (child not started ?)
#10 918.2 ***  v1    2.8 vsl|No VSL chunk found (child not started ?)
#10 918.2 ***  v1    2.9 vsl|No VSL chunk found (child not started ?)
#10 918.2 ***  v1    3.0 vsl|No VSL chunk found (child not started ?)
#10 918.2 ***  v1    3.1 vsl|No VSL chunk found (child not started ?)
#10 918.2 ***  v1    3.2 vsl|No VSL chunk found (child not started ?)
#10 918.2 ***  v1    3.3 vsl|No VSL chunk found (child not started ?)
#10 918.2 ***  v1    3.4 vsl|No VSL chunk found (child not started ?)
#10 918.2 ***  v1    3.5 CLI RX  106
#10 918.2 **** v1    3.5 CLI RX|Running VCC-compiler failed, exited with 127
#10 918.2 **** v1    3.5 CLI RX|VCL compilation failed
#10 918.2 ---- v1    3.5 FAIL VCL does not compile
#10 918.2 *    top   3.5 RESETTING after ../src/tests/test01.vtc
#10 918.2 **   s1    3.5 Waiting for server (4/-1)
#10 918.2 **   v1    3.5 Wait
#10 918.2 **** v1    3.5 CLI TX|panic.clear
#10 918.2 ***  v1    3.5 CLI RX  300
#10 918.2 **** v1    3.5 CLI RX|No panic to clear
#10 918.2 ***  v1    3.5 debug|Info: manager stopping child
#10 918.2 ***  v1    3.5 debug|Info: manager dies
#10 918.2 **** v1    3.5 STDOUT poll 0x10
#10 918.2 ***  v1    3.5 vsl|No VSL chunk found (child not started ?)
#10 918.2 **   v1    3.5 WAIT4 pid=32998 status=0x0000 (user 2.594071 sys 0.665509)
#10 918.2 *    top   3.5 TEST ../src/tests/test01.vtc FAILED
#10 918.3 #    top  TEST ../src/tests/test01.vtc FAILED (4.566) exit=2
#10 918.3 make[1]: *** [Makefile:691: ../src/tests/test01.vtc] Error 2
@gquintard
Copy link
Contributor

Hi,

That's upsetting, there's no detailed messaged about what went wrong...

Can you try just the compilation step please? Put this in a vcl:

vcl 4.1;
backend default none;
import geoip from "/replace/this/with/the/path/of/libvmod_geoip.so"

Then try

varnishd -C -f /path/to/your/vcl/file

hopefully we'll get something a bit more detailed

@csandanov
Copy link
Author

Running on AWS graviton:

Message from VCC-compiler:
Could not load VMOD geoip
	File name: /usr/lib/varnish/vmods/libvmod_geoip.so
	dlerror: Error relocating /usr/lib/varnish/vmods/libvmod_geoip.so: VAS_Fail: symbol not found
('/test.vcl' Line 3 Pos 8)
import geoip from "/usr/lib/varnish/vmods/libvmod_geoip.so";
-------#####------------------------------------------------

Running VCC-compiler failed, exited with 2
VCL compilation failed

@csandanov
Copy link
Author

I'm not sure whether Varnish itself fully support arm64 yet, because I also have make check failures for https://github.com/varnish/varnish-modules as well

@gquintard
Copy link
Contributor

Hi,

So, quick answer is that you probably did something wrong because "it works on my machine"™. To be sure, I've added circleci tests to both varnish-modules (https://app.circleci.com/pipelines/github/varnish/varnish-modules/336/workflows/30fa9573-aaa0-4b24-9d57-2264e685fe43/jobs/364) and this repository (https://app.circleci.com/pipelines/github/varnish/libvmod-geoip/4/workflows/b682e267-41b2-4280-afce-a4cbef532ff6/jobs/7) and as you can see, no issue.

Most probably, the varnish compilation is to blame here: VAS_Fail is an internal varnish symbol, so you possibly didn't open it to vmods or something. I'm not even sure that the varnish make check actually passes with an problem like this.

Note that this repository is actually deprecated, so I would recommend using the main varnish channels to get help in the future: https://varnish-cache.org/support/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants