Skip to content

Failure to open pty followed by panic #18

@bogmihdav

Description

@bogmihdav

Hi, I came across ugdb while looking for a better alternative to gdb's builtin TUI, so I'm grateful that an alternative exists. Unfortunately, I cannot run ugdb, as it panics with the message "Could not create pty.". The log file saved in /tmp is empty, so I'm going to post a bit of an strace instead. Is it possible to implement a fix or workaround? Other TUI programs like vim work well in the same environment.

A quick google search suggested that it might have to do with devpts (most of it went over my head though), so here's the mount as well:

$ mount | grep devpts
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)

Strace:

open("/dev/ptmx", O_RDWR)               = 4
statfs("/dev/pts", {f_type=DEVPTS_SUPER_MAGIC, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_NOSUID|ST_NOEXEC|ST_RELATIME}) = 0
ioctl(4, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(4, TIOCGPTN, [2])                 = 0
stat("/dev/pts/2", {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 2), ...}) = 0
getuid()                                = 62277248
socket(AF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 5
connect(5, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = 0
sendto(5, "\2\0\0\0\f\0\0\0\6\0\0\0group\0", 18, MSG_NOSIGNAL, NULL, 0) = 18
poll([{fd=5, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=5, revents=POLLIN}])
recvmsg(5, {msg_name(0)=NULL, msg_iov(2)=[{"group\0", 6}, {"\310O\3\0\0\0\0\0", 8}], msg_controllen=20, [{cmsg_len=20, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, [6]}], msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 14
mmap(NULL, 217032, PROT_READ, MAP_SHARED, 6, 0) = 0x7fc93c6ef000
close(6)                                = 0
close(5)                                = 0
chown("/dev/pts/2", 62277248, 5)        = -1 EPERM (Operation not permitted)
write(1, "\33[?1049l\33[?25h\n", 15�[?1049l�[?25h
)    = 15
ioctl(0, SNDCTL_TMR_START or TCSETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
write(1, "Oh no! ugdb crashed!\n", 21Oh no! ugdb crashed!
)  = 21

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions