Cubic crashes when transitioning to the Options page

Bug #1829553 reported by Cubic PPA
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cubic
Critical
Cubic PPA

Bug Description

This Bug was reported on closed Bug #1827157.

I'm creating a new bug report to track and fix this bug.

Here are the original comments...

Just updated and tried to update my existing project. When I click Next out of Chroot, cubic hung forever. Quit and then ran again from Terminal to see if anything was logged and ran into the same hang. Here is the relevant output:

  Create kernel details list
  Get vmlinuz version details
    Get vmlinuz version from file name..... /home/pico/Documents/Linux Mint 19.1
                                            Cinnamon with Updates/squashfs-
                                            root/boot/vmlinuz-4.15.0-48-generic
    The vmlinuz version is................. 4.15.0-48
  Search kernel details list for matching version
    • Kernel version....................... 4.15.0-48
    • Kernel version as integers........... (4, 15, 0, 48)
    • Vmlinuz filename..................... vmlinuz-4.15.0-48-generic
    • Directory............................ /home/pico/Documents/Linux Mint 19.1
                                            Cinnamon with Updates/squashfs-
                                            root/boot
    • Matching kernel version found?....... No
  Add new kernel details
    • Index................................ 0 of 0
    • Kernel version....................... 4.15.0-48
    • Kernel version as integers........... (4, 15, 0, 48)
    • Vmlinuz filename..................... vmlinuz-4.15.0-48-generic
    • Initrd filename...................... None
    • Directory............................ /home/pico/Documents/Linux Mint 19.1
                                            Cinnamon with Updates/squashfs-
                                            root/boot
  Get initrd version details
    Get initrd version from file name...... /home/pico/Documents/Linux Mint 19.1
                                            Cinnamon with Updates/squashfs-root/
                                            boot/initrd.img-4.15.0-20-generic
    The initrd version is.................. 4.15.0-20
  Search kernel details list for matching version
    • Kernel version....................... 4.15.0-20
    • Kernel version as integers........... (4, 15, 0, 20)
    • Initrd filename...................... initrd.img-4.15.0-20-generic
    • Directory............................ /home/pico/Documents/Linux Mint 19.1
                                            Cinnamon with Updates/squashfs-
                                            root/boot
    • Matching kernel version found?....... No
  Add new kernel details
    • Index................................ 1 of 1
    • Kernel version....................... 4.15.0-20
    • Kernel version as integers........... (4, 15, 0, 20)
    • Vmlinuz filename..................... None ...

Revision history for this message
Pico (picomitchell) wrote :

Thank you. Sorry I didn't file a new bug in the first place. I was juggling a few different things at once.

Please let me know if you need any new information or testing from me.

Revision history for this message
Cubic PPA (cubic-wizard) wrote : Re: [Bug 1829553] Re: Cubic crashes when transitioning to the Options page
Download full text (3.6 KiB)

If you don’t mind, would you please share the contents of /boot from INSIDE the chroot environment in Cubic?

Sent from my iPhone

> On May 17, 2019, at 3:07 PM, Pico <email address hidden> wrote:
>
> Thank you. Sorry I didn't file a new bug in the first place. I was
> juggling a few different things at once.
>
> Please let me know if you need any new information or testing from me.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1829553
>
> Title:
> Cubic crashes when transitioning to the Options page
>
> Status in Cubic:
> New
>
> Bug description:
> This Bug was reported on closed Bug #1827157.
>
> I'm creating a new bug report to track and fix this bug.
>
> Here are the original comments...
>
> Just updated and tried to update my existing project. When I click
> Next out of Chroot, cubic hung forever. Quit and then ran again from
> Terminal to see if anything was logged and ran into the same hang.
> Here is the relevant output:
>
> Create kernel details list
> Get vmlinuz version details
> Get vmlinuz version from file name..... /home/pico/Documents/Linux Mint 19.1
> Cinnamon with Updates/squashfs-
> root/boot/vmlinuz-4.15.0-48-generic
> The vmlinuz version is................. 4.15.0-48
> Search kernel details list for matching version
> • Kernel version....................... 4.15.0-48
> • Kernel version as integers........... (4, 15, 0, 48)
> • Vmlinuz filename..................... vmlinuz-4.15.0-48-generic
> • Directory............................ /home/pico/Documents/Linux Mint 19.1
> Cinnamon with Updates/squashfs-
> root/boot
> • Matching kernel version found?....... No
> Add new kernel details
> • Index................................ 0 of 0
> • Kernel version....................... 4.15.0-48
> • Kernel version as integers........... (4, 15, 0, 48)
> • Vmlinuz filename..................... vmlinuz-4.15.0-48-generic
> • Initrd filename...................... None
> • Directory............................ /home/pico/Documents/Linux Mint 19.1
> Cinnamon with Updates/squashfs-
> root/boot
> Get initrd version details
> Get initrd version from file name...... /home/pico/Documents/Linux Mint 19.1
> Cinnamon with Updates/squashfs-root/
> boot/initrd.img-4.15.0-20-generic
> The initrd version is.................. 4.15.0-20
> Search kernel details list for matching version
> • Kernel version....................... 4.15.0-20
> • Kernel version as integers........... (4, 15, 0, 20)
> • Initrd filename...................... initrd.img-4.15.0-20-generic
> • Directory............................ /home/pico/Documents/Linux Mint 19.1
> Cinnamon with Updates/squashfs-
> ...

Read more...

Revision history for this message
Pico (picomitchell) wrote :

Of course, here you go:

ls /boot
abi-4.15.0-20-generic initrd.img-4.15.0-48-generic System.map-4.15.0-20-generic
config-4.15.0-20-generic memtest86+.bin System.map-4.15.0-48-generic
config-4.15.0-48-generic memtest86+.elf vmlinuz-4.15.0-48-generic
grub memtest86+_multiboot.bin
initrd.img-4.15.0-20-generic retpoline-4.15.0-20-generic

Revision history for this message
Cubic PPA (cubic-wizard) wrote :
Download full text (13.3 KiB)

For reference, here is the output that was attached to Bug #1827157.

It looks like the issue is near /usr/share/cubic/utilities.py", line 2089, in create_kernel_details_list, where an argument must be str or bytes, not 'NoneType'.

----------------------------------------------------

Just updated and tried to update my existing project. When I click Next out of Chroot, cubic hung forever. Quit and then ran again from Terminal to see if anything was logged and ran into the same hang. Here is the relevant output:

  Create kernel details list
  Get vmlinuz version details
    Get vmlinuz version from file name..... /home/pico/Documents/Linux Mint 19.1
                                            Cinnamon with Updates/squashfs-
                                            root/boot/vmlinuz-4.15.0-48-generic
    The vmlinuz version is................. 4.15.0-48
  Search kernel details list for matching version
    • Kernel version....................... 4.15.0-48
    • Kernel version as integers........... (4, 15, 0, 48)
    • Vmlinuz filename..................... vmlinuz-4.15.0-48-generic
    • Directory............................ /home/pico/Documents/Linux Mint 19.1
                                            Cinnamon with Updates/squashfs-
                                            root/boot
    • Matching kernel version found?....... No
  Add new kernel details
    • Index................................ 0 of 0
    • Kernel version....................... 4.15.0-48
    • Kernel version as integers........... (4, 15, 0, 48)
    • Vmlinuz filename..................... vmlinuz-4.15.0-48-generic
    • Initrd filename...................... None
    • Directory............................ /home/pico/Documents/Linux Mint 19.1
                                            Cinnamon with Updates/squashfs-
                                            root/boot
  Get initrd version details
    Get initrd version from file name...... /home/pico/Documents/Linux Mint 19.1
                                            Cinnamon with Updates/squashfs-root/
                                            boot/initrd.img-4.15.0-20-generic
    The initrd version is.................. 4.15.0-20
  Search kernel details list for matching version
    • Kernel version....................... 4.15.0-20
    • Kernel version as integers........... (4, 15, 0, 20)
    • Initrd filename...................... initrd.img-4.15.0-20-generic
    • Directory............................ /home/pico/Documents/Linux Mint 19.1
                                            Cinnamon with Updates/squashfs-
                                            root/boot
    • Matching kernel version found?....... No
  Add new kernel details
    • Index....

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

SUMMARY
-------

To generate the list of available Kernels in Cubic, matching versions of both vmlinuz and initrd MUST be available.

There is a typo in the code so that the matching version of initrd is not checked correctly.

DETAILS
-------

In the function create_kernel_details_list() in utilities.py , kernel_details element #2 represents vmlinuz, and kernel_details element #4 represents initrd.

Line 2058 (in the function create_kernel_details_list() in utilities.py) should filter this list of kernels to include only kernels where BOTH vmlinuz and initrd are available.

However, this line erroneously checks vmlinuz twice:

    if kernel_details[2] and kernel_details[2]

Notice that element #2 (vmlinuz) is incorrectly repeated twice.

This misses checking for a valid initrd. As a result, kernels that are missing a matching initrd version may be included in the final list of valid kernels. In these cases, kernels will have initrd = `None`.

Ultimately, line 2089 tries to create the full path to an initrd file:

    initrd_filepath = os.path.join(directory, initrd_filename)

If initrd is `None`, due to the typo on line # 2058, an exception will result while creating the full path to the initrd file.

To avoid this issue, line 2058 should check BOTH vmliniz AND initrd:

    if kernel_details[2] and kernel_details[4]

Notice that element #2 (vmlinuz) and element #4 (initrd) are checked in the corrected version of this line.

Cubic PPA (cubic-wizard)
Changed in cubic:
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Cubic PPA (cubic-wizard)
Revision history for this message
Cubic PPA (cubic-wizard) wrote :

(1)
I've released a fix to the *Development* branch.

If you have some time, please test the fix for this issue in the *Development* branch, and let me know if it resolves your problem?

    # Remove Cubic
    $ sudo apt autoremove --purge cubic

    # Remove the *Release* repository
    $ sudo apt-add-repository --remove ppa:cubic-wizard/release

    # Add the *Development* repository
    $ sudo add-apt-repository ppa:cubic-wizard/development

    # Install the *Development* version of Cubic
    $ sudo apt update
    $ sudo apt install cubic

(2)
Regarding the "cubic hung forever" issue you reported, I've opened Bug #1829593 to modify Cubic to provide better feedback during the long transition to the Options tab.

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

The development version should be...

$ dpkg -l cubic

    2019.05-205-development

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Just tested Cubic version 2019.05-205-development with linuxmint-19.1-cinnamon-64bit.iso.

Still NOT working.

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Fixed in **Release** branch, version 2019.05-56-release.

(Also fixed in trunk branch, version 2019.05-206-development).

Changed in cubic:
status: In Progress → Fix Released
Revision history for this message
Pico (picomitchell) wrote :

Awesome!

Thanks so much for the super quick fix!

I'm looking forward to upgrading when I get back to my work computer on Monday!

Revision history for this message
Pico (picomitchell) wrote :

Just confirmed that the latest version of Cubic properly loads the Options screen :-)

Thanks again!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers