LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   [BUG] getty-ps crash (http://www.linuxquestions.org/questions/slackware-14/%5Bbug%5D-getty-ps-crash-4175479338/)

guanx 10-02-2013 09:28 AM

[BUG] getty-ps crash
 
The getty from getty-ps (not agetty) in slackware-current seem not working. It crashes instantly after login name is entered.
Code:

Welcome to Linux (tty6)

localhost login: root
*** Error in `/sbin/getty': munmap_chunk(): invalid pointer: 0x0804e073 ***
======= Backtrace: =========
/lib/libc.so.6(+0x77d4d)[0xb7617d4d]
/lib/libc.so.6(+0x17ba5)[0xb75b7ba5]
/sbin/getty[0x804b7c0]
/lib/libc.so.6(__libc_start_main+0xf3)[0xb75b97a3]
======= Memory map: ========
08048000-08050000 r-xp 00000000 08:01 1572998    /sbin/getty
08050000-08051000 rwxp 00007000 08:01 1572998    /sbin/getty
08051000-0805a000 rwxp 00000000 00:00 0
089cd000-089ee000 rwxp 00000000 00:00 0          [heap]
b759f000-b75a0000 rwxp 00000000 00:00 0
b75a0000-b7725000 r-xp 00000000 08:01 786513    /lib/libc-2.17.so
b7725000-b7727000 r-xp 00184000 08:01 786513    /lib/libc-2.17.so
b7727000-b7728000 rwxp 00186000 08:01 786513    /lib/libc-2.17.so
b7728000-b772b000 rwxp 00000000 00:00 0
b772b000-b772e000 r-xp 00000000 08:01 786439    /lib/libtermcap.so.2.0.8
b772e000-b772f000 rwxp 00002000 08:01 786439    /lib/libtermcap.so.2.0.8
b7744000-b775f000 r-xp 00000000 08:01 262257    /usr/lib/libgcc_s.so.1
b775f000-b7760000 rwxp 0001a000 08:01 262257    /usr/lib/libgcc_s.so.1
b7760000-b7762000 rwxp 00000000 00:00 0
b7762000-b7783000 r-xp 00000000 08:01 786557    /lib/ld-2.17.so
b7783000-b7784000 r-xp 00020000 08:01 786557    /lib/ld-2.17.so
b7784000-b7785000 rwxp 00021000 08:01 786557    /lib/ld-2.17.so
bfe25000-bfe46000 rwxp 00000000 00:00 0          [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
Welcome to Linux (tty6)

localhost login:


mancha 10-02-2013 06:36 PM

You are right. An error gets introduced via getty.bugfixes.diff.gz where under certain conditions it tries to free a string literal. I've uploaded
a corrected patch which you can just drop into your staging directory replacing the buggy patch and re-build. It should work after that.

--mancha

guanx 10-04-2013 11:31 AM

Thanks mancha! The crash is fixed.

There is still a problem -- After the first prompt of getty-ps I cannot use BackSpace. If I fail for the first login attempt and get the chance for a second try, I can do line editing with BackSpace for login name.

I don't know if this is a feature or a bug.

mancha 10-04-2013 02:06 PM

Quote:

Originally Posted by guanx (Post 5040090)
I don't know if this is a feature or a bug.

It's a tunable, so in that sense I guess it's a feature.

Give this patch a whirl.

Add patch -p1 < $CWD/getty_ps-2.1.0b-erase.diff to the SlackBuild right after the line cat $CWD/getty.bugfixes.diff | patch -p1 --verbose || exit.

--mancha

guanx 10-05-2013 08:41 PM

Thanks for the hint! This actually confirms that either Ctrl-H or BackSpace should work -- and Ctrl-H does work after a reboot.

Neither Ctrl-H nor BackSpace worked before reboot, most probably because I forgot to telinit q after my last modification to /etc/inittab.
So this was a false alarm.


All times are GMT -5. The time now is 05:57 PM.