Since late-December 2011, we’ve run a 64-bit zoneadmd. In -gate, it’s still 32-bit only. We should refactor our version to only build 64-bit, with an eye toward upstreaming it, and reducing our isaexec consumption by one.
Dan McDonald commented on 2025-06-03T16:43:10.477-0400 (edited 2025-06-17T14:58:52.033-0400):
Inspired by noise that should be squashed by OS-8666. (Aka https://smartos.org/bugview/OS-8666 for public folks.)
Dan McDonald commented on 2025-06-04T08:50:56.027-0400:
There may be other places we perform joint 32/64 bit builds for which we don’t have to any more.
Dan McDonald commented on 2025-06-04T15:51:51.881-0400:
@Dan McDonald Those will be separate bugs/issues, most likely.
Dan McDonald commented on 2025-06-17T17:21:55.322-0400:
Disassembly and strings before-and-after comparisons.
The raw shell-session output follows. It demonstrates:
Compiled binaries are the same size.
Disassemblies differ in constants for instruction only. I demonstrate this by eliminating assembly/instruction constants $0x, diff line output (egrep expression [0-9]+c[0-9]+ . and separators ---. All that’s left are continuation lines of changed-constant instructions.
A comparison of strings before and after. Sure enough, the source files (used to be in `../` because the amd64 subdirectory existed) are slightly different. These hash differently, and throw off the entire space of static objects in memory.
smartos-build(~/smartos-live)[0]% ls -lt /tmp/zoneadmd proto/usr/lib/zones/zoneadmd
-r-xr-xr-x 1 danmcd staff 241712 Jun 17 16:04 proto/usr/lib/zones/zoneadmd*
-r-xr-xr-x 1 danmcd staff 241712 Jun 17 15:44 /tmp/zoneadmd*
smartos-build(~/smartos-live)[0]% dis /tmp/zoneadmd > /tmp/before
smartos-build(~/smartos-live)[0]% dis proto/usr/lib/zones/zoneadmd > /tmp/after
smartos-build(~/smartos-live)[0]% wc -l /tmp/{before,after}
23220 /tmp/before
23220 /tmp/after
46440 total
smartos-build(~/smartos-live)[0]% diff /tmp/{before,after} | wc -l
2004
smartos-build(~/smartos-live)[1]% diff /tmp/{before,after} | fgrep -v '$0x' | fgrep -v -- '---' | egrep -v '[0-9]+c[0-9]+' | wc -l
38
smartos-build(~/smartos-live)[1]% diff /tmp/{before,after} | fgrep -v '$0x' | fgrep -v -- '---' | egrep -v '[0-9]+c[0-9]+'
< disassembly for /tmp/zoneadmd
> disassembly for proto/usr/lib/zones/zoneadmd
< 00 63 69 42 00
> 00 54 69 42 00
< ff 02 68 42 00
< ff 29 69 42 00
< ff 61 69 42 00
> ff f3 67 42 00
> ff 1a 69 42 00
> ff 52 69 42 00
< ff fd 66 42 00
> ff e8 66 42 00
< ff 29 69 42 00
> ff 1a 69 42 00
< ff df 66 42 00
< ff c1 68 42 00
< ff 5e 69 42 00
> ff ca 66 42 00
> ff b2 68 42 00
> ff 4f 69 42 00
< ff d0 65 42 00
> ff b5 65 42 00
< ff 94 63 42 00
> ff 91 63 42 00
< ff 74 66 42 00
> ff 59 66 42 00
smartos-build(~/smartos-live)[1]% strings /tmp/zoneadmd | sort > /tmp/strings-before
smartos-build(~/smartos-live)[0]% strings proto/usr/lib/zones/zoneadmd | sort > /tmp/strings-after
smartos-build(~/smartos-live)[0]% diff /tmp/strings-{before,after} | wc -l
16
smartos-build(~/smartos-live)[1]% diff /tmp/strings-{before,after}
84,88d83
< ../log.c
< ../vplat.c
< ../zcons.c
< ../zfd.c
< ../zoneadmd.c
698a694
> log.c
881a878
> vplat.c
885a883
> zcons.c
887a886
> zfd.c
911a911
> zoneadmd.c
smartos-build(~/smartos-live)[1]%
I’m attaching the raw strings and disassembly files.
Dan McDonald commented on 2025-06-17T17:35:49.475-0400:
Running on a CN without any obvious incident:
[root@larry (kebecloud) ~]# zoneadm list -p | awk -F: '{print $6}' | sort -u
bhyve
joyent
joyent-minimal
kvm
lx
[root@larry (kebecloud) ~]# vmadm list -H | awk '{print $2}' | sort -u
BHYV
KVM
LX
OS
[root@larry (kebecloud) ~]# file /usr/lib/zones/zoneadmd
/usr/lib/zones/zoneadmd: ELF 64-bit LSB executable AMD64 Version 1, dynamically linked, not stripped, no debugging information available
[root@larry (kebecloud) ~]# svcs -xvZ ; fmadm faulty ; vmadm list -H | grep -v running
[root@larry (kebecloud) ~]#
Dan McDonald commented on 2025-06-18T15:10:41.219-0400:
Still up:
[root@larry (kebecloud) ~]# uptime
19:06:46 up 21:39, 2 users, load average: 0.26, 0.25, 0.25
[root@larry (kebecloud) ~]# svcs -xvZ ; fmadm faulty ; vmadm list -H | grep -v running
[root@larry (kebecloud) ~]# ls -lti /usr/lib/zones
total 498
8290 -r-xr-xr-x 1 root bin 1939 Jun 17 20:55 zoneunshare
8289 -r-xr-xr-x 1 root bin 2153 Jun 17 20:55 zoneshare
8288 -r-xr-xr-x 1 root bin 241712 Jun 17 20:55 zoneadmd
[root@larry (kebecloud) ~]# zoneadm list -p | awk -F: '{print $6}' | sort -u
bhyve
joyent
joyent-minimal
kvm
lx
[root@larry (kebecloud) ~]# vmadm list -H | awk '{print $2}' | sort -u
BHYV
KVM
LX
OS
[root@larry (kebecloud) ~]#