Hi Richard,

Thanks for the bug report. I will take a look at it later this evening and
will write back to you.

Best,
Kapil


On Tue, Jul 2, 2013 at 5:59 AM, Richard Potter <[email protected]>wrote:

> Hi,
>
> DMTCP v1.2.7 does not seem to work with the old netcat from:
> http://downloads.sourceforge.net/project/nc110/
>
> The issue seems to be with the select system call.  A quick search for
> dmtcp and select did not yield any clues. For other versions of netcat
> that use poll, DMTCP seems to do fine.
>
> Below is a script I've used to reproduce the problem on a few machines.
> The output shows that the two netcats are in sys_select() before the
> checkpoint and in sys_read() after the checkpoint.  After the
> checkpoint, data stops going across the connection.  I.e., the
> "abcdefghijabcdefghij" string was not received and written out by the
> client netcat.
>
> Is this a bug in DMTCP?  Is there an easy workaround that could still
> use nc110?
>
> --Richard
>
>
> =============
> OUTPUT:
> =============
> time=1
> time=2
> 01234567890123456789
> time=3
> ---5788---
> [<00000000>] poll_schedule_timeout+0x3e/0x60
> [<00000000>] do_select+0x47e/0x570
> [<00000000>] core_sys_select+0x15c/0x2b0
> [<00000000>] sys_select+0x84/0xb0
> [<00000000>] syscall_call+0x7/0xb
> [<00000000>] 0xffffffff
> ---5890---
> [<00000000>] poll_schedule_timeout+0x3e/0x60
> [<00000000>] do_select+0x47e/0x570
> [<00000000>] core_sys_select+0x15c/0x2b0
> [<00000000>] sys_select+0x84/0xb0
> [<00000000>] syscall_call+0x7/0xb
> [<00000000>] 0xffffffff
> time=4
> DMTCP-1.2.7 (+ MTCP), Copyright (C) 2006-2011  Jason Ansel, Michael Rieker,
>                                        Kapil Arya, and Gene Cooperman
> This program comes with ABSOLUTELY NO WARRANTY.
> This is free software, and you are welcome to redistribute it
> under certain conditions; see COPYING file for details.
> (Use flag "--quiet" to hide this message.)
>
> time=5
> time=6
> ---5788---
> [<00000000>] sk_wait_data+0xa7/0xb0
> [<00000000>] tcp_recvmsg+0x4b2/0xa10
> [<00000000>] inet_recvmsg+0x73/0x90
> [<00000000>] do_sock_read.isra.13+0xcb/0xe0
> [<00000000>] sock_aio_read+0x6c/0x80
> [<00000000>] do_sync_read+0xa4/0xe0
> [<00000000>] vfs_read+0x149/0x160
> [<00000000>] sys_read+0x3d/0x70
> [<00000000>] syscall_call+0x7/0xb
> [<00000000>] 0xffffffff
> ---5890---
> [<00000000>] sk_wait_data+0xa7/0xb0
> [<00000000>] tcp_recvmsg+0x4b2/0xa10
> [<00000000>] inet_recvmsg+0x73/0x90
> [<00000000>] do_sock_read.isra.13+0xcb/0xe0
> [<00000000>] sock_aio_read+0x6c/0x80
> [<00000000>] do_sync_read+0xa4/0xe0
> [<00000000>] vfs_read+0x149/0x160
> [<00000000>] sys_read+0x3d/0x70
> [<00000000>] syscall_call+0x7/0xb
> [<00000000>] 0xffffffff
> time=7
> time=8
> time=9
> time=10
> time=11
> time=12
> time=13
> time=14
> time=15
> time=16
> time=17
> time=18
> time=19
> time=20
> time=21
> time=22
> time=23
> time=24
> time=25
> time=26
> time=27
> time=28
> time=29
>
> =============
> THE SCRIPT:
> =============
>
> [ -d cache-downloads ] || mkdir cache-downloads
> cd cache-downloads
> [ -f dmtcp-1.2.7.tar.gz ] || wget
>
> http://downloads.sourceforge.net/project/dmtcp/dmtcp/1.2.7/dmtcp-1.2.7.tar.gz
> [ -f nc110.tgz ] || wget
>
> http://downloads.sourceforge.net/project/nc110/unix%20netcat%201.10%20by%20_Hobbit_/%5BUnnamed%20release%5D/nc110.tgz
> cd ..
>
> if ! [ -d nc110 ]
> then
>    (
>       mkdir nc110
>       cd nc110
>       tar xzvf ../cache-downloads/nc110.tgz
>       mv netcat.c netcat.c.org
>       echo '#include "resolv.h"' >netcat.c
>       cat netcat.c.org >>netcat.c
>    )
> fi
>
> if ! [ -d dmtcp-1.2.7 ]
> then
>    tar xzvf cache-downloads/dmtcp-1.2.7.tar.gz
> fi
>
> if ! [ -f nc110/nc ]
> then
>    (
>      cd nc110
>      # important! turn off the default static build
>      make linux STATIC=
>    )
> fi
>
> if ! [ -f dmtcp-1.2.7/bin/dmtcp_checkpoint ]
> then
>    (
>    cd dmtcp-1.2.7
>    ./configure
>    make
>    )
> fi
>
> sleep 1
> killall  dmtcp_coordinator || true
> sleep 1
> xterm -e 'dmtcp-1.2.7/bin/dmtcp_coordinator' </dev/null >/dev/null 2>&1 &
>
> sleep 1
>
> echo >serverscript.sh "
> ( sleep 2
>   echo 01234567890123456789
>   sleep 5
>   echo abcdefghijabcdefghij ) | nc110/nc -l -p 7777
> "
> xterm -e ./dmtcp-1.2.7/bin/dmtcp_checkpoint bash -x serverscript.sh
> </dev/null >/dev/null 2>&1 &
> sleep 1
>
> ./dmtcp-1.2.7/bin/dmtcp_checkpoint nc110/nc -w 10 localhost 7777
> </dev/null &
>
> for i in $(seq 1 30)
> do
>   echo time=$i
>   [ "$i" = "4" ] && ./dmtcp-1.2.7/bin/dmtcp_command c
>   [ "$i" = "3" ] || [ "$i" = "6" ] && {
>     for i in $(pgrep -f nc110)
>     do
>        echo ---$i---
>        cat /proc/$i/stack
>     done
>   }
>   sleep 1
> done
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Dmtcp-forum mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dmtcp-forum

Reply via email to