fish shell broken and unable to login with ssh

I can't log into FreeBSD with SSH.

Code:
ld-elf.so.1: /usr/local/bin/fish: Undefined symbol "eventfd@FBSD_1.6"

Every command I try to execute through (possible with an SSH lib) also ends up with above error.
 
Where is the machine? Do you have physical access to it? If it is remote, can you get a KVM? Is it a root account?

You really need to give more information.
 
I can't log into FreeBSD with SSH.

Code:
ld-elf.so.1: /usr/local/bin/fish: Undefined symbol "eventfd@FBSD_1.6"

Every command I try to execute through (possible with an SSH lib) also ends up with above error.
Looks like you've been here before. How did you fix it that time?
Have you just done an upgrade of the OS? If so, it looks like you might need to finish the upgrade. What does freebsd-version -uk show?
 
It wasn't fixed as the VM and jails continued to work I never touched the host OS. Now one of the bhyve vm's is dead I need to get hands on it again. No command can be executed remotely so I can't find out except going to the machine. SSH access of root seems disabled:

Code:
End of keyboard-interactive prompts from server
Access denied
 
Where is the machine? Do you have physical access to it? If it is remote, can you get a KVM? Is it a root account?

You really need to give more information.
It is in a data center. I can have virtual console through DELL idrac.
 
When a lib cannot load even symbols for a file descriptor, that indicates a corruption somewhere. Can that VM be rebooted? A reboot forces the kernel to re-check the hardware addresses where libs are loaded. A reboot is also a chance to run fsck. If the system can be rebooted, it can be saved.
 
fraxamo spotted the same question from a while back:
Looks like you've been here before.

It wasn't fixed as the VM and jails continued to work I never touched the host OS

So, you just left it and now it's biting you in the ass.

Anyway, how to fix this mess? Get remote access through DRAC/IPMI/Remote KVM/whatever. If that's not possible you're going to have to walk/drive/fly to wherever the machine is and login locally. There's no way to solve this without access to the console.

Once there, login as root (I hope you didn't change root's shell), update your sources in /usr/src/. I suggest going for releng/13.1 (that's 13.1-RELEASE). Build world, build kernel, install kernel, install world, run etcupdate(8), etc. to correctly update the host. The host will require at least one reboot. I suggest not rebooting after the installation of the kernel, just reboot once after the whole system has been updated.
 
When a lib cannot load even symbols for a file descriptor, that indicates a corruption somewhere. Can that VM be rebooted? A reboot forces the kernel to re-check the hardware addresses where libs are loaded. A reboot is also a chance to run fsck. If the system can be rebooted, it can be saved.
yes it can be rebooted.
 
fraxamo spotted the same question from a while back:




So, you just left it and now it's biting you in the ass.

Anyway, how to fix this mess? Get remote access through DRAC/IPMI/Remote KVM/whatever. If that's not possible you're going to have to walk/drive/fly to wherever the machine is and login locally. There's no way to solve this without access to the console.

Once there, login as root (I hope you didn't change root's shell), update your sources in /usr/src/. I suggest going for releng/13.1 (that's 13.1-RELEASE). Build world, build kernel, install kernel, install world, run etcupdate(8), etc. to correctly update the host. The host will require at least one reboot. I suggest not rebooting after the installation of the kernel, just reboot once after the whole system has been updated.
The root has fish as well. So re-install?
 
I have changed the shell and can log in now. But when running git I get the same link symbol error:

Code:
/usr # git clone -b releng/13.1 --depth 1 https://git.freebsd.org/src.git src
Cloning into 'src'...
ld-elf.so.1: /usr/local/bin/git: Undefined symbol "regcomp@FBSD_1.6"
 
Last edited by a moderator:
[Can you post the output of freebsd-version -ruk?

Every command failed with Undefined symbol "regcomp@FBSD_1.6". The following is uname output:
Code:
$ uname -a
FreeBSD xxx 13.0-CURRENT FreeBSD 13.0-CURRENT #3 r363383: Thu Jul 23 01:09:38 PDT 2020     root@xxx:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64
 
Last edited by a moderator:
You're running '-CURRENT'. Please see point 2 at this link. That link will also explain where to get support for the version that you're running.
 
joggx, You could try the solution from How to resolve ld-elf.so.1: /bin/sh: Undefined symbol "stat@FBSD_1.5".

You can use netcat, nc(1) ( /rescue/nc ) to receive the file and from a 13.0-RELEASE or 13.1-RELEASE system netcat send the file.

For example:

On the affected system boot into single user mode, mount the file system read-write, cd /tmp.

On the affected system, the receiving side, make nc(1) listen on port 1234 and wait to write to file:
Code:
# /rescue/nc -l 1234 > libc.so.7
From the sending side:
Code:
nc -N [IP_address_of_affected_system] 1234 < /lib/libc.so.7

Proceed as described in the linked thread:
Code:
/rescue/chflags noschg /lib/libc.so.7
/rescue/cp libc.so.7 /lib/libc.so.7
 
can you check if the /usr/bin/fetch is working? If it's working you can use it to download the src from the ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/13.1-RELEASE/src.txz and rebuild. Otherwise you will need to mount the virtual iso using idrac then mount it via /rescue/mount_udf or /rescue/mound_cd9660 and extract the src.txz via /rescue/tar
 
can you check if the /usr/bin/fetch is working? If it's working you can use it to download the src from the ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/13.1-RELEASE/src.txz and rebuild. Otherwise you will need to mount the virtual iso using idrac then mount it via /rescue/mount_udf or /rescue/mound_cd9660 and extract the src.txz via /rescue/tar
I extracted the file from ISO with mdconfig followed by mount and replace the existing one in single user mode and the error Undefined symbol "regcomp@FBSD_1.6" disappeared.
 
After make buildworld and make kernel, I have the error:

Code:
kldxref /boot/kernel
kldxref: error while reading /boot/kernel/iwlwifi-9000-pu-b0-jf-b0-46.ucode.ko: Bad address
kldxref: error while reading /boot/kernel/iwlwifi-9260-th-b0-jf-b0-46.ucode.ko: Bad address
kldxref: /boot/kernel/kernel: too many segments

I ignore the error and go ahead to next step, and get the following output:

Code:
/usr/src # etcupdate -p
No previous tree to compare against, a sane comparison is not possible.

How should I proceed?
 
Remove the current src tree after /usr/src is empty extract the new src as i describe in my previous post then build the kernel and word and generate new current tree with etcupdate. Then use etcupdate diff.

 
Remove the current src tree after /usr/src is empty extract the new src as i describe in my previous post then build the kernel and word and generate new current tree with etcupdate. Then use etcupdate diff.

I did etcupdate extract. diff gives too much I bypass the patch. The system still boots, but the ssh console shows it is still 13.0-CURRENT, while uname -a shows 13.1 release.
Last login: Fri Jul 8 03:09:57 2022 from X.X.X.X
FreeBSD 13.0-CURRENT (GENERIC) #3 r363383: Thu Jul 23 01:09:38 PDT 2020

> uname -a
FreeBSD ftp0 13.1-RELEASE FreeBSD 13.1-RELEASE releng/13.1-fc952ac22 GENERIC amd64

 
Back
Top