[systemd-devel] systemd does not shutdown system, it is waiting for a serial tty to show up

David Herrmann dh.herrmann at gmail.com
Mon Mar 16 12:41:04 PDT 2015


On Mon, Mar 16, 2015 at 7:32 PM, Hans de Goede <hdegoede at redhat.com> wrote:
> Hi,
> On 16-03-15 18:12, David Herrmann wrote:
>> Hi Hans
>> On Mon, Mar 16, 2015 at 5:15 PM, Hans de Goede <hdegoede at redhat.com>
>> wrote:
>>> Hi,
>>> On some of the ARM boards I work on in my spare time I've
>>> done "systemctl enable getty at ttyGS0.service" to get a getty
>>> on the usb gadget serial port which I've configured on the
>>> devices otg controller.
>>> This serial port device node /dev/ttyGS0 shows up as soon
>>> as the gadget serial port driver loads, but is only usable
>>> when I plug in a the mini B end of a mini B -> A usb cable
>>> where the A end is plugged into an active usb host.
>>> "ps aux" shows something peculiar here, when I do "ps aux"
>>> before the cable is plugged in it shows "(agetty)" in
>>> the args column of the output, when I then plug in the
>>> cable the output changes to "/sbin/agetty --noclear ttyGS0 vt220"
>>> note this is the same process, as before the cable was plugged,
>>> I've a feeling that somehow the process is stuck halfway
>>> exec or some such ... ??
>> We rename the process to "(<file>)" directly after fork(). So if it is
>> still "(agetty)", something blocks before we can exec(). Can you run
>> strace to figure out what call blocks?
> strace -p<pid> says:
> write(3, "\33[r\33[H\33[2J", 10

Ok, this is vt_disallocate() running, which reminded me that you have
to use serial-getty at .service for serial ttys. getty at .service is only
for VTs. Can you check whether this solves your issues?


More information about the systemd-devel mailing list