Assertion failed

Nov 03, 2014

Running FreeBSD 7.2 on 8.4

Just before this weekend we had some issues with an old server which had lost one of the disks in it’s mirror and the second was starting to fail. This is a server we plan to decommission, but unfortunately we can’t do this yet as it still has a lot of important services running. This server was running an FreeBSD 7.2 and thankfully all services we care about was running in a jail. So it was decided, to get a temporary solution to this, we would create a new FreeBSD 8.4 virtual machine and move the jail as is to the new machine.

From my earlier experience with running 9.x on 10 I expected this to go like a charm, but unfortunately this was not the case. After several ours of transfering the jail to the new host, the time had finally come to start it. It started just as expected, but some of the services did not come up. More specifically stunnel and mysql. After some debugging it turned out they both failed on the function ‘kse_create’. This function is a part of the kernel supported user threads (kse(2)). Support for these was removed with FreeBSD 8, and since I was staying with the 7.2 userland in the jail it was not just to recompile the affected programs in the jail.

To solve this I recompiled the affected programs for 8.4, before I installed them to the 7.2 jail. This did have one problem though, the binary was linked against libraries which wasn’t available in FreeBSD 7.2. The natural solution for this would be the compat8x port, but it contained a lot of libraries which wasn’t necessary and was lacking a few which was needed. So instead of using compat8x, I chose to manually copy the missing libraries from the 8.4 machine and install them to the 7.2 jail. Then after some compiling the services which originally used kse was back up again without it.