--On Dienstag, Februar 07, 2006 17:26:55 +0100 Matthias Ferdinand
 <[EMAIL PROTECTED]> wrote:

--On Dienstag, Februar 07, 2006 06:42:43 +0100 Stefano Melchior
<[EMAIL PROTECTED]> wrote:
uml2> cat < /dev/pts/5 >> /dev/pts/9 & ; cat > /dev/pts/5 >> /dev/pts/9 &

can you please try it, using uml2 as a server/host and the other as the

Hi, now I tried with a new UML guest kernel:
guest: Debian sarge (2.6.15.4 + uml-2.6.15-bs2.patch,
          linked statically, also tried with dynamic linkage)
host:  SuSE9.0 (2.6.14.4 + skas3-v8.2), Intel P4

I can run getty on ttyS0 in the guest just fine with ssl0=pts.

Then I tried the following script that I named
"serialcomm" with various args for ssl0=... to the
guest kernel:
--
#!/bin/sh
stty -F /dev/ttyS0
while true; do
 echo hello >/dev/ttyS0
 echo "said hello"
 sleep 1
done
--

I have listed the results below, I'm sorry that it is
rather long.

Next, using ssl0=pts, I tried to connect the hosts /dev/ttyS0 to
/dev/pts/58 the guest used as ttyS0:
 cat </dev/pts/58 >>/dev/ttyS0 & cat </dev/ttyS0 >>/dev/pts/58 &
But I could not communicate with the modem using minicom, but
using cat probably does not propagate the ioctls to the host device,
which I guess is necessary to control the modem. Is this at all
possible?

I'd be grateful for any pointers.

Best regards
Matthias

=====================================================================


