Getty spamming log file and breaking my 3G modem connection



  • In recent (Nov. 13, Dec 14) nanoBSD builds installed on ALIX I'm getting these logs (below) and my 3G connection gets interrupted randomly and the modem is thrown into an un-usable state.

    It's a Sierra C885. Normally it shows a solid blue LED and a solid orange LED when connected properly, but it gets into a state where the orange LED is off and the normally blue LED is blinking orange. It's clearly confused, and I only suspect the getty logs are related.

    What is causing these log entries and how can I get it to stop?

    Dec 16 11:19:14 init: getty repeating too quickly on port /dev/console, sleeping 30 secs
    Dec 16 11:19:14 init: getty repeating too quickly on port /dev/console, sleeping 30 secs
    Dec 16 11:19:14 getty[25347]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:19:14 getty[25347]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:19:14 getty[25347]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[25347]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[25347]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[25347]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[25347]: getty: unknown gettytab entry 'default'
    Dec 16 11:19:14 getty[25347]: getty: unknown gettytab entry 'default'
    Dec 16 11:19:14 getty[25037]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:19:14 getty[25037]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:19:14 getty[25037]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[25037]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[25037]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[25037]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[25037]: getty: unknown gettytab entry 'default'
    Dec 16 11:19:14 getty[25037]: getty: unknown gettytab entry 'default'
    Dec 16 11:19:14 getty[24823]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:19:14 getty[24823]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:19:14 getty[24823]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[24823]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[24823]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[24823]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[24823]: getty: unknown gettytab entry 'default'
    Dec 16 11:19:14 getty[24823]: getty: unknown gettytab entry 'default'
    Dec 16 11:19:14 getty[24566]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:19:14 getty[24566]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:19:14 getty[24566]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[24566]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[24566]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[24566]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[24566]: getty: unknown gettytab entry 'default'
    Dec 16 11:19:14 getty[24566]: getty: unknown gettytab entry 'default'
    Dec 16 11:19:14 getty[7537]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:19:14 getty[7537]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:19:14 getty[7537]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[7537]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[7537]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[7537]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:19:14 getty[7537]: getty: unknown gettytab entry 'default'
    Dec 16 11:19:14 getty[7537]: getty: unknown gettytab entry 'default'
    Dec 16 11:18:44 init: getty repeating too quickly on port /dev/console, sleeping 30 secs
    Dec 16 11:18:44 init: getty repeating too quickly on port /dev/console, sleeping 30 secs
    Dec 16 11:18:44 getty[7296]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:18:44 getty[7296]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:18:44 getty[7296]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:44 getty[7296]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:44 getty[7296]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:44 getty[7296]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:44 getty[7296]: getty: unknown gettytab entry 'default'
    Dec 16 11:18:44 getty[7296]: getty: unknown gettytab entry 'default'
    Dec 16 11:18:44 getty[7074]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:18:44 getty[7074]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:18:44 getty[7074]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:44 getty[7074]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:44 getty[7074]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:44 getty[7074]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:44 getty[7074]: getty: unknown gettytab entry 'default'
    Dec 16 11:18:44 getty[7074]: getty: unknown gettytab entry 'default'
    Dec 16 11:18:44 getty[6948]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:18:44 getty[6948]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:18:43 getty[6948]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:43 getty[6948]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:43 getty[6948]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:43 getty[6948]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:43 getty[6948]: getty: unknown gettytab entry 'default'
    Dec 16 11:18:43 getty[6948]: getty: unknown gettytab entry 'default'
    Dec 16 11:18:43 getty[6614]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:18:43 getty[6614]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:18:43 getty[6614]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:43 getty[6614]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:43 getty[6614]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:43 getty[6614]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:43 getty[6614]: getty: unknown gettytab entry 'default'
    Dec 16 11:18:43 getty[6614]: getty: unknown gettytab entry 'default'
    Dec 16 11:18:43 getty[6464]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:18:43 getty[6464]: tcsetattr /dev/console: Operation not supported
    Dec 16 11:18:43 getty[6464]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:43 getty[6464]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:43 getty[6464]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:43 getty[6464]: getty: unknown gettytab entry 'Pc'
    Dec 16 11:18:43 getty[6464]: getty: unknown gettytab entry 'default'
    Dec 16 11:18:43 getty[6464]: getty: unknown gettytab entry 'default'



  • If you replace /etc/gettytab that should fix that log, pretty sure that's the file, somehow it gets hosed on rare occasions and triggers what you're seeing there. Whether that's related to the 3G modem I'm not sure.



  • Well, the /etc/gettytab file is empty. I guess that's why the log is complaining about . . .

    getty: unknown gettytab entry 'Pc'
    getty: unknown gettytab entry 'default'

    because there's nothing in the gettytab file. I guess that's why you said replace it.

    And this?
    tcsetattr /dev/console: Operation not supported

    is something in pfsense trying to perform this unsupported operation?

    Thanks,
    G



  • Here's what I put in /etc/gettytab to get getty to start successfully again and stop sending those log messages.

    default:
            :cb:ce:ck:lc:fd#1000:im=\r\n%s/%m (%h) (%t)\r\n\r\n:sp#1200:
            :if=/etc/issue:

    P|Pc|Pc console:
            :ht:np:sp#9600:

    from here:
    http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/etc/gettytab?rev=1.17.2.4



  • In /etc/rc GeekGod added (awhile back) a check for this:

    
    # Ensure gettytab is of a sane size
    if [ `/bin/ls -la /etc/gettytab | /usr/bin/awk '{ print $5'}` -lt 512 ]; then
        echo ">>> Restoring /etc/gettytab due to unusal size"
        echo ">>> Restoring /etc/gettytab due to unusal size" | /usr/bin/logger
        /bin/cp /etc/gettytab.bak /etc/gettytab
    fi
    
    

    Is your backup one also broken?



  • there is no "/etc/gettytab.bak" file in either of my two nanoBSD 2G installs.



  • Does your /etc/rc reference it at all?


  • Rebel Alliance Developer Netgate

    Looks like the gettytab.bak file is only made on the livecd and update files. On NanoBSD you could just mount the alt slice and copy it back:

    If you're on pfsense0 now (check via the mount command):

    /etc/rc.conf_mount_rw
    mount /dev/ufs/pfsense1 /mnt
    cp /mnt/etc/gettytab /etc/gettytab
    umount /mnt
    /etc/rc.conf_mount_ro
    

    If you're on pfsense1, just use pfsense0 on the mount command above.



  • @wagonza Yes, this is in /etc/rc

    if [ "$PLATFORM" = "nanobsd" ]; then
    …skipping...

    Ensure gettytab is of a sane size

    if [ /bin/ls -la /etc/gettytab | /usr/bin/awk '{ print $5'} -lt 512 ]; then
            echo ">>> Restoring /etc/gettytab due to unusal size"
            echo ">>> Restoring /etc/gettytab due to unusal size" | /usr/bin/logger
            /bin/cp /etc/gettytab.bak /etc/gettytab
    fi

    @ jimp, thanks, it's fixed already now, and my 3G problems went away mysteriously at the same time :)
    Lets get that gettytab.bak file on NanoBSD builds. Looks like GeekGod meant for it to be there.


Locked