0

I am working on an embedded linux device, and the kernel has support for a USB serial console. You can log in fine, but when you type 'exit', the session is not exited, and you get stuck.

> exit

# The session hangs here forever

Hotplugging is enabled, so you can start a new session by removing and plugging the cable back in, but I don't want to do that every time I exit.

dmesg doesn't print anything useful after I type exit, so something is stuck.

I also tried attaching strace to getty, and it looks like it exited normally

)    = 1 ([{fd=0, revents=POLLIN}])
read(0, "\n", 1)                        = 1
write(1, "\n", 1)                       = 1
open("/root/.ash_history", O_WRONLY|O_CREAT|O_APPEND, 0600) = 3
_llseek(3, 0, [42052], SEEK_END)        = 0
write(3, "exit\n", 5)                   = 5
close(3)                                = 0
ioctl(0, SNDCTL_TMR_START or TCSETS, {B115200 opost isig icanon echo ...}) = 0
rt_sigaction(SIGWINCH, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0xb6dadd61}, NULL, 8) = 0
wait4(-1, 0xbee98a2c, WNOHANG|WSTOPPED, NULL) = -1 ECHILD (No child processes)
ioctl(10, TIOCSPGRP, [2578])            = 0
setpgid(0, 2578)                        = -1 EPERM (Operation not permitted)
close(10)                               = 0
exit_group(0)                           = ?
+++ exited with 0 +++

What is causing this session to hang forever?

Razorfoot
  • 397
  • 2
  • 16

0 Answers0