HomeAssistant migrate from pyenv to uv locking pi 3b+

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

Pi is headless. Have to ssh into it.

  • DietPi version | G_DIETPI_VERSION_CORE=10
    G_DIETPI_VERSION_SUB=3
    G_DIETPI_VERSION_RC=3
    G_GITBRANCH='master'
    G_GITOWNER='MichaIng'
    G_LIVE_PATCH_STATUS[0]='applied'
    G_LIVE_PATCH_STATUS[1]='applied'
    G_LIVE_PATCH_STATUS[2]='applied'
  • Distro version | bookworm 0
  • Kernel version | Linux DoBox 6.12.75+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.75-1+rpt1~bookworm (2026-03-11) aarch64 GNU/Linux
  • Architecture | arm64
  • SBC model | RPi 3 Model B+ (aarch64)
  • Power supply used | POE
  • SD card used | SSD via USB

Additional Information (if applicable)

  • Software title | HomeAssistant
  • Updating
  • I don’t think a fresh install would install penv first
    ← If you sent a “dietpi-bugreport”, please paste the ID here →
  • Bug report ID | echo $G_HW_UUID
\[ INFO \] DietPi-BugReport | Generating informative command outputs, please wait...
\[  OK  \] DietPi-BugReport | Packing upload archive
\[FAILED\] DietPi-BugReport | The bug report upload archive appears to be unexpected large. Please inspect and in case clean up the locations to be uploaded, as their size should never be that large:
CMD_OUT.txt
G_EXEC_ERROR_REPORT
/var/log
/boot/firmware/config.txt
/boot/firmware/cmdline.txt
/boot/boot.ini
/boot/boot.scr
/boot/dietpiEnv.txt
/boot/armbianEnv.txt
/boot/dietpi.txt
/boot/dietpi
/var/lib/dietpi
/var/tmp/dietpi
/run/dietpi
/etc/bash.bashrc
/etc/bashrc.d
/root/.bashrc
/etc/profile
/etc/profile.d
/root/.profile
/etc/X11/xorg.conf
/etc/X11/xorg.conf.d
/etc/asound.conf
/etc/network/interfaces
/etc/network/interfaces.d
/etc/wpa_supplicant/wpa_supplicant.conf
/etc/fstab
/etc/sysctl.conf
/etc/sysctl.d
/etc/systemd/system
/etc/apt/sources.list
/etc/apt/sources.list.d
/etc/apt/preferences
/etc/apt/preferences.d
/etc/apt/apt.conf.d
/etc/apt/keyrings

Steps to reproduce

dietpi-software reinstall 157

Expected behaviour

  • Update should migrate

Actual behaviour

Device becomes unresponsive

Extra details

Pls share the entire log from running the reinstall. You should be able to copy everything from ssh terminal directly

The log was failing.

I am reading on how to clean it up. I will report back when I get it.

Simply run dietpi-software reinstall 157 and copy the entire output from the ssh session

This is where I am no longer able to use the device.

I can not open another ssh at this point but I have another ssh opened with htop running and that seems to be showing as active. The uptime timer is counting up like normal. (Picture attached).

root@DoBox:\~# dietpi-software reinstall 157
\[  OK  \] DietPi-Software | Initialised database
\[  OK  \] DietPi-Software | Reading database

DietPi-Software
─────────────────────────────────────────────────────
Mode: Automated reinstall

\[  OK  \] DietPi-Software | Reinstalling Home Assistant: Open source home automation platform
\[  OK  \] DietPi-Software | DietPi-Userdata validation: /mnt/dietpi_userdata

DietPi-Software
─────────────────────────────────────────────────────
Step: Checking for conflicts and missing inputs

DietPi-Software
─────────────────────────────────────────────────────
Step: Checking for prerequisite software

\[ INFO \] DietPi-Software | uv will be installed
\[  OK  \] DietPi-Software | mkdir -p /mnt/dietpi_userdata/Music /mnt/dietpi_userdata/Pictures /mnt/dietpi_userdata/Video /mnt/dietpi_userdata/downloads /var/www /opt /usr/local/bin
\[  OK  \] DietPi-Software | chown dietpi:dietpi /mnt/dietpi_userdata/Music /mnt/dietpi_userdata/Pictures /mnt/dietpi_userdata/Video /mnt/dietpi_userdata/downloads
\[  OK  \] DietPi-Software | chmod 0775 /mnt/dietpi_userdata/Music /mnt/dietpi_userdata/Pictures /mnt/dietpi_userdata/Video /mnt/dietpi_userdata/downloads
\[ SUB1 \] DietPi-Services > stop
\[  OK  \] DietPi-Services | stop : cron
\[  OK  \] DietPi-Services | stop : webmin
\[  OK  \] DietPi-Services | stop : home-assistant
\[  OK  \] DietPi-Services | stop : filebrowser
\[  OK  \] DietPi-Services | stop : lazylibrarian
\[  OK  \] DietPi-Services | stop : kavita
\[  OK  \] DietPi-Services | stop : nginx
\[  OK  \] DietPi-Services | stop : php8.2-fpm
\[  OK  \] DietPi-Services | stop : mariadb
\[  OK  \] DietPi-Services | stop : redis-server
\[  OK  \] DietPi-Services | stop : proftpd
\[ INFO \] DietPi-Software | Skipping APT update, as last call was less than an hour ago and neither sources lists nor architectures changed since.

DietPi-Software
─────────────────────────────────────────────────────
Step: Installing uv: Extremely fast Python package and project manager

\[  OK  \] DietPi-Software | cd /tmp/DietPi-Software
\[  OK  \] DietPi-Software | curl -sSfL https://github.com/astral-sh/uv/releases/download/0.11.7/uv-aarch64-unknown-linux-gnu.tar.gz -o uv-aarch64-unknown-linux-gnu.tar.gz
\[  OK  \] DietPi-Software | tar xf uv-aarch64-unknown-linux-gnu.tar.gz
\[  OK  \] DietPi-Software | rm uv-aarch64-unknown-linux-gnu.tar.gz
\[  OK  \] DietPi-Software | mv uv-aarch64-unknown-linux-gnu/uv /usr/local/bin/uv
\[  OK  \] DietPi-Software | rm -R uv-aarch64-unknown-linux-gnu

DietPi-Software
─────────────────────────────────────────────────────
Step: Installing Home Assistant: Open source home automation platform

