Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 127411
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Heinrich Wendel (RETIRED) <lanius@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Sasha Polonsky <apl@env.kiev.ua>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
mc.png Screenshot image/png Sasha Polonsky 2006-03-27 02:21 0000 23.77 KB Details
mc-open-nonblock.diff mc-open-nonblock.diff patch Michael Hanselmann (hansmi) (RETIRED) 2006-04-03 12:33 0000 827 bytes Details | Diff
mc-serial-strace.log strace log for mc on a serial console text/plain Sasha Polonsky 2006-04-04 05:13 0000 9.60 KB Details
screen-serial-strace.log strace log for screen on a serial console text/plain Sasha Polonsky 2006-04-04 05:13 0000 87.47 KB Details
cu-log.txt shell log with stty settings text/plain Sasha Polonsky 2006-04-04 05:14 0000 1.43 KB Details
screen-strace.log strace -ff log for screen on a serial console text/plain Sasha Polonsky 2006-04-06 02:09 0000 87.45 KB Details
screen-strace.log.341 strange second strace -ff log for screen on a serial console text/plain Sasha Polonsky 2006-04-06 02:11 0000 205 bytes Details
mc-4.6.1-nonblock.patch mc-4.6.1-nonblock.patch patch Emanuele Giaquinta (RETIRED) 2006-04-30 12:02 0000 394 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 127411 depends on: Show dependency tree
Bug 127411 blocks: 122768
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-03-24 05:04 0000
I run a server with serial console on COM1 (/dev/ttyS0) at 115200bps.
Everything
seems to be all right, but when I try to run screen or mc, it hangs and I
should
ssh to the server and kill it. I tried a lot of TERM and stty settings, but
still cannot get screen and mc work. This server has dual-boot Gentoo Linux /
FreeBSD 5.4, and in FreeBSD screen and mc on serial console work well.
I attach /boot/grub/grub.conf, /etc/inittab and output of emerge --info

f1 ~ # cat /boot/grub/grub.conf
timeout 3
default 0
#color green/black light-green/black
serial --unit=0 --speed=115200
terminal --timeout=3 serial console

title  Gentoo Linux
root   (hd0,1)
kernel /boot/kernel-2.6.16 root=/dev/hda2 ro console=ttyS0,115200
#kernel /boot/kernel-2.6.16 root=/dev/hda2 ro vga=0x0F06

title FreeBSD 5.4
root (hd0,2,a)
kernel /boot/loader

f1 ~ # cat /etc/inittab
#
# /etc/inittab:  This file describes how the INIT process should set up
#                the system in a certain run-level.
#
# Author:  Miquel van Smoorenburg, <miquels@cistron.nl>
# Modified by:  Patrick J. Volkerding, <volkerdi@ftp.cdrom.com>
# Modified by:  Daniel Robbins, <drobbins@gentoo.org>
# Modified by:  Martin Schlemmer, <azarah@gentoo.org>
#
# $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/files/inittab,v 1.5
2005/12/22 02:03:23 vapier Exp $

# Default runlevel.
id:3:initdefault:

# System initialization, mount local filesystems, etc.
si::sysinit:/sbin/rc sysinit
# Further system initialization, brings up the boot runlevel.
rc::bootwait:/sbin/rc boot

l0:0:wait:/sbin/rc shutdown
l1:S1:wait:/sbin/rc single
l2:2:wait:/sbin/rc nonetwork
l3:3:wait:/sbin/rc default
l4:4:wait:/sbin/rc default
l5:5:wait:/sbin/rc default
l6:6:wait:/sbin/rc reboot
#z6:6:respawn:/sbin/sulogin

# TERMINALS
c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c2:2345:respawn:/sbin/agetty 38400 tty2 linux
#c3:2345:respawn:/sbin/agetty 38400 tty3 linux
#c4:2345:respawn:/sbin/agetty 38400 tty4 linux
#c5:2345:respawn:/sbin/agetty 38400 tty5 linux
#c6:2345:respawn:/sbin/agetty 38400 tty6 linux

# SERIAL CONSOLES
s0:12345:respawn:/sbin/agetty 115200 ttyS0 vt100
#s1:12345:respawn:/sbin/agetty 9600 ttyS1 vt100

# What to do at the "Three Finger Salute".
ca:12345:ctrlaltdel:/sbin/shutdown -r now

# Used by /etc/init.d/xdm to control DM startup.
# Read the comments in /etc/init.d/xdm for more
# info. Do NOT remove, as this will start nothing
# extra at boot if /etc/init.d/xdm is not added
# to the "default" runlevel.
x:a:once:/etc/X11/startDM.sh


f1 ~ # emerge --info
Portage 2.0.54 (default-linux/x86/2006.0, gcc-3.4.5, glibc-2.3.5-r2, 2.6.16
i686)
=================================================================
System uname: 2.6.16 i686 AMD Duron(tm) processor
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i386-pc-linux-gnu"
CFLAGS="-O3 -march=athlon -pipe"
CHOST="i386-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -march=athlon -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 berkdb bzip2 cli crypt ctype dba elibc_glibc fastbuild
force-cgi-redirect ftp idn java kernel_linux libwww memlimit ncurses pam perl
posix python readline session simplexml soap sockets spl ssl tcpd tokenizer
udev userland_GNU userlocales xsl zlib"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

------- Comment #1 From Sven Blumenstein (RETIRED) 2006-03-25 03:42:11 0000 -------
I can confirm this on Sparc64 (Sun Ultra 2) using TeraTermPro from Windows or
Minicom from another Sparc. Although I dont have to kill the mc process as I
can still cancel this one with ctrl-c. But for the screen process I have to
kill it or close/reopen the serial connection.

