Fw4 won't start after upgrade to 2022-04-21-fc83d462-1

I have Linksys WRT1900AC v1. It was running OpenWRT 21.02.1 until recently. Last weekend I upgraded it to 22.03.0-rc1. It kept running well.

Yesterday I decided to update some packages. I know it's generally not recommended, but I was curious.

Here's the list of the packages I updated.

iwinfo - 2022-03-01-90bfbb9a-1 - 2022-04-24-a479b9b0-1
luci-app-statistics - git-22.002.35118-8572ae0 - git-22.115.68420-46794ea
libiwinfo-lua - 2022-03-01-90bfbb9a-1 - 2022-04-24-a479b9b0-1
ucode-mod-ubus - 2022-02-11-a29bad94-1 - 2022-04-13-e14b0993-1
ucode-mod-uci - 2022-02-11-a29bad94-1 - 2022-04-13-e14b0993-1
firewall4 - 2022-02-12-53caa1a7-1 - 2022-04-21-fc83d462-1
ucode-mod-fs - 2022-02-11-a29bad94-1 - 2022-04-13-e14b0993-1
libiwinfo-data - 2022-03-01-90bfbb9a-1 - 2022-04-24-a479b9b0-1
ucode - 2022-02-11-a29bad94-1 - 2022-04-13-e14b0993-1
libiwinfo20210430 - 2022-03-01-90bfbb9a-1 - 2022-04-24-a479b9b0-1

After that update, firewall4 refuses to start anymore. Originally, it showed the following error.

root@pronichkin-router:~# fw4 start
Error loading shared library libucode.so.20220322: No such file or directory (needed by /usr/bin/utpl)
Error relocating /usr/bin/utpl: uc_vm_init: symbol not found
Error relocating /usr/bin/utpl: uc_vm_invoke: symbol not found
Error relocating /usr/bin/utpl: ucv_from_json: symbol not found
Error relocating /usr/bin/utpl: ucv_object_delete: symbol not found
Error relocating /usr/bin/utpl: uc_vm_trace_set: symbol not found
Error relocating /usr/bin/utpl: uc_vm_scope_get: symbol not found
Error relocating /usr/bin/utpl: uc_source_new_buffer: symbol not found
Error relocating /usr/bin/utpl: ucv_object_add: symbol not found
Error relocating /usr/bin/utpl: ucv_string_new: symbol not found
Error relocating /usr/bin/utpl: ucv_get: symbol not found
Error relocating /usr/bin/utpl: ucv_object_get: symbol not found
Error relocating /usr/bin/utpl: uc_vm_free: symbol not found
Error relocating /usr/bin/utpl: ucv_int64_get: symbol not found
Error relocating /usr/bin/utpl: uc_compile: symbol not found
Error relocating /usr/bin/utpl: ucv_put: symbol not found
Error relocating /usr/bin/utpl: ucv_array_push: symbol not found
Error relocating /usr/bin/utpl: uc_program_write: symbol not found
Error relocating /usr/bin/utpl: uc_source_new_file: symbol not found
Error relocating /usr/bin/utpl: ucv_array_new: symbol not found
Error relocating /usr/bin/utpl: uc_stdlib_load: symbol not found
Error relocating /usr/bin/utpl: uc_vm_execute: symbol not found
root@pronichkin-router:~#

My system has /usr/lib/libucode.so.20220206 but not /usr/lib/libucode.so.20220322. So, just for testing, I decided to copy the former into the later. Unfortunately, it did not solve the problem, but now fw4 gives an entirely different error error. (Which might mean I'm onto something.)

root@pronichkin-router:~# cp /usr/lib/libucode.so.20220206 /usr/lib/libucode.so.20220322
root@pronichkin-router:~# fw4 start
/proc/self/fd/0:1:8-8: Error: syntax error, unexpected '='

/proc/self/fd/0:2:9-9: Error: syntax error, unexpected '='

/proc/self/fd/0:3:10-10: Error: syntax error, unexpected '='

/proc/self/fd/0:5:15-15: Error: syntax error, unexpected '='

/proc/self/fd/0:7:18-18: Error: syntax error, unexpected '='

/proc/self/fd/0:8:18-18: Error: syntax error, unexpected '='

/proc/self/fd/0:9:18-18: Error: syntax error, unexpected '='

/proc/self/fd/0:10:18-18: Error: syntax error, unexpected '='

/proc/self/fd/0:11:18-18: Error: syntax error, unexpected '='

/proc/self/fd/0:12:18-18: Error: syntax error, unexpected '='

root@pronichkin-router:~#

so far, I'm out of ideas. Any suggestions, besides reflashing my router to the original 22.03.0-rc1 firmware and never updating packages again?

Why flash again, when you can just reset the settings & add-on packages?
Either "firstboot" from SSH console or Reset from LuCI.
That removes the packages installed by you, and clears the settings.

Make a backup of your settings, reset, install the needed add-ons again, restore backup.

3 Likes

I did this yesterday as well, and once I saw no nft rules in place, I immediately halted the router and rebuilt a current image with Imagebuilder. If I had known the firstboot command, I would have done that instead.

Some info in wiki...

1 Like

Good to know, but I took drastic measures once I realized my shields were down, and had no IPv4 NAT anyway. And since I use a RPi4, it was easy enough to reflash the card with my original image, get back online, and refresh my Imagebuilder with the latest packages.

I suppose I understand now why there is controversy around updating packages.

The firstboot/reset requires ROM+overlay approach, which OpenWrt uses for normal routers with flash (like wrt1900ac of OP), but it may not apply to memory card based systems like yours.

2 Likes

Interesting user comment on GH about this ucode update:

Running opkg upgrade ... won't install the newer libucode20220322 package. I had to manually install the lib package and force-reinstall those upgradable packages. Was I missing some flags when running opkg upgrade , or are there something wrong in the ucode/Makefile ?

Yup. Saw the comment to GitHub issue I opened. Installing libucode20220322 seemed to solve everything. (I did not even have to force-reinstall other packages, as you're saying.)

I will still consider resetting, given that my router has been in this state for entire night. But at least we have a solution for now. Thanks everyone!

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

Actually ucode is supposed to depend on libucode20220322 (and not the virtual libucode) so that the required update is automatically installed along, but there appear to be some metadata issues with the buildbot generated repositories...

UPDATE:

Fixed with

Once the packages are updated in the repo, an opkg upgrade firewall4 should pull an upgraded ucode which in turn will pull the required upgraded libucode20220322 along.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.