Comment 47 for bug 632696

Revision history for this message
Ben Stanley (ben-stanley) wrote :

I had a similar problem, but the cause turned out to be different for me.

I had changed the GID of group tty from 5 to 11. I later found out that this contravenes the Ubuntu standard GID policy.

The symptom was similar to the above
chardev: opening backend "pty" failed: Exec format error

It turns out that "Exec format error" is the string given by errno=ENOEXEC.

After some investigation of my problem, it turns out that (in my case) the failure was occurring at
qemu-char.c:997 if (openpty(&master_fd, &slave_fd, pty_name, NULL, NULL) < 0) {

The call to openpty was failing because the directory /dev/pts had a gid of 11 instead of a gid of 5.
The error was issued because the directory /dev/pts did not have the appropriate exec permission to be able to create a new device file within it.

I changed around my GIDs to match the standard values, and that was enough to fix the problem (for me).

Note that /dev/pts is a MOUNTED filesystem of type devpts. The gid of the mount can be found by typing mount.
In my case, kvm fails when set as follows
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=11,mode=0620)
GOOD: kvm works:
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)

I acknowledge that this problem is a bit different from the subject of this bug, but this is the closest bug I found to my problem when I initially came across it.