[Simh] SIMH dies when using ftp or wget

Arpadffy Zoltan Zoltan.Arpadffy at scientificgames.se
Mon Sep 19 13:39:35 EDT 2011


Hello,

Thank you Mark.
Your version works perfect.
It was needed to add a -lpthread option, but after that:

virtual:~/SIMH/ultrix/bin # ldd vax
        linux-vdso.so.1 =>  (0x00007fff0d1ff000)
        libpcap.so.1 => /usr/local/lib/libpcap.so.1 (0x00007f14a589d000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f14a5680000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f14a5313000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f14a5ad6000)

[root at mailhost ~]# ftp ultrix
Connected to ultrix (192.168.10.4).
220 ultrix FTP server (ULTRIX Version 4.1 Sun Sep 17 06:28:20 EDT 1995) ready.
Name (ultrix:ubul): zoli
331 Password required for zoli.
Password:
230 User zoli logged in.
ftp> bin
200 Type set to I.
ftp> put starter.tar.gz
local: starter.tar.gz remote: starter.tar.gz
227 Entering Passive Mode (192,168,10,4,4,0)
150 Openning data connection for starter.tar.gz (192.168.10.36,38572).
226 Transfer complete.
5215654 bytes sent in 3.85 secs (1354.94 Kbytes/sec)


Thank you very much.

Jan-Benedict, I just wonder, if the debug information would be of any use.
If yes, please let me know and I'll do it for you.

I have some other questions as well, but I will open a new subject line for them.

Thank you very much for help.

Regards,
Z


-----Original Message-----
From: Mark Pizzolato - Info Comm [mailto:Mark at infocomm.com]
Sent: den 19 september 2011 19:14
To: Arpadffy Zoltan
Cc: simh at trailing-edge.com; Mark Pizzolato - Info Comm
Subject: RE: [Simh] SIMH dies when using ftp or wget

On Monday, September 19, 2011 at 9:54 AM, Jan-Benedict Glaw  wrote:
> On Mon, 2011-09-19 18:33:37 +0200, Arpadffy Zoltan
> <Zoltan.Arpadffy at scientificgames.se> wrote:
> > Yes, it is possible to reproduce.
> > It dies that not just the host exists, but the simh process also creases.
> >
> > Here is the case:
> [...]
> > [root at mailhost ~]# ftp ultrix
> > Connected to ultrix (192.168.10.4).
> > 220 ultrix FTP server (ULTRIX Version 4.1 Sun Sep 17 06:28:20 EDT 1995)
> ready.
> > Name (ultrix:ubul): zoli
> > 331 Password required for zoli.
> > Password:
> > 230 User zoli logged in.
> > ftp> bin
> > 200 Type set to I.
> > ftp> put starter.tar.gz
> > local: starter.tar.gz remote: starter.tar.gz
> > 227 Entering Passive Mode (192,168,10,4,4,1)
> > 150 Openning data connection for starter.tar.gz (192.168.10.36,54533).
> >
> > It works well until I issue the put command - but then the simh process gets
> a segmentation fault.
> >
> [...]
> > read(0, "", 1)                          = 0
> > poll([{fd=9, events=POLLIN}], 1, 0)     = 0 (Timeout)
> > read(0, "", 1)                          = 0
> > poll([{fd=9, events=POLLIN}], 1, 0)     = 0 (Timeout)
> > read(0, "", 1)                          = 0
> > poll([{fd=9, events=POLLIN}], 1, 0)     = 0 (Timeout)
> > read(0, "", 1)                          = 0
> > --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> >
> > The same happens if I try to ftp get put or just use wget with bigger
> > files from the simh client.
>
> A SIGSEGV means that this is a bug inside SIMH. The next step would be to
> recompile the SIMH VAX binary (and all needed object files) without any -O
> flag (switch off optimizations) and with the -g flag (to include debug
> information into the resulting files).
>
> Done with that, start SIMH again and attach gdb to it (gdb <pid-of-simh>).
> You'll be given a prompt, just "cont"inue.
>
> Then start your FTP/wget/whatever session and wait until it crashes.
> Once that happened, you'll be back on the gdb prompt, where you'd issue
> the `bt' command (and copy all of its output as well as the few lines that
> came after you "cont"inued.) Then close gdb, letting the attached SIMH
> process die.
>
> The crash info (along with the `bt' output) will probably give us an idea where
> that bug is hidden.
>
> MfG, JBG

Clearly there is probably a bug in the simh network components in the simh version 3.8-1 which is being used.

The simh networking layer has been significantly changed in the source code which hasn't yet made it out in an official release.

It would be best to test this with the current code.  The problem may already have been fixed, or if not this is the place where we'd want to find the bug.

The latest code can be  downloaded at:   https://github.com/markpizz/simh/tarball/master This url returns a tarball (.tar.gz), which you can rename and expand into a working directory.

The included makefile will automatically build with networking support if the necessary libpcap development components are installed (either from your linux distro or directly from tcpdump.org).

Give this a try and let us know it you still have issues.

- Mark Pizzolato







More information about the Simh mailing list