\[ INFO \] DietPi-Software | Home Assistant user: homeassistant
\[ INFO \] DietPi-Software | Home Assistant home: /opt/homeassistant
\[ INFO \] DietPi-Software | HA Python version:   3.14
\[  OK  \] DietPi-Software | usermod -aG dialout,gpio,i2c -d /opt/homeassistant -s /usr/sbin/nologin homeassistant
\[  OK  \] DietPi-Software | mkdir -p /opt/homeassistant
\[  OK  \] DietPi-Software | chown homeassistant:homeassistant /opt/homeassistant
\[  OK  \] DietPi-Software | cd /opt/homeassistant
\[ INFO \] DietPi-Software | APT install libc6-dev gcc g++, please wait…
Reading package lists…
Building dependency tree…
Reading state information…
libc6-dev is already the newest version (2.36-9+rpt2+deb12u13).
gcc is already the newest version (4:12.2.0-3).
g++ is already the newest version (4:12.2.0-3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
\[  OK  \] DietPi-Software | APT install libc6-dev gcc g++
\[  OK  \] DietPi-Software | mkdir -p /opt/homeassistant/.config/uv
\[  OK  \] DietPi-Software | eval echo ‘no-cache = true’ > ‘/opt/homeassistant/.config/uv/uv.toml’
\[ INFO \] DietPi-Software | Installing Python, please wait…
Python 3.14 is already on the latest supported patch release
\[  OK  \] DietPi-Software | Installing Python
\[ INFO \] DietPi-Software | Setting up venv, please wait…
Using CPython 3.14.4
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate
\[  OK  \] DietPi-Software | Setting up venv
\[ INFO \] DietPi-Software | Installing additional dependencies: isal, please wait…
Resolved 1 package in 685ms
Checked 1 package in 0.27ms
\[  OK  \] DietPi-Software | Installing additional dependencies: isal
\[ INFO \] DietPi-Software | Installing Home Assistant core module, please wait…
Resolved 101 packages in 10.40s
Downloading grpcio (6.3MiB)
Downloading homeassistant (51.0MiB)
Downloading uv (22.5MiB)
Downloading botocore (14.3MiB)
Downloading zeroconf (2.0MiB)
Downloading sqlalchemy (1.8MiB)
Downloading cryptography (4.1MiB)
Downloading pillow (6.1MiB)
Downloading aiohttp (1.6MiB)
Building pyric==0.1.6.3
Building lru-dict==1.3.0
Building fnv-hash-fast==2.0.0
Built pyric==0.1.6.3
Downloaded aiohttp
Downloaded sqlalchemy
Downloaded zeroconf
Downloaded cryptography
Downloaded pillow
Downloaded grpcio
Downloaded botocore
Downloaded uv
Built fnv-hash-fast==2.0.0
Built lru-dict==1.3.0

Some time later and I still can not open a new SSH and the htop from before seems to still be running.

I exited the htop and it froze when it went back to the terminal.

I created a bug report.

Reference code: c6c739fb-932c-41b3-9167-0595233274b4

Running via a monit6and keyboard I am able to progress deeper into the update script.

I got an error about not being able to link and getting reduced performance.

Script ran complete this way.

What do you mean by this

It mentioned hardlinks.

I was not able to get a picture in time. I assume the error is part of the update script.

warning: Failed to hardlink files; falling back to full copy. This may lead to degraded performance.
         If the cache and target directories are on different filesystems, hardlinking may not be supported.
         If this is intentional, set \`export UV_LINK_MODE=copy\` or use \`--link-mode=copy\` to suppress this warning.
Installed 1 package in 16ms

This is a warning and not an error message. Usually the entire log would be needed to see the context.

Is there a way to not have it use python 3.14? Is it needed? The device may be locking up building and not using prebuilt.

The warning can be ignored. The filesystem has perfect hardlink support, I don’t know why uv is showing this, but doesn’t matter much anyway: DietPi-Software | Home Assistant: Investigate why uv does not use hardlinks · Issue #8098 · MichaIng/DietPi · GitHub

No, Python 3.14 is strictly needed: core/pyproject.toml at f1bbe4204b74367b5c4186b0a3253d3442608a37 · home-assistant/core · GitHub

Some module builds can be heavy. Not uncommon that SSH freezes or glitches temporarily. And the builds can take a while to finish. Did it ever really crash, or were you probably just a bit impatient?

I did wait about 2 hours. I have 2 images in a post above showing the uptime with no activity from the updater script. I could have waited longer but that pi is also the DHCP server/ad blocker and the rest of the household was looking at me.

Okay then it really crashed. To find out why, kernel logs could be monitored on a dedicated SSH session:

dmesg -w

Or complete system logs, which include kernel messages, but may miss the latest in case of a sudden crash. AFAIK dmesg is faster:

journalctl -f

But a HDMI screen is best, as it does not rely on the SSH connection + transfer and shows kernel errors automatically.

Apart of that, things to keep an eye at are CPU temperature and RAM usage.

967.645104\] INFO: task kworker/u17:0:38 blocked for more than 120 seconds.
\[  967.645135\]       Not tainted 6.12.75+rpt-rpi-v8 #1 Debian 1:6.12.75-1+rpt1\~bookworm
\[  967.645141\] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
\[  967.645146\] task:kworker/u17:0   state:D stack:0     pid:38    tgid:38    ppid:2      flags:0x00000008
\[  967.645162\] Workqueue: writeback wb_workfn (flush-8:0)
\[  967.645183\] Call trace:
\[  967.645188\]  \__switch_to+0xf0/0x150
\[  967.645200\]  \__schedule+0x394/0xb60
\[  967.645208\]  schedule+0x3c/0x148
\[  967.645216\]  io_schedule+0x44/0x68
\[  967.645223\]  blk_mq_get_tag+0x180/0x330
\[  967.645232\]  \__blk_mq_alloc_requests+0x1c8/0x4c8
\[  967.645243\]  blk_mq_submit_bio+0x41c/0x6e8
\[  967.645252\]  \__submit_bio+0x8c/0x238
\[  967.645262\]  submit_bio_noacct_nocheck+0x2b4/0x380
\[  967.645271\]  submit_bio_noacct+0x114/0x4d0
\[  967.645280\]  submit_bio+0xb0/0x220
\[  967.645289\]  submit_bh_wbc+0x140/0x1c8
\[  967.645297\]  \__block_write_full_folio+0x224/0x5c0
\[  967.645306\]  block_write_full_folio+0xd0/0x158
\[  967.645315\]  write_cache_pages+0x78/0xf8
\[  967.645327\]  blkdev_writepages+0x68/0xb0
\[  967.645333\]  do_writepages+0x94/0x2d8
\[  967.645339\]  \__writeback_single_inode+0x4c/0x4a0
\[  967.645348\]  writeback_sb_inodes+0x234/0x480
\[  967.645355\]  \__writeback_inodes_wb+0x58/0x120
\[  967.645363\]  wb_writeback+0x2f8/0x3c0
\[  967.645370\]  wb_workfn+0x254/0x508
\[  967.645377\]  process_one_work+0x158/0x3d0
\[  967.645393\]  worker_thread+0x190/0x318
\[  967.645401\]  kthread+0x11c/0x128
\[  967.645408\]  ret_from_fork+0x10/0x20
\[  967.645419\] INFO: task kworker/u18:0:39 blocked for more than 120 seconds.
\[  967.645425\]       Not tainted 6.12.75+rpt-rpi-v8 #1 Debian 1:6.12.75-1+rpt1\~bookworm
\[  967.645429\] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
\[  967.645433\] task:kworker/u18:0   state:D stack:0     pid:39    tgid:39    ppid:2      flags:0x00000008
\[  967.645443\] Workqueue: writeback wb_workfn (flush-8:0)
\[  967.645456\] Call trace:
\[  967.645459\]  \__switch_to+0xf0/0x150
\[  967.645467\]  \__schedule+0x394/0xb60
\[  967.645475\]  schedule+0x3c/0x148
\[  967.645483\]  io_schedule+0x44/0x68
\[  967.645490\]  blk_mq_get_tag+0x180/0x330
\[  967.645497\]  \__blk_mq_alloc_requests+0x1c8/0x4c8
\[  967.645506\]  blk_mq_submit_bio+0x41c/0x6e8
\[  967.645515\]  \__submit_bio+0x8c/0x238
\[  967.645523\]  submit_bio_noacct_nocheck+0x2b4/0x380
\[  967.645532\]  submit_bio_noacct+0x114/0x4d0
\[  967.645541\]  submit_bio+0xb0/0x220
\[  967.645550\]  ext4_io_submit+0x38/0x68
\[  967.645558\]  ext4_do_writepages+0x330/0xbc0
\[  967.645566\]  ext4_writepages+0x80/0x108
\[  967.645573\]  do_writepages+0x94/0x2d8
\[  967.645579\]  \__writeback_single_inode+0x4c/0x4a0
\[  967.645587\]  writeback_sb_inodes+0x234/0x480
\[  967.645595\]  \__writeback_inodes_wb+0x58/0x120
\[  967.645603\]  wb_writeback+0x2f8/0x3c0
\[  967.645610\]  wb_workfn+0x254/0x508
\[  967.645618\]  process_one_work+0x158/0x3d0
\[  967.645626\]  worker_thread+0x190/0x318
\[  967.645633\]  kthread+0x11c/0x128
\[  967.645640\]  ret_from_fork+0x10/0x20
\[  967.645649\] INFO: task kworker/u20:0:41 blocked for more than 120 seconds.
\[  967.645654\]       Not tainted 6.12.75+rpt-rpi-v8 #1 Debian 1:6.12.75-1+rpt1\~bookworm
\[  967.645659\] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
\[  967.645662\] task:kworker/u20:0   state:D stack:0     pid:41    tgid:41    ppid:2      flags:0x00000008
\[  967.645673\] Workqueue: writeback wb_workfn (flush-8:0)
\[  967.645685\] Call trace:
\[  967.645688\]  \__switch_to+0xf0/0x150
\[  967.645697\]  \__schedule+0x394/0xb60
\[  967.645704\]  schedule+0x3c/0x148
\[  967.645712\]  io_schedule+0x44/0x68
\[  967.645719\]  blk_mq_get_tag+0x180/0x330
\[  967.645726\]  \__blk_mq_alloc_requests+0x1c8/0x4c8
\[  967.645735\]  blk_mq_submit_bio+0x41c/0x6e8
\[  967.645744\]  \__submit_bio+0x8c/0x238
\[  967.645752\]  submit_bio_noacct_nocheck+0x2b4/0x380
\[  967.645761\]  submit_bio_noacct+0x114/0x4d0
\[  967.645770\]  submit_bio+0xb0/0x220
\[  967.645779\]  ext4_io_submit+0x38/0x68
\[  967.645785\]  ext4_do_writepages+0x330/0xbc0
\[  967.645793\]  ext4_writepages+0x80/0x108
\[  967.645800\]  do_writepages+0x94/0x2d8
\[  967.645806\]  \__writeback_single_inode+0x4c/0x4a0
\[  967.645814\]  writeback_sb_inodes+0x234/0x480
\[  967.645821\]  \__writeback_inodes_wb+0x58/0x120
\[  967.645829\]  wb_writeback+0x2f8/0x3c0
\[  967.645836\]  wb_workfn+0x420/0x508
\[  967.645844\]  process_one_work+0x158/0x3d0
\[  967.645852\]  worker_thread+0x190/0x318
\[  967.645860\]  kthread+0x11c/0x128
\[  967.645866\]  ret_from_fork+0x10/0x20
\[  967.645890\] INFO: task kswapd0:62 blocked for more than 120 seconds.
\[  967.645895\]       Not tainted 6.12.75+rpt-rpi-v8 #1 Debian 1:6.12.75-1+rpt1\~bookworm
\[  967.645900\] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
\[  967.645903\] task:kswapd0         state:D stack:0     pid:62    tgid:62    ppid:2      flags:0x00000008
\[  967.645913\] Call trace:
\[  967.645917\]  \__switch_to+0xf0/0x150
\[  967.645925\]  \__schedule+0x394/0xb60
\[  967.645933\]  schedule+0x3c/0x148
\[  967.645940\]  io_schedule+0x44/0x68
\[  967.645948\]  blk_mq_get_tag+0x180/0x330
\[  967.645954\]  \__blk_mq_alloc_requests+0x1c8/0x4c8
\[  967.645963\]  blk_mq_submit_bio+0x41c/0x6e8
\[  967.645972\]  \__submit_bio+0x8c/0x238
\[  967.645981\]  submit_bio_noacct_nocheck+0x2b4/0x380
\[  967.645990\]  submit_bio_noacct+0x114/0x4d0
\[  967.645999\]  submit_bio+0xb0/0x220
\[  967.646008\]  \__swap_writepage+0x138/0x3c8
\[  967.646016\]  swap_writepage+0x294/0x3d0
\[  967.646023\]  pageout+0x15c/0x3e0
\[  967.646033\]  shrink_folio_list+0x93c/0xd10
\[  967.646042\]  evict_folios+0x22c/0x668
\[  967.646051\]  try_to_shrink_lruvec+0x19c/0x288
\[  967.646060\]  shrink_one+0x80/0x230
\[  967.646069\]  shrink_node+0xad0/0xe10
\[  967.646075\]  balance_pgdat+0x348/0x8d8
\[  967.646081\]  kswapd+0x244/0x508
\[  967.646087\]  kthread+0x11c/0x128
\[  967.646094\]  ret_from_fork+0x10/0x20
\[  967.646123\] INFO: task jbd2/sda2-8:102 blocked for more than 120 seconds.
\[  967.646129\]       Not tainted 6.12.75+rpt-rpi-v8 #1 Debian 1:6.12.75-1+rpt1\~bookworm
\[  967.646134\] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
\[  967.646137\] task:jbd2/sda2-8     state:D stack:0     pid:102   tgid:102   ppid:2      flags:0x00000008
\[  967.646147\] Call trace:
\[  967.646150\]  \__switch_to+0xf0/0x150
\[  967.646159\]  \__schedule+0x394/0xb60
\[  967.646166\]  schedule+0x3c/0x148
\[  967.646174\]  jbd2_journal_wait_updates+0x70/0xf0
\[  967.646183\]  jbd2_journal_commit_transaction+0x1c0/0x1a08
\[  967.646192\]  kjournald2+0xc4/0x250
\[  967.646199\]  kthread+0x11c/0x128
\[  967.646206\]  ret_from_fork+0x10/0x20
\[  967.646235\] INFO: task pihole-FTL:531 blocked for more than 120 seconds.
\[  967.646240\]       Not tainted 6.12.75+rpt-rpi-v8 #1 Debian 1:6.12.75-1+rpt1\~bookworm
\[  967.646245\] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
\[  967.646248\] task:pihole-FTL      state:D stack:0     pid:531   tgid:531   ppid:1      flags:0x00000000
\[  967.646258\] Call trace:
\[  967.646261\]  \__switch_to+0xf0/0x150
\[  967.646269\]  \__schedule+0x394/0xb60
\[  967.646277\]  schedule+0x3c/0x148
\[  967.646284\]  wait_transaction_locked+0x84/0xe0
\[  967.646292\]  add_transaction_credits+0x1e0/0x380
\[  967.646300\]  start_this_handle+0x104/0x4e0
\[  967.646307\]  jbd2__journal_start+0x118/0x248
\[  967.646315\]  \__ext4_journal_start_sb+0xf0/0x1c0
\[  967.646324\]  ext4_dirty_inode+0x40/0x98
\[  967.646331\]  \__mark_inode_dirty+0x5c/0x410
\[  967.646339\]  generic_update_time+0x58/0x78
\[  967.646347\]  file_modified+0xd4/0xe0
\[  967.646353\]  ext4_buffered_write_iter+0x60/0x138
\[  967.646363\]  ext4_file_write_iter+0x5c/0x740
\[  967.646371\]  vfs_write+0x248/0x380
\[  967.646383\]  ksys_write+0x7c/0x120
\[  967.646392\]  \__arm64_sys_write+0x24/0x38
\[  967.646401\]  invoke_syscall+0x50/0x120
\[  967.646411\]  el0_svc_common.constprop.0+0x48/0xf0
\[  967.646420\]  do_el0_svc+0x24/0x38
\[  967.646428\]  el0_svc+0x30/0x100
\[  967.646435\]  el0t_64_sync_handler+0x100/0x130
\[  967.646442\]  el0t_64_sync+0x190/0x198
\[  967.646460\] INFO: task kworker/u19:0:3303 blocked for more than 120 seconds.
\[  967.646466\]       Not tainted 6.12.75+rpt-rpi-v8 #1 Debian 1:6.12.75-1+rpt1\~bookworm
\[  967.646470\] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
\[  967.646474\] task:kworker/u19:0   state:D stack:0     pid:3303  tgid:3303  ppid:2      flags:0x00000008
\[  967.646485\] Workqueue: writeback wb_workfn (flush-8:0)
\[  967.646497\] Call trace:
\[  967.646500\]  \__switch_to+0xf0/0x150
\[  967.646509\]  \__schedule+0x394/0xb60
\[  967.646516\]  schedule+0x3c/0x148
\[  967.646524\]  io_schedule+0x44/0x68
\[  967.646531\]  blk_mq_get_tag+0x180/0x330
\[  967.646538\]  \__blk_mq_alloc_requests+0x1c8/0x4c8
\[  967.646547\]  blk_mq_submit_bio+0x41c/0x6e8
\[  967.646556\]  \__submit_bio+0x8c/0x238
\[  967.646565\]  submit_bio_noacct_nocheck+0x2b4/0x380
\[  967.646574\]  submit_bio_noacct+0x114/0x4d0
\[  967.646583\]  submit_bio+0xb0/0x220
\[  967.646591\]  \__swap_writepage+0x138/0x3c8
\[  967.646599\]  swap_writepage+0x294/0x3d0
\[  967.646606\]  pageout+0x15c/0x3e0
\[  967.646614\]  shrink_folio_list+0x93c/0xd10
\[  967.646623\]  evict_folios+0x22c/0x668
\[  967.646632\]  try_to_shrink_lruvec+0x19c/0x288
\[  967.646641\]  shrink_one+0x80/0x230
\[  967.646649\]  shrink_node+0xad0/0xe10
\[  967.646656\]  do_try_to_free_pages+0xdc/0x5a0
\[  967.646662\]  try_to_free_pages+0x120/0x268
\[  967.646668\]  \__alloc_pages_noprof+0x500/0xdf8
\[  967.646677\]  alloc_pages_mpol_noprof+0x60/0x158
\[  967.646684\]  alloc_pages_noprof+0x58/0x98
\[  967.646690\]  folio_alloc_noprof+0x1c/0x38
\[  967.646696\]  filemap_alloc_folio_noprof+0x13c/0x158
\[  967.646704\]  \__filemap_get_folio+0x140/0x310
\[  967.646712\]  ext4_mb_load_buddy_gfp+0x220/0x458
\[  967.646720\]  ext4_mb_regular_allocator+0x244/0xc50
\[  967.646729\]  ext4_mb_new_blocks+0x6fc/0xf88
\[  967.646737\]  ext4_ext_map_blocks+0x79c/0x1700
\[  967.646745\]  ext4_map_blocks+0x24c/0x4b8
\[  967.646752\]  ext4_do_writepages+0x614/0xbc0
\[  967.646759\]  ext4_writepages+0x80/0x108
\[  967.646766\]  do_writepages+0x94/0x2d8
\[  967.646773\]  \__writeback_single_inode+0x4c/0x4a0
\[  967.646781\]  writeback_sb_inodes+0x234/0x480
\[  967.646788\]  \__writeback_inodes_wb+0x58/0x120
\[  967.646796\]  wb_writeback+0x2f8/0x3c0
\[  967.646803\]  wb_workfn+0x420/0x508
\[  967.646810\]  process_one_work+0x158/0x3d0
\[  967.646818\]  worker_thread+0x190/0x318
\[  967.646826\]  kthread+0x11c/0x128
\[  967.646833\]  ret_from_fork+0x10/0x20
\[  967.646857\] INFO: task grep:5671 blocked for more than 120 seconds.
\[  967.646862\]       Not tainted 6.12.75+rpt-rpi-v8 #1 Debian 1:6.12.75-1+rpt1\~bookworm
\[  967.646867\] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
\[  967.646870\] task:grep            state:D stack:0     pid:5671  tgid:5671  ppid:540    flags:0x0000000c
\[  967.646882\] Call trace:
\[  967.646886\]  \__switch_to+0xf0/0x150
\[  967.646895\]  \__schedule+0x394/0xb60
\[  967.646902\]  schedule+0x3c/0x148
\[  967.646909\]  io_schedule+0x44/0x68
\[  967.646917\]  blk_mq_get_tag+0x180/0x330
\[  967.646923\]  \__blk_mq_alloc_requests+0x1c8/0x4c8
\[  967.646932\]  blk_mq_submit_bio+0x41c/0x6e8
\[  967.646941\]  \__submit_bio+0x8c/0x238
\[  967.646950\]  submit_bio_noacct_nocheck+0x2b4/0x380
\[  967.646959\]  submit_bio_noacct+0x114/0x4d0
\[  967.646968\]  submit_bio+0xb0/0x220
\[  967.646976\]  \__swap_writepage+0x138/0x3c8
\[  967.646983\]  swap_writepage+0x294/0x3d0
\[  967.646990\]  shmem_writepage+0x3f0/0x4a0
\[  967.646998\]  pageout+0x15c/0x3e0
\[  967.647007\]  shrink_folio_list+0x93c/0xd10
\[  967.647016\]  evict_folios+0x22c/0x668
\[  967.647024\]  try_to_shrink_lruvec+0x19c/0x288
\[  967.647033\]  shrink_one+0x80/0x230
\[  967.647042\]  shrink_node+0xad0/0xe10
\[  967.647048\]  do_try_to_free_pages+0xdc/0x5a0
\[  967.647054\]  try_to_free_pages+0x120/0x268
\[  967.647061\]  \__alloc_pages_noprof+0x500/0xdf8
\[  967.647068\]  alloc_pages_mpol_noprof+0x60/0x158
\[  967.647075\]  alloc_pages_noprof+0x58/0x98
\[  967.647081\]  new_slab+0x3b8/0x488
\[  967.647088\]  \___slab_alloc+0x494/0x8e0
\[  967.647094\]  kmem_cache_alloc_bulk_noprof+0xf0/0x3d8
\[  967.647101\]  mas_alloc_nodes+0x118/0x210
\[  967.647111\]  mas_node_count_gfp+0x44/0x78
\[  967.647120\]  mas_preallocate+0xe0/0x2b8
\[  967.647126\]  \__split_vma+0xf8/0x358
\[  967.647132\]  vma_modify+0x290/0x638
\[  967.647139\]  vma_modify_flags+0x9c/0xe0
\[  967.647145\]  mprotect_fixup+0x94/0x290
\[  967.647153\]  do_mprotect_pkey+0x2d0/0x490
\[  967.647160\]  \__arm64_sys_mprotect+0x28/0x40
\[  967.647167\]  invoke_syscall+0x50/0x120
\[  967.647176\]  el0_svc_common.constprop.0+0x48/0xf0
\[  967.647184\]  do_el0_svc+0x24/0x38
\[  967.647193\]  el0_svc+0x30/0x100
\[  967.647199\]  el0t_64_sync_handler+0x100/0x130
\[  967.647206\]  el0t_64_sync+0x190/0x198

Looking at the kernel log, it appears as though all read and write operations are stalling on the SSD. This can happen due to power supply issues or a very high I/O load when swap is in use. This is probably the case here. During compilation, the RAM runs out and the system starts swapping. With a high SWAP load, this can almost bring the system to a standstill.

How is the SSD powered? Just by the USB port or has it an own PSU? And what exactly you store on the SSD? The entire user data directory? Where is the SWAP file located?

So I assume rootfs, userdata and swapfile are all on the same SSD, also since it is partition 2.

Even if at its limits, of course it should not crash the system. But to run stable, indeed a dedicated PSU is surely needed.

Other than that, some tweaks might enhance its performance. E.g. if its I/O scheduler is bfq by default, mq-deadline might work better on SSDs, as it is simpler, theoretically better suited for fast drives with low latency, like SSDs.

And does it support APM?

hdparm -B /dev/sda

Last but not least, UAS (USB Attached SCSI), has shown to cause some problems with specific drives, e.g. due to outdated firmware. But that usually shows up immediately, preventing booting from the drive. Very unlikely to be the culprit in your case, since it obviously worked well before.

Yeah the SSD is powered from the USB port and the pi is powered via poe.

https://a.co/d/0dGm9NZz

Everything is on the SSD and I have the swap at 4gb.

The usb adapter and SSD are these

https://a.co/d/05K0t4pC

https://a.co/d/094szGPM

“Yeah the SSD is powered from the USB port“

This is the problem then! Likely