I have tried using the JavaScript preprocessing action many times on s390x and it always ends with a failure stating "invalid bytecode". No matter how simple the script is, meaning nothing more than a simple one line that returns a string, it always fails. The strange part is that when you use the Test option on an item it always works in the UI and the output is correct. However, as soon as I attempt to use it at runtime it always fails.
My setup is a zabbix server (v5.4.5) running on x86. The error is happening on a zabix proxy (v5.4.5) running on s390x. The code is running as a docker container using sqlite3, https://hub.docker.com/r/zabbix/zabbix-proxy-sqlite3. I have used previous versions of 5.4 and upgraded last week to 5.4.5 in hopes that would help fix things. It did not.
It appears that the duktape JavaScript engine does not work at all on s390x, although it doesn't explain why it runs fine in test mode.
Another strange thing is that the error seems to fluctuate between 2 messages that I have attached here. No code change or anything, it just spits out different errors randomly for the same operation.


I am also attaching the output from the test of this same script in the UI where it works every time with no error.

I will also mention that when I look at the log of the proxy container I can see that it randomly crashes with no explanation quite frequently.
My setup is a zabbix server (v5.4.5) running on x86. The error is happening on a zabix proxy (v5.4.5) running on s390x. The code is running as a docker container using sqlite3, https://hub.docker.com/r/zabbix/zabbix-proxy-sqlite3. I have used previous versions of 5.4 and upgraded last week to 5.4.5 in hopes that would help fix things. It did not.
It appears that the duktape JavaScript engine does not work at all on s390x, although it doesn't explain why it runs fine in test mode.
Another strange thing is that the error seems to fluctuate between 2 messages that I have attached here. No code change or anything, it just spits out different errors randomly for the same operation.
I am also attaching the output from the test of this same script in the UI where it works every time with no error.
I will also mention that when I look at the log of the proxy container I can see that it randomly crashes with no explanation quite frequently.
Code:
145:20211004:150923.661 proxy #4 started [trapper #3] 171:20211004:150923.667 proxy #30 started [availability manager #1] 150:20211004:150923.754 proxy #9 started [preprocessing worker #2] 151:20211004:151008.882 Got signal [signal:11(SIGSEGV),reason:1,refaddr:0x2aaa7e52000]. Crashing ... 151:20211004:151008.882 ====== Fatal information: ====== 151:20211004:151008.882 program counter not available for this architecture 151:20211004:151008.882 === Registers: === 151:20211004:151008.882 register dump not available for this architecture 151:20211004:151008.882 === Backtrace: === 151:20211004:151008.883 23: /usr/sbin/zabbix_proxy: preprocessing worker #3 started(zbx_backtrace+0x58) [0x2aa33392c80] 151:20211004:151008.883 22: /usr/sbin/zabbix_proxy: preprocessing worker #3 started(zbx_log_fatal_info+0xd8) [0x2aa33392ef8] 151:20211004:151008.883 21: /usr/sbin/zabbix_proxy: preprocessing worker #3 started(+0x213ad0) [0x2aa33393ad0] 151:20211004:151008.883 20: [0x3ffdfc7bc10] 151:20211004:151008.883 19: /usr/sbin/zabbix_proxy: preprocessing worker #3 started(+0xe8622) [0x2aa33268622] 151:20211004:151008.883 18: /usr/sbin/zabbix_proxy: preprocessing worker #3 started(+0xece08) [0x2aa3326ce08] 151:20211004:151008.883 17: /usr/sbin/zabbix_proxy: preprocessing worker #3 started(+0xed072) [0x2aa3326d072] 151:20211004:151008.883 16: /usr/sbin/zabbix_proxy: preprocessing worker #3 started(duk_push_lstring+0xf2) [0x2aa33244022] 151:20211004:151008.883 15: /usr/sbin/zabbix_proxy: preprocessing worker #3 started(+0xb0e82) [0x2aa33230e82] 151:20211004:151008.883 14: /usr/sbin/zabbix_proxy: preprocessing worker #3 started(+0xb32c0) [0x2aa332332c0] 151:20211004:151008.883 13: /usr/sbin/zabbix_proxy: preprocessing worker #3 started(duk_load_function+0xaa) [0x2aa3323391a] 151:20211004:151008.883 12: /usr/sbin/zabbix_proxy: preprocessing worker #3 started(zbx_es_execute+0x224) [0x2aa33229b84] ....
Comment