I have a problem on my OpenWRT image.
Something is creating a huge amount of software tty's using procd:
{{"ACTION":"add","DEVPATH":"/devices/virtual/tty/ttyx6","SUBSYSTEM":"tty","SYNTH_UUID":"0","MAJOR":"3","MINOR":"134","DEVNAME
":"ttyx6","SEQNUM":"1744"}}
[ 54.791490] procd: Command: makedev
[ 54.795068] procd: /dev/ttyx6
[ 54.798175] procd: 0660
[ 54.800958] procd: dialout
[ 54.803818] procd: Message:
[ 54.806655] procd: ACTION=add
[ 54.809751] procd: DEVPATH=/devices/virtual/tty/ttyx6
[ 54.815070] procd: SUBSYSTEM=tty
[ 54.818443] procd: SYNTH_UUID=0
[ 54.821838] procd: MAJOR=3
[ 54.824691] procd: MINOR=134
[ 54.827705] procd: DEVNAME=ttyx6
[ 54.831178] procd: SEQNUM=1744
[ 54.834684] procd: Command: makedev
[ 54.838247] procd: /dev/ttyx6
[ 54.841549] procd: 0600
[ 54.844149] procd: Message:
[ 54.846992] procd: ACTION=add
[ 54.850231] procd: DEVPATH=/devices/virtual/tty/ttyx6
[ 54.855423] procd: SUBSYSTEM=tty
[ 54.858777] procd: SYNTH_UUID=0
[ 54.862171] procd: MAJOR=3
[ 54.865020] procd: MINOR=134
[ 54.868030] procd: DEVNAME=ttyx6
[ 54.871498] procd: SEQNUM=1744
This ranges from tty0, ttyf, ... , tty10, ... , tty1f, ... , ttyzf thus having a crazy amount (34*16) tty. The same with pty.
As far as I was able to debug this, the origin of this behavior is /dev/hotplug.json
:
"add": [
[ "if",
[ "and",
[ "has", "MAJOR" ],
[ "has", "MINOR" ]
],
[
[ "if",
[ "eq", "DEVNAME",
[ "null", "full", "ptmx", "zero", "tty", "net", "random", "urandom" ]
],
[
[ "makedev", "/dev/%DEVNAME%", "0666" ],
[ "return" ]
]
],
[ "if",
[ "regex", "DEVNAME", "^snd" ],
[ "makedev", "/dev/%DEVNAME%", "0660", "audio" ]
],
[ "if",
[ "regex", "DEVNAME", "^tty" ],
[ "makedev", "/dev/%DEVNAME%", "0660", "dialout" ]
],
[ "if",
[ "has", "DEVNAME" ],
[ "makedev", "/dev/%DEVNAME%", "0600" ]
]
]
],
[ "if",
[ "has", "FIRMWARE" ],
[
[ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ],
[ "load-firmware", "/lib/firmware" ],
[ "return" ]
]
],
[ "if",
[ "regex", "DEVNAME", "^ttyGS" ],
[ "start-console", "%DEVNAME%" ]
]
],
But if I remove the corresponding entry, the console stops working.
Is there any way to stop hotplug.json spamming this much ttys? It delays the init of netifd by up to 5 seconds!
Im using the mainline openwrt.