Bug 287251 - Failed to rebuild autoinstall ISO for freebsd-14.3-RC1-64bit with error: Failed adding duplicate name to parent
Summary: Failed to rebuild autoinstall ISO for freebsd-14.3-RC1-64bit with error: Fail...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 14.3-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-03 06:31 UTC by Yanhui He
Modified: 2025-06-11 22:29 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yanhui He 2025-06-03 06:31:13 UTC
Hi,

pycdlib is used on our test to automatic install FreeBSD 14.3. We hit the issue that we cannot use it from FreeBSD 14.3 RC1.

Like we use the below code to open FreeBSD 14.3 RC1 64bit ISO Image.
******test_freebsd_iso.py******
#!/usr/bin/env python

import pycdlib
iso = pycdlib.PyCdlib(always_consistent=True)
src_iso = "FreeBSD-14.3-RC1-amd64-dvd1.iso"
iso.open(src_iso)
iso.close()
******test_freebsd_iso.py******

Got exceptions when test FreeBSD 14.3 RC1 64bit ISO.
******************
File "/tmp/ansible_community.general.iso_customize_payload_0ng2_nf0/ansible_community.general.iso_customize_payload.zip/ansible_collections/community/general/plugins/modules/iso_customize.py", line 269, in iso_rebuild
  File "/usr/local/lib/python3.10/dist-packages/pycdlib/pycdlib.py", line 4152, in open
    self._open_fp(fp)
  File "/usr/local/lib/python3.10/dist-packages/pycdlib/pycdlib.py", line 2320, in _open_fp
    ic_level, lastbyte = self._walk_directories(self.pvd, extent_to_ptr,
  File "/usr/local/lib/python3.10/dist-packages/pycdlib/pycdlib.py", line 1167, in _walk_directories
    new_record.parent.track_child(new_record,
  File "/usr/local/lib/python3.10/dist-packages/pycdlib/dr.py", line 861, in track_child
    self._add_child(child, logical_block_size, allow_duplicate, False)
  File "/usr/local/lib/python3.10/dist-packages/pycdlib/dr.py", line 770, in _add_child
    raise pycdlibexception.PyCdlibInvalidInput('Failed adding duplicate name to parent')

fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "add_files": [
                {
                    "dest_file": "/etc/installerconfig",
                    "src_file": "/home/worker/workspace/Ansible_FreeBSD_14.x_64bit_MAIN_NVME_VMXNET3_EFI-136/ansible-vsphere-gos-validation/cache/unattend_iso_rajob3bm/installerconfig"
                }
            ],
            "delete_files": [],
            "dest_iso": "/home/worker/workspace/Ansible_FreeBSD_14.x_64bit_MAIN_NVME_VMXNET3_EFI-136/ansible-vsphere-gos-validation/cache/unattend_iso_rajob3bm/FreeBSD-14.3-RC1-amd64-dvd1-20250531223539.iso",
            "src_iso": "/home/worker/workspace/Ansible_FreeBSD_14.x_64bit_MAIN_NVME_VMXNET3_EFI-136/ansible-vsphere-gos-validation/cache/unattend_iso_rajob3bm/FreeBSD-14.3-RC1-amd64-dvd1.iso"
        }
    },
    "msg": "Failed to rebuild ISO /home/worker/workspace/Ansible_FreeBSD_14.x_64bit_MAIN_NVME_VMXNET3_EFI-136/ansible-vsphere-gos-validation/cache/unattend_iso_rajob3bm/FreeBSD-14.3-RC1-amd64-dvd1.iso with error: Failed adding duplicate name to parent"
}
error message:
Failed to rebuild ISO /home/worker/workspace/Ansible_FreeBSD_14.x_64bit_MAIN_NVME_VMXNET3_EFI-136/ansible-vsphere-gos-validation/cache/unattend_iso_rajob3bm/FreeBSD-14.3-RC1-amd64-dvd1.iso with error: Failed adding duplicate name to parent

******************

It has the same error information in this PR.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283112

This one is OK after did https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=286666#c5, thanks Ed!

Would you please add a test like below to test FreeBSD ISO files and make sure the published ISO files can be opened by pycdlib?

#!/usr/bin/env python

import pycdlib
iso = pycdlib.PyCdlib(always_consistent=True)
src_iso = "FreeBSD-14.3-RC1-amd64-dvd1.iso"
iso.open(src_iso)
iso.close()


Thanks!
Yanhui
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2025-06-03 06:41:04 UTC
^Triage: reclassify.
Comment 2 Yanhui He 2025-06-04 09:32:35 UTC
(In reply to Mark Linimon from comment #1)
Thanks Mark!
Comment 3 Kyle Evans freebsd_committer freebsd_triage 2025-06-07 01:35:33 UTC
I think Ed has some context here, let's add him.
Comment 4 Yanhui He 2025-06-07 09:44:44 UTC
(In reply to Kyle Evans from comment #3)
Hi Mark, Kyle and Ed,

Hit the same issue for the latest FreeBSD 14.3 64bit RELEASE ISO Image.

Thanks!
Yanhui
Comment 5 Yanhui He 2025-06-09 05:58:26 UTC
Hi Mark, Kyle and Ed,

We have tried the way in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283112#c13 and it doesn't work as in FreeBSD 14.2.

Would you please take a look at this issue and tell us how to resolve it?

Thanks!
Yanhui
Comment 6 Ed Maste freebsd_committer freebsd_triage 2025-06-10 16:32:20 UTC
Offending duplicates in FreeBSD-14.3-RELEASE-amd64-dvd1.iso are:

drwxr-xr-x  2 0      0        2048 Jun  6 06:11 usr/local/share/licenses/wifi-firmware-rtw88-kmod-rtw8723d-20241017.1402000_2
-r--r--r--  1 0      0         700 Apr 12 05:23 usr/local/share/licenses/wifi-firmware-rtw88-kmod-rtw8723d-20241017.1402000_2/catalog.mk

With some debug printfs added to _walk_directories in pycdlib/pycdlib.py I see:

new_record.parent.file_ident = b'LICENSES' new_record.file_ident = b'WIFI_FIRMWARE_RTW88_KMOD_RTW872'
new_record.parent.file_ident = b'LICENSES' new_record.file_ident = b'WIFI_FIRMWARE_RTW88_KMOD_RTW872'

With FreeBSD-14.3-BETA1-amd64-dvd1.iso I see only one:

new_record.parent.file_ident = b'LICENSES' new_record.file_ident = b'WIFI_FIRMWARE_RTW88_KMOD_RTW872'

Just looking at `strings --print-file-name *.iso | grep -i firmware_rtw88_kmod_rtw872` there does appear to be a difference in -RELEASE vs -BETA1
Comment 7 Ed Maste freebsd_committer freebsd_triage 2025-06-11 22:29:05 UTC
In the short term I believe you could give FreeBSD-14.3-RELEASE-amd64-disc1.iso a try instead, assuming you do not need the packages that are on dvd1.