------- Comment #2 From Jakub Moc (RETIRED) 2006-03-25 03:54:31 0000 -------
Can you try to recompile mc with USE="-ncurses" and tell us if it helps?

------- Comment #3 From Jakub Moc (RETIRED) 2006-03-25 12:07:48 0000 -------
See above and post back. Thanks.

------- Comment #4 From Sasha Polonsky 2006-03-27 02:21:41 0000 -------
Created an attachment (id=83219) [details]
Screenshot

So the serial console looks like. Mc should not be killed in ssh session, it
can be stopped with Ctrl-C, but still does not work

------- Comment #5 From Sasha Polonsky 2006-03-27 02:23:24 0000 -------
I have recompiled mc with USE="-ncurses" and it does not help (see screenshot).
I also need working screen.

------- Comment #6 From Jakub Moc (RETIRED) 2006-03-30 03:02:23 0000 -------
OK, this apparently doesn't move anywhere, no idea what's causing this problem.
Attach some debugging info (like strace) and reopen then.

http://www.gentoo.org/doc/en/bugzilla-howto.xml#doc_chap3

------- Comment #7 From Michael Hanselmann (hansmi) (RETIRED) 2006-04-03 12:33:29 0000 -------
Created an attachment (id=83835) [details]
mc-open-nonblock.diff

Can you please test this patch? I've no idea what other implications it has
except that mc starts over a real serial console (with the DCD line
implemented).

------- Comment #8 From Michael Hanselmann (hansmi) (RETIRED) 2006-04-03 12:33:48 0000 -------
Reopen

------- Comment #9 From Sasha Polonsky 2006-04-04 05:13:21 0000 -------
Created an attachment (id=83882) [details]
strace log for mc on a serial console

------- Comment #10 From Sasha Polonsky 2006-04-04 05:13:49 0000 -------
Created an attachment (id=83884) [details]
strace log for screen on a serial console

------- Comment #11 From Sasha Polonsky 2006-04-04 05:14:20 0000 -------
Created an attachment (id=83886) [details]
shell log with stty settings

------- Comment #12 From Michael Hanselmann (hansmi) (RETIRED) 2006-04-04 11:48:23 0000 -------
I'm really wondering what I should do with those logs 

------- Comment #13 From Michael Hanselmann (hansmi) (RETIRED) 2006-04-04 11:48:23 0000 -------
I'm really wondering what I should do with those logs …

Can you please submit the output files of "strace -ff -o mc-strace mc"? And
does it work after applying the patch?

------- Comment #14 From Sasha Polonsky 2006-04-06 02:04:03 0000 -------
Yes, after applying the patch mc started to work on a serial console. I have
also tested it in ssh and telnet sessions and it worked there too. But I cannot
test mc on a virtual console right now because that machine has no monitor and
keyboard attached and this is a server used in a project, so it should be
always up.

Screen still does not work. I will upload it's strace -ff log today.

------- Comment #15 From Sasha Polonsky 2006-04-06 02:09:11 0000 -------
Created an attachment (id=84054) [details]
strace -ff log for screen on a serial console

------- Comment #16 From Sasha Polonsky 2006-04-06 02:11:41 0000 -------
Created an attachment (id=84055) [details]
strange second strace -ff log for screen on a serial console

I have also noticed that on a serial console screen gives the error message
Directory '/var/run/screen' must have mode 777.,
and after chmod 777 /var/run/screen it gives the message
Directory '/var/run/screen' must have mode 775. in ssh session, so I should run
chmod 777 /var/run/screen.

------- Comment #17 From Michael Hanselmann (hansmi) (RETIRED) 2006-04-06 14:54:46 0000 -------
The maintainer of the screen ebuild will check in the patch not long from now.
Please wait until then.

------- Comment #18 From Michael Hanselmann (hansmi) (RETIRED) 2006-04-26 11:27:05 0000 -------
Any information on this?

------- Comment #19 From Sasha Polonsky 2006-04-27 01:43:50 0000 -------
I didn't understand what you mean. The maintainer of screen has not contacted
me. I emerge --sync'ed yesterday and saw that mc was updated to version 4.6.1,
and it also does not work on a serial console and your patch does not work with
this version. So on a machine with a serial console I used to emerge
"=app-misc/mc-4.6.0" with your patch applied manually.

------- Comment #20 From Michael Hanselmann (hansmi) (RETIRED) 2006-04-30 04:54:27 0000 -------
Lanius: Please use the attached patch for screen.

------- Comment #21 From Jakub Moc (RETIRED) 2006-04-30 05:27:28 0000 -------
(In reply to comment #19)
> Lanius: Please use the attached patch for screen.

Good luck w/ lanius. ;) exg, can you perhaps revbump mc w/ this patch?

------- Comment #22 From Emanuele Giaquinta (RETIRED) 2006-04-30 12:02:23 0000 -------
Created an attachment (id=85846) [details]
mc-4.6.1-nonblock.patch

Can you please verify that mc-4.6.1 works with this patch?

------- Comment #23 From Sasha Polonsky 2006-05-03 07:01:42 0000 -------
Yes, the patch for mc 4.6.1 works. The only thing left is to add this patch to
portage. BTW, what attached patch for screen do you mean? I cannot find it.

------- Comment #24 From Emanuele Giaquinta (RETIRED) 2006-05-03 07:48:20 0000 -------
fixed in mc-4.6.1-r1.ebuild.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug