Bugzilla – Bug 1208405
Nil Crash: bootloader_finish.rb failed with 'undefined method `read' for nil:NilClass' (NoMethodError).
Last modified: 2023-02-21 16:02:57 UTC
Created attachment 864950 [details] yast logs (Perhaps related to bug 1208404) 2023-02-16 17:03:37 <3> nbftboot(4221) [Ruby] yast/wfm.rb(handle_exception):271 Client /mounts/mp_0002/usr/share/YaST2/clients/bootloader_finish.rb failed with 'undefine d method `read' for nil:NilClass' (NoMethodError). Backtrace: /mounts/mp_0002/usr/share/YaST2/lib/bootloader/finish_client.rb:56:in `write' /mounts/mp_0002/usr/share/YaST2/lib/installation/finish_client.rb:57:in `run' /mounts/mp_0002/usr/share/YaST2/lib/installation/finish_client.rb:45:in `run' /mounts/mp_0002/usr/share/YaST2/clients/bootloader_finish.rb:5:in `<top (required)>' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:345:in `eval' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:345:in `run_client' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:206:in `call_builtin' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:206:in `call_builtin_wrapper' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:195:in `CallFunction' /mounts/mp_0002/usr/share/YaST2/lib/installation/clients/inst_finish.rb:117:in `block (2 levels) in write' /mounts/mp_0002/usr/share/YaST2/lib/installation/clients/inst_finish.rb:92:in `each' /mounts/mp_0002/usr/share/YaST2/lib/installation/clients/inst_finish.rb:92:in `each_with_index' /mounts/mp_0002/usr/share/YaST2/lib/installation/clients/inst_finish.rb:92:in `block in write' /mounts/mp_0002/usr/share/YaST2/lib/installation/clients/inst_finish.rb:84:in `each' /mounts/mp_0002/usr/share/YaST2/lib/installation/clients/inst_finish.rb:84:in `each_with_index' /mounts/mp_0002/usr/share/YaST2/lib/installation/clients/inst_finish.rb:84:in `write' /mounts/mp_0002/usr/share/YaST2/lib/installation/clients/inst_finish.rb:64:in `main' /mounts/mp_0002/usr/share/YaST2/clients/inst_finish.rb:2:in `<top (required)>' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:345:in `eval' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:345:in `run_client' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:206:in `call_builtin' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:206:in `call_builtin_wrapper' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:195:in `CallFunction' /mounts/mp_0002/usr/share/YaST2/modules/ProductControl.rb:1306:in `block in RunFrom' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/y2logger.rb:98:in `group' /mounts/mp_0002/usr/share/YaST2/modules/ProductControl.rb:1276:in `RunFrom' /mounts/mp_0002/usr/share/YaST2/lib/autoinstall/clients/inst_autosetup.rb:404:in `main' /mounts/mp_0002/usr/share/YaST2/clients/inst_autosetup.rb:21:in `<top (required)>' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:345:in `eval' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:345:in `run_client' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:206:in `call_builtin' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:206:in `call_builtin_wrapper' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:195:in `CallFunction' /mounts/mp_0002/usr/share/YaST2/modules/ProductControl.rb:1306:in `block in RunFrom' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/y2logger.rb:98:in `group' /mounts/mp_0002/usr/share/YaST2/modules/ProductControl.rb:1276:in `RunFrom' /mounts/mp_0002/usr/share/YaST2/modules/ProductControl.rb:1501:in `Run' /mounts/mp_0002/usr/share/YaST2/lib/installation/clients/inst_worker_initial.rb:99:in `main' /mounts/mp_0002/usr/share/YaST2/clients/inst_worker_initial.rb:2:in `<top (required)>' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:345:in `eval' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:345:in `run_client' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:206:in `call_builtin' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:206:in `call_builtin_wrapper' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:195:in `CallFunction' /mounts/mp_0002/usr/share/YaST2/lib/installation/clients/installation.rb:92:in `block in main' /mounts/mp_0002/usr/share/YaST2/lib/ui/wizards/layout.rb:186:in `open_wizard' /mounts/mp_0002/usr/share/YaST2/lib/installation/clients/installation.rb:60:in `main' /mounts/mp_0002/usr/share/YaST2/clients/installation.rb:2:in `<top (required)>' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:345:in `eval' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:345:in `run_client' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:206:in `call_builtin' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:206:in `call_builtin_wrapper' /mounts/mp_0002/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:195:in `CallFunction' /usr/lib/YaST2/bin/y2start:68:in `<main>' 2023-02-16 17:03:37 <3> nbftboot(4221) [Ruby] yast/wfm.rb(handle_exception):308 Internal error. Please report a bug report with logs.<br>Run save_y2logs to get complete logs.<br><br>Caller: /mounts/mp_0002/usr/share/YaST2/lib/bootloader/finish_client.rb:56:in `write'<br><br>Details: undefined method `read' for nil:NilClass This was an installation on NVMeoF with a hand-crafted autoinst.xml file that defines a minimal installation. The same autoinst.xml works fine on SLE15-SP4.
Created attachment 864951 [details] autoinst.xml file
Code location: https://github.com/yast/yast-bootloader/blob/master/src/lib/bootloader/finish_client.rb#L57 so ::Bootloader::BootloaderFactory.current is nil.
The bootloader section from autoinst.xml: > <bootloader t="map"> > <global t="map"> > <append>preempt=full mitigations=auto security=apparmor console=ttyS0,115200 console=tty0</append> > <cpu_mitigations>auto</cpu_mitigations> > <gfxmode>auto</gfxmode> > <hiddenmenu>false</hiddenmenu> > <os_prober>false</os_prober> > <secure_boot>true</secure_boot> > <terminal>gfxterm</terminal> > <timeout t="integer">8</timeout> > <update_nvram>true</update_nvram> > <xen_kernel_append>vga=gfx-1024x768x16</xen_kernel_append> > </global> > <loader_type>grub2-efi</loader_type> > </bootloader>
Martin, FYI: I found out recently that Bugzilla can be tricked into not mangling preformatted text into garbage when you simply prefix each line with "> " to mark it as a quote. See my previous comment.
This may indeed be related to bug #1208404. From the messages in the attached y2logs tarball: 2023-02-16T22:03:05.942935+00:00 install kernel: [ 153.695375][T12874] grub2-probe[12874]: segfault at 1 ip 00007feb5edcd738 sp 00007ffcfc2561d8 error 4 in libc-2.31.so[7feb5ec50000+1e6000] 2023-02-16T22:03:05.950121+00:00 install kernel: [ 153.695393][T12874] Code: 0c 8a 8b 04 82 29 c8 c3 66 2e 0f 1f 84 00 00 00 00 00 89 f9 c5 f9 6e c6 c4 41 31 ef c9 c4 e2 7d 78 c0 83 e1 3f 83 f9 20 77 38 <c5> 7e 6f 07 c4 c1 7d 74 c8 c4 c1 35 74 d0 c5 ed eb c9 c5 fd d7 c1 2023-02-16T22:03:06.155340+00:00 install kernel: [ 153.908941][T12963] grub2-probe[12963]: segfault at 1 ip 00007f707aa8a738 sp 00007fff8f866758 error 4 in libc-2.31.so[7f707a90d000+1e6000] 2023-02-16T22:03:06.155348+00:00 install kernel: [ 153.908950][T12963] Code: 0c 8a 8b 04 82 29 c8 c3 66 2e 0f 1f 84 00 00 00 00 00 89 f9 c5 f9 6e c6 c4 41 31 ef c9 c4 e2 7d 78 c0 83 e1 3f 83 f9 20 77 38 <c5> 7e 6f 07 c4 c1 7d 74 c8 c4 c1 35 74 d0 c5 ed eb c9 c5 fd d7 c1
y2logs: 2023-02-16 17:01:54 <1> install(4221) [Ruby] bootloader/autoyast_converter.rb(import):31 import data > #<Bootloader::AutoinstProfile::BootloaderSection:0x00005604fe555088 @parent=nil, > @device_map=[], > @loader_type="grub2-efi", > @global=#<Bootloader::AutoinstProfile::GlobalSection:0x00005604fe5546d8 > @parent=#<Bootloader::AutoinstProfile::BootloaderSection:0x00005604fe555088 > ...>, > @append="preempt=full mitigations=auto security=apparmor console=ttyS0,115200 console=tty0", > @cpu_mitigations="auto", > @gfxmode="auto", > @hiddenmenu="false", > @os_prober="false", > @secure_boot="true", > @terminal="gfxterm", > @timeout=8, > @update_nvram="true", > @xen_kernel_append="vga=gfx-1024x768x16">> 2023-02-16 17:02:02 <1> install(4221) [Ruby] bootloader/sysconfig.rb(write):106 Saving /etc/sysconfig/bootloader for grub2-efi But I don't see a grub2-install call anywhere. Should that have come after bootloader_finish?
Josef, please have a look.
It is caused by change in yast2-network. I see that in logs is yast2-network-4.5.15 and fixed version is 4.5.16. See changelog entry https://github.com/yast/yast-network/blob/master/package/yast2-network.changes#L4 So already fixed and just waiting to be in the latest leap. *** This bug has been marked as a duplicate of bug 1207968 ***