I also see this trouble when attempting to upgrade from 23.10.2 Cobia to 24.04.1.1 Dragonfish.
From System Settings → Update
I selected the Dragonfish train then Download then apply pending updates.
I attempted this update twice, the second time the download was already present.
It takes a while to recover after each failure, The system stops responding to the http interface but never reboots. I’m fairly certain that reboot did not happen because my encrypted pools remain unlocked after recovery. A while later the system begins responding to the browser, but I had to reload the URL and log in again. (using Firefox from Windows 11)
After both failures, then looking at System Settings → boot
The Dragonfish update is not listed and the latest Cobia release is shown as active.
At the conclusion of each attempt the following error is presented on screen:
Error: Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/middlewared/job.py”, line 427, in run
await self.future
File “/usr/lib/python3/dist-packages/middlewared/job.py”, line 465, in __run_body
rv = await self.method(*([self] + args))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/schema/processor.py”, line 177, in nf
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/plugins/update.py”, line 286, in update
await self.middleware.call(‘update.install’, job, os.path.join(location, ‘update.sqsh’), options)
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1399, in call
return await self.call(
^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1353, in call
return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1251, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/update/install_linux.py", line 32, in install
self.middleware.call_sync(“update.install_scale”, mounted, progress_callback, options)
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1432, in call_sync
return methodobj(*prepared_call.args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/update/install.py", line 52, in install_scale
self.execute_truenas_install(mounted, command, progress_callback)
File "/usr/lib/python3/dist-packages/middlewared/plugins/update/install.py", line 83, in _execute_truenas_install
raise CallError(result or f"Abnormal installer process termination with code {p.returncode}“)
middlewared.service_exception.CallError: [EFAULT] Traceback (most recent call last):
File “”, line 198, in _run_module_as_main
File “”, line 88, in run_code
File “/tmp/tmpycckg8ax/truenas_install/main.py”, line 794, in
main()
File “/tmp/tmpycckg8ax/truenas_install/main.py”, line 589, in main
enable_system_user_services(root, old_root)
File “/tmp/tmpycckg8ax/truenas_install/main.py”, line 126, in enable_system_user_services
configure_serial_port(root, database_path(old_root))
File “/tmp/tmpycckg8ax/truenas_install/main.py”, line 114, in configure_serial_port
advanced = query_config_table(“system_advanced”, db_path, prefix="adv”)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/tmp/tmpycckg8ax/truenas_install/main.py”, line 106, in query_config_table
return query_row(f"SELECT * FROM {table}", database_path, prefix)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/tmp/tmpycckg8ax/truenas_install/main.py”, line 94, in query_row
c.execute(query)
sqlite3.OperationalError: database is locked
This error in /var/log/messages after recovery:
I found this thread describing the same upgrade failure:
truenas-scale-updating-from-cobia-to-dragonfish
The recommended approach in that thread is to capture the TrueNAS configuration then proceed to a clean install of Dragonfish followed by a restore of the configuration.
It could be a procedural issue but this problem feels like it should be reported as a bug.