Crash with error 'out of pty devices' after recent upgrade

Bug #1778578 reported by bladeofholyangel
40
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Cubic
Fix Released
Critical
Cubic PPA
Classic-development
Fix Released
Critical
Cubic PPA
Release-2018-07-34
Fix Released
Critical
Cubic PPA

Bug Description

    The tracekback is...................... Traceback (most recent call last):
                                            File
                                            "/usr/share/cubic/transition.py",
                                            line 95, in run self.action()
                                            File
                                            "/usr/share/cubic/transition.py",
                                            line 339, in action self) File
                                            "/usr/share/cubic/transitions.py",
                                            line 1612, in transition__from__exis
                                            ting_project_page__to__terminal_page
                                            utilities.prepare_chroot_environment
                                            (thread) File
                                            "/usr/share/cubic/utilities.py",
                                            line 1233, in
                                            prepare_chroot_environment
                                            result, error =
                                            execute_synchronous(command, thread)
                                            File
                                            "/usr/share/cubic/utilities.py",
                                            line 90, in execute_synchronous
                                            process = pexpect.spawnu(command,
                                            cwd=working_directory) File
                                            "/usr/lib/python3/dist-
                                            packages/pexpect/pty_spawn.py", line
                                            806, in spawnu return
                                            spawn(*args, **kwargs) File
                                            "/usr/lib/python3/dist-
                                            packages/pexpect/pty_spawn.py", line
                                            197, in __init__
                                            self._spawn(command, args,
                                            preexec_fn, dimensions) File
                                            "/usr/lib/python3/dist-
                                            packages/pexpect/pty_spawn.py", line
                                            297, in _spawn cwd=self.cwd,
                                            **kwargs) File
                                            "/usr/lib/python3/dist-
                                            packages/pexpect/pty_spawn.py", line
                                            308, in _spawnpty return
                                            ptyprocess.PtyProcess.spawn(args,
                                            **kwargs) File
                                            "/usr/lib/python3/dist-
                                            packages/ptyprocess/ptyprocess.py",
                                            line 222, in spawn pid, fd =
                                            pty.fork() File
                                            "/usr/lib/python3.6/pty.py", line
                                            96, in fork master_fd, slave_fd
                                            = openpty() File
                                            "/usr/lib/python3.6/pty.py", line
                                            29, in openpty master_fd,
                                            slave_name = _open_terminal() File
                                            "/usr/lib/python3.6/pty.py", line
                                            59, in _open_terminal raise
                                            OSError('out of pty devices')
                                            OSError: out of pty devices
    Finished running thread with id........ 139948176664320

any advice? doing a 32bit system on 64bit host. it worked before without problems...

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

When you are 'out of pty devices', you will need to restart your host system. (You probably already figured that out).

Are you consistently experiencing this issue, or does it only happen sometimes?

So I can try to recreate this issue...
- What is the 64 bit system you are running?
- What is the 32 bit ISO you are customizing?

Changed in cubic:
assignee: nobody → Cubic PPA (cubic-wizard)
Revision history for this message
bladeofholyangel (shoferek) wrote :

1) well, sending it here after few restarts and reinstalls does not have any affect.

2) using classic ubuntu 18.04 64bit. well, i have several systems in cubic. now i will remove folder in my system and try again, but i cannot restart right now...

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

OK, thanks.
I'll try to reproduce on my end.

Revision history for this message
Jim Narey (jimnarey) wrote :

I had this problem appear quite suddenly using Ubuntu 18.04 and Cubic revision 28. I had been using Cubic intensively for several days, working on iterations of a Live ISO for the Lenovo Yoga Book.

I ran a an apt-get upgrade followed by apt-get dist-upgrade and immediately ran into this problem trying to open one of my previous ISOs. I tried a stock Ubuntu ISO and a project directory from a previous (successful) iteration with the same result.

To get Cubic to work at all I have had to go back to Ubuntu 16.04 (in a VM). It works with all packages fully updated.

Interestingly, this setup creates an ISO which Etcher on the Mac says does not have a partition table and is not bootable. It boots in a VM but not when flashed to a USB. If I flash it using Rufus in Windows, which copies the ISO file-by-file rather than bit-by-bit and then has its own process for making the USB bootable, it boots fine.

Revision history for this message
Jim Narey (jimnarey) wrote :

I have managed to narrow this down a bit.

I installed a fresh 18.04 VM. I installed Cubic revision 28 from a .deb I built from the source and ran apt-get --fix-broken install to sort out the dependencies. Cubic successfully went to the chroot from an Xubuntu 16.04 ISO.

I ran apt-get upgrade and tried the same again and encountered the problem (a hang with spinning circle and no transition to the chroot).

These were the dependencies installed to satisfy Cubic:

The following additional packages will be installed:
  libburn4 libisoburn1 libisofs6 libjte1 libpython-stdlib libvte-common libvte9 python python-cairo
  python-gobject-2 python-gtk2 python-minimal python-vte python2.7 python2.7-minimal xorriso
Suggested packages:
  python-doc python-tk python-gobject-2-dbg python-gtk2-doc python2.7-doc binfmt-support jigit cdck
The following NEW packages will be installed
  libburn4 libisoburn1 libisofs6 libjte1 libpython-stdlib libvte-common libvte9 python python-cairo
  python-gobject-2 python-gtk2 python-minimal python-vte python2.7 python2.7-minimal xorriso

The packages installed as a result of apt-get upgrade are listed here: https://pastebin.com/6jvpm1b2

So I'm not using a fresh 18.04 VM with ssh, Cubic and its dependencies installed and nothing else which is working fine.

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

Jim,

In your comment above, I noticed that python2.7 is a suggested package.
In your pastebin link, I see that python3 is referenced.

Could you verify which version of python you are using?

(I am only asking because in another other bug, #1778840, it looks like someone was trying to run cubic using Python 2).

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

Folks,

I'm focusing on fixing the error 'out of pty devices' in the original bug report.

Cubic may not be mounting /dev/pts properly (or unmounting them properly when you exit the chroot environment). In either case, you would run into the 'out of pty devices' which may freeze cubic or cause your entire system to go "haywire".

Jim,

I believe you are using an older revision (#28) because you are having issues generating a bootable ISO using the most recent revision (#32). Is this true? If there is another reason, please let me know?

My goal would be to fix all bugs in the most recent revision, so everyone can use the latest, for all release of official Ubuntu-based distros from 14.04 onward.

Changed in cubic:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Jim Narey (jimnarey) wrote :

Hi,

python -V gives 2.7.15

python3 -V gives 3.6.5 and is at /usr/bin/python3 as per the !# line in /usr/share/cubic/cubic.py. So I don't think there's any reason to think it's running with Python 2. Perhaps one of Cubic's dependencies needs Python 2?

I'm using rev 28 in part because it lets you choose the kernel but also, with the latest version (and the dev version you pointed me to) the ISOs would not boot whether I tried to change the kernel or not. They would get to the GRUB menu (in EFI mode) or the GUI with Try Xubuntu/Install Xubuntu under BIOS mode but then go to a black screen and hang, whatever was chosen.

I haven't had much luck with changing the capser/ kernel in any version of Cubic. I've had mixed success with manually changing it and using mkisofs to build the ISO. Whether or not ISOs boot successfully like this seems to depend on a combination of the 'host' major version, the chroot major version, kernel versions, whether an EFI host is used and possibly more.

Thanks.

Cubic PPA (cubic-wizard)
summary: - crash after recent upgrade
+ crash with error 'out of pty devices' after recent upgrade
Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Jim,

I've opened Bug #1779008 to track and fix the issues you are having with selecting a kernel and generating an ISO that boots. Please feel free to edit that bug description and add any additional information as it becomes available.

Cubic PPA (cubic-wizard)
summary: - crash with error 'out of pty devices' after recent upgrade
+ Crash with error 'out of pty devices' after recent upgrade
Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Install release version 2018.07-33 for bug fixes.

Changed in cubic:
status: Confirmed → Fix Committed
importance: High → Critical
Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Note: fix released in trunk revision # 143, and release revision # 33.

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

Duplicates of this bug

Other bug subscribers

Related questions