[Bug 297426] linuxulator: linprocfs /proc/self/exe host path breaks execve under Linux ABI
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 12 Aug 2026 21:26:44 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297426
Mark Millard <marklmi26-fbsd@yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marklmi26-fbsd@yahoo.com
--- Comment #31 from Mark Millard <marklmi26-fbsd@yahoo.com> ---
(In reply to Devin Teske from comment #25)
I seem to have replicated the described behavior. I started in an
environment in which I did not have the linux service enabled and
did not a have any linux present, much less also having
linux-rl9-python39 present. So my sequencing was . . .
(Note: I abbreviate my long FreeBSD command prompts to # below.
I was logged in as root.
# mount | grep proc
# service linux onestart
# pkg install -rmain-amd64-default linux_base-rl9 # I do not show building it
1st
# service linux onestop
# service linux onestart
# mount | grep proc
linprocfs on /compat/linux/proc (linprocfs, local)
# pkg install -rmain-amd64-default linux-rl9-python39 # Again: build 1st not
shown
# /compat/linux/usr/bin/python3.9 --version
Python 3.9.25
# /compat/linux/usr/bin/python3.9 -c "
import os
print('readlink:', os.readlink('/proc/self/exe'))
try:
print('stat:', os.stat('/proc/self/exe'))
except OSError as e:
print('stat: FAIL --', e)
try:
os.execv('/proc/self/exe', ['python3', '-c', 'print(\"execv OK\")'])
except OSError as e:
print('execv: FAIL --', e)
"
readlink: /compat/linux/usr/bin/python3.9
stat: FAIL -- [Errno 2] No such file or directory: '/proc/self/exe'
execv: FAIL -- [Errno 2] No such file or directory
#
After the replication above I then also tried:
# chroot /compat/linux /bin/bash
bash-5.1# which python3.9
/bin/python3.9
bash-5.1# /bin/python3.9 -c "
import os
print('readlink:', os.readlink('/proc/self/exe'))
try:
print('stat:', os.stat('/proc/self/exe'))
except OSError as e:
print('stat: FAIL --', e)
try:
os.execv('/proc/self/exe', ['python3', '-c', 'print(\"execv OK\")'])
except OSError as e:
print('execv: FAIL --', e)
"
readlink: /usr/bin/python3.9
stat: os.stat_result(st_mode=33261, st_ino=234748, st_dev=2112205527,
st_nlink=1, st_uid=0, st_gid=0, st_size=15448, st_atime=0, st_mtime=1779238957,
st_ctime=1786567941)
execv OK
bash-5.1#
--
You are receiving this mail because:
You are the assignee for the bug.