Bug 239492 - freebsd-update mismatch with recompile from svn releng
Summary: freebsd-update mismatch with recompile from svn releng
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.3-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-28 11:45 UTC by aler
Modified: 2019-08-02 17:21 UTC (History)
1 user (show)

See Also:


Attachments
compare log (8.09 KB, text/plain)
2019-08-02 17:13 UTC, aler
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description aler 2019-07-28 11:45:46 UTC
Files installed by freebsd-update mismatched from those recompiled from svn:

# freebsd-update fetch
Looking up update.FreeBSD.org mirrors... 2 mirrors found.
Fetching public key from update1.freebsd.org... done.
Fetching metadata signature for 11.3-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata files... done.
Inspecting system... done.
Preparing to download files... done.
Fetching 5 patches... done.
Applying patches... done.
Fetching 10 files... done.
The following files will be updated as part of updating to
11.3-RELEASE-p1:
/bin/freebsd-version
/boot/kernel/kernel
/boot/kernel/mqueuefs.ko
/usr/bin/telnet
/usr/sbin/bhyve
/usr/src/contrib/telnet/telnet/commands.c
/usr/src/contrib/telnet/telnet/telnet.c
/usr/src/contrib/telnet/telnet/utilities.c
/usr/src/sys/compat/freebsd32/freebsd32_ioctl.c
/usr/src/sys/conf/newvers.sh
/usr/src/sys/kern/tty.c
/usr/src/sys/kern/uipc_mqueue.c
/usr/src/sys/kern/uipc_usrreq.c
/usr/src/sys/x86/x86/cpu_machdep.c
/usr/src/usr.sbin/bhyve/pci_xhci.c

# freebsd-update install
Installing updates... done.

# freebsd-version 
11.3-RELEASE-p1

# make installkernel KODIR=/boot/kernel.patched
<kernel compiled from svn.freebsd.org/base/releng/11.3/ 2019-11-27>
<skipped output>

now inspecting results: /boot/kernel.old is backup made by freebsd-update, /boot/kernel is newly installed kernel by freebsd-update, /boot/kernel.patched is compiled from releng/11.3
# hexdump -C /boot/kernel.old/mqueuefs.ko | grep -F releng -A 5
00009120  44 3a 20 72 65 6c 65 6e  67 2f 31 31 2e 33 2f 73  |D: releng/11.3/s|
00009130  79 73 2f 6b 65 72 6e 2f  75 69 70 63 5f 6d 71 75  |ys/kern/uipc_mqu|
00009140  65 75 65 2e 63 20 33 34  31 30 37 34 20 32 30 31  |eue.c 341074 201|
00009150  38 2d 31 31 2d 32 37 20  31 36 3a 35 31 3a 31 38  |8-11-27 16:51:18|
00009160  5a 20 6d 61 72 6b 6a 20  24 00 46 72 65 65 42 53  |Z markj $.FreeBS|
00009170  44 20 63 6c 61 6e 67 20  76 65 72 73 69 6f 6e 20  |D clang version |
# hexdump -C /boot/kernel/mqueuefs.ko | grep -F releng -A 5
00009120  44 3a 20 72 65 6c 65 6e  67 2f 31 31 2e 33 2f 73  |D: releng/11.3/s|
00009130  79 73 2f 6b 65 72 6e 2f  75 69 70 63 5f 6d 71 75  |ys/kern/uipc_mqu|
00009140  65 75 65 2e 63 20 33 34  31 30 37 34 20 32 30 31  |eue.c 341074 201|
00009150  38 2d 31 31 2d 32 37 20  31 36 3a 35 31 3a 31 38  |8-11-27 16:51:18|
00009160  5a 20 6d 61 72 6b 6a 20  24 00 46 72 65 65 42 53  |Z markj $.FreeBS|
00009170  44 20 63 6c 61 6e 67 20  76 65 72 73 69 6f 6e 20  |D clang version |
# hexdump -C /boot/kernel.patched/mqueuefs.ko | grep -F releng -A 5
00009120  44 3a 20 72 65 6c 65 6e  67 2f 31 31 2e 33 2f 73  |D: releng/11.3/s|
00009130  79 73 2f 6b 65 72 6e 2f  75 69 70 63 5f 6d 71 75  |ys/kern/uipc_mqu|
00009140  65 75 65 2e 63 20 33 35  30 32 38 34 20 32 30 31  |eue.c 350284 201|
00009150  39 2d 30 37 2d 32 34 20  31 32 3a 35 35 3a 31 36  |9-07-24 12:55:16|
00009160  5a 20 67 6f 72 64 6f 6e  20 24 00 46 72 65 65 42  |Z gordon $.FreeB|
00009170  53 44 20 63 6c 61 6e 67  20 76 65 72 73 69 6f 6e  |SD clang version|


kernel.old/mqueuefs.ko and kernel/mqueuefs.ko differs but in some other place


It says that installed kernel/mqueuefs.ko is from r341074 while it should be from r350284
I don't know if this really wrong version installed or it is just wrong version string in it.
Comment 1 aler 2019-07-28 11:47:12 UTC
it was typo in initial report:
<kernel compiled from svn.freebsd.org/base/releng/11.3/ 2019-11-27>

should be 

<kernel compiled from svn.freebsd.org/base/releng/11.3/ 2019-07-27>
Comment 2 Ed Maste freebsd_committer 2019-08-02 03:20:03 UTC
Can you compare the installed-by-freebsd-update mqueuefs.ko and the one you built from svn, either with with something like (zsh/bash shell assumed for the example):

# diff -u3 <(hexdump -Cv freebsd-update/mqueuefs.ko) <(hexdump -Cv svn-build/mqueuefs.ko)

or (better) by installing the py36-diffoscope port and using it to perform the comparison, then put the results here?
Comment 3 aler 2019-08-02 17:13:31 UTC
Created attachment 206225 [details]
compare log

It seems that the only significant difference is version strings.
So everything seems fine from the point of functional patches but anyway it is misinformation (wrong revision number inside binary file).
Comment 4 Ed Maste freebsd_committer 2019-08-02 17:21:17 UTC
(In reply to aler from comment #3)
Good, thank you. I wanted to first make sure that you actually have the patched module.

I agree this is an issue; I believe it's inherent in our current process, and will see what we can do to address it.