Summary:
--------------------------------------------------------------------
ssl0=pty             ! script runs, don't know how to connect to
                    !       pty on host (screen doesn't) :-)
ssl0=pts             ! script runs, can connect to pts using screen,
                    !       but guest crashes upon screen
                    !       disconnect (^a k)
ssl0=tty:/dev/ttyS0  ! guest hangs completely in "stty -F /dev/ttyS0"


Details:

ssl0=pty

uml:/home/admin# ./serialcomm
speed 38400 baud; line = 0;
-brkint -imaxbel
said hello
said hello
...
guest> Serial line 0 assigned device '/dev/ptys1'
host > # screen /dev/ptys1
host > Cannot open line '/dev/ptys1' for R/W: Eingabe-/Ausgabefehler
host > Sorry, could not find a PTY.
---------------------------------------------------------------------

ssl0=pts

uml:/home/admin# ./serialcomm
speed 38400 baud; line = 0;
-brkint -imaxbel
said hello
said hello
...

guest> Serial line 0 assigned device '/dev/pts/58'

host > screen /dev/pts/58
host > hello
host > hello
host > ...
host > ^ak  (screen kill window)
host > [screen is terminating]

guest> os_set_fd_async : failed to set O_ASYNC and O_NONBLOCK on fd # 48, errno = 9 guest> Kernel panic - not syncing: Kernel mode fault at addr 0x56e58961, ip 0x40128c83
guest>
guest> EIP: 0073:[<40128c83>] CPU: 0 Not tainted ESP: 007b:bfa1c1f4 EFLAGS: 00000206
guest>     Not tainted
guest> EAX: ffffffda EBX: 080ec428 ECX: 00008241 EDX: 000001b6
guest> ESI: 00008241 EDI: 4018e880 EBP: bfa1c208 DS: 007b ES: 007b
guest> 16863600:  [<0806a378>] show_regs+0xb4/0xb6
guest> 1686362c:  [<08059829>] panic_exit+0x25/0x3f
guest> 1686363c:  [<08079e5b>] notifier_call_chain+0x1c/0x3c
guest> 1686365c:  [<0806db5a>] panic+0x4b/0xd3
guest> 16863674:  [<08058f81>] segv+0x129/0x25c
guest> 16863738:  [<080592d5>] segv_handler+0x48/0x4a
guest> 16863758:  [<0805b9aa>] sig_handler_common_skas+0xa2/0xbd
guest> 1686377c:  [<08066727>] sig_handler+0xf/0x11
guest> 1686378c:  [<081fcb88>] __restore+0x0/0x8
guest> 16863a78:  [<0805d640>] line_open+0x71/0xd6
guest> 16863a98:  [<0805de1b>] ssl_open+0x15/0x17
guest> 16863aac:  [<0817e5f0>] tty_open+0x17e/0x310
guest> 16863b10:  [<080a8918>] chrdev_open+0xf8/0x115
guest> 16863b34:  [<080a07d6>] __dentry_open+0xb5/0x181
guest> 16863b50:  [<080a097b>] nameidata_to_filp+0x20/0x35
guest> 16863b70:  [<080a08d3>] filp_open+0x31/0x38
guest> 16863bd8:  [<080a0b36>] do_sys_open+0x3a/0xba
guest> 16863c00:  [<080a0bc7>] sys_open+0x11/0x13
guest> 16863c14:  [<0805b731>] handle_syscall+0x89/0xa0
guest> 16863c84:  [<0805a81a>] handle_trap+0xc1/0xc9
guest> 16863ca0:  [<0805aba8>] userspace+0x12d/0x177
guest> 16863cf8:  [<0805b418>] fork_handler+0xb0/0xb2
guest> 16863d1c:  [<081fcb88>] __restore+0x0/0x8
guest>
guest>  deactivate_all_fds failed, errno = 9

---------------------------------------------------------------------

ssl0=tty:/dev/ttyS0

uml:/home/admin# ./serialcomm
  [hangs, no more output after that]

no line "Serial line 0 assigned device..." in guest console ouput.

when attaching gdb to the parent process I get:

GNU gdb 5.3.92
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-suse-linux"...
Attaching to program: /var/uml/mferd/VM/debvw_sarge/linux-2.6.15.4-bs2mf, process 27169
0x082099cb in open64 () at swab.h:134
134     swab.h: Datei oder Verzeichnis nicht gefunden.
       in swab.h
(gdb) where
#0  0x082099cb in open64 () at swab.h:134
#1 0x08065338 in os_open_file (file=0x8ec5384 "/dev/ttyS0", flags={r = 0, w = 0, s = 1, c = 0, t = 0, a = 0, e = 0, cl = 1}, mode=0) at arch/um/os-Linux/file.c:253 #2 0x08063d90 in tty_open (input=1, output=1, primary=1, d=0x135efad0, dev_out=0xfffffe00) at os.h:79 #3 0x0805c4b4 in open_one_chan (chan=0x17fb8538, input=1, output=1, primary=1) at arch/um/drivers/chan_kern.c:201 #4 0x0805c501 in open_chan (chans=0x82a9dc8) at arch/um/drivers/chan_kern.c:218 #5 0x0805d631 in line_open (lines=0x82a9dc0, tty=0x125df000, opts=0x82a9d44) at arch/um/drivers/line.c:442 #6 0x0805de1b in ssl_open (tty=0x125df000, filp=0x17cba2ec) at arch/um/drivers/ssl.c:106 #7 0x0817e5f0 in tty_open (inode=0xfffffe00, filp=0x17cba2ec) at drivers/char/tty_io.c:1870 #8 0x080a8918 in chrdev_open (inode=0x1258f068, filp=0x17cba2ec) at fs/char_dev.c:327 #9 0x080a07d6 in __dentry_open (dentry=0x125a8c18, mnt=0x8c77208, flags=-512, f=0x17cba2ec, open=0x80a8820 <chrdev_open>) at fs/open.c:772 #10 0x080a097b in nameidata_to_filp (nd=0xfffffe00, flags=34816) at fs/open.c:888 #11 0x080a08d3 in filp_open (filename=0x17f0a000 "/dev/ttyS0", flags=34816, mode=0) at fs/open.c:832 #12 0x080a0b36 in do_sys_open (filename=0xbf5e5c4e "", flags=34816, mode=0) at fs/open.c:1025 #13 0x080a0bc7 in sys_open (filename=0xbf5e5c4e "", flags=34816, mode=0) at fs/open.c:1044 #14 0x0805b731 in handle_syscall (r=0x1241030c) at arch/um/kernel/skas/syscall.c:42 #15 0x0805a81a in handle_trap (pid=27175, regs=0x1241030c, local_using_sysemu=2) at arch/um/kernel/skas/process.c:148 #16 0x0805aba8 in userspace (regs=0x1241030c) at arch/um/kernel/skas/process.c:291
#17 0x0805b418 in fork_handler (sig=10) at thread_info.h:47
#18 <signal handler called>
#19 0x081fcc21 in kill () at swab.h:134
Previous frame inner to this frame (corrupt stack?)
(gdb)



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to