Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#141 Problem with migration of process using tcp socket

v1.9.1
closed-fixed
Roger Tsang
5
2010-03-13
2007-05-13
ch0hlik
No

For example I use this little tcp server:
http://www.cs.rpi.edu/courses/sysprog/sockets/server.c
$ gcc -o server server.c

On the first node 10.0.0.1:
$ ./server 8888

$ migrate 2 server_pid

On the second node 10.0.0.2:
$ telnet 10.0.0.1 8888
Trying 10.0.0.1...
Connected to openone (10.0.0.1).
Escape character is '^]'.
Connection closed by foreign host.

After this server show:
ERROR reading from socket: Invalid argument

In 1.2.2 I'm the same steps and it works fine.
In 1.9.3 problem looks just like in 1.9.2 or worse. (1.9.3 from here: http://radian.org/~roger/OPENSSI-FC/kernel/2.6.11/\)

Discussion

1 2 > >> (Page 1 of 2)
  • Roger Tsang
    Roger Tsang
    2007-05-14

    Logged In: YES
    user_id=1246761
    Originator: NO

    In 2.6.11-ssi TCP socket did not get recreated properly at the destination node.

    At origin node:
    server 236031 root 3u IPv4 121308792 TCP *:8888 (LISTEN)

    At destination node:
    server 236031 root 3u sock 0,2 121308792 can't identify protocol

    When migrating the process back to the origin node, the listen socket reappears.

     
  • Roger Tsang
    Roger Tsang
    2007-05-14

    Logged In: YES
    user_id=1246761
    Originator: NO

    According to reop_import_pathinit() the current OpenSSI implementation does not support socket migration. However for some reason existing outbound connections continue even after process migration. The migration code looks pretty much the same in SSI-1.2 and SSI-1.9.

     
  • ch0hlik
    ch0hlik
    2007-06-06

    Logged In: YES
    user_id=1771064
    Originator: YES

    Is there is any possibilities that socket migration will be supported in 1.9.2 od 1.9.3?

     
  • Roger Tsang
    Roger Tsang
    2007-08-13

    Logged In: YES
    user_id=1246761
    Originator: NO

    Looking at the code again... In SSI-1.9 the base kernel-2.6 inode structure no longer directly references its socket structure unlike in SSI-1.2. Unless the contents of this socket structure is exported to the destination node along with the inode SSI-1.9 rmtsocksvr_* operations that use SOCKET_I() are still working with bugus information from the local node's sock_inode_cache. This explains why TCP sockets did not get recreated properly on the destination migration node.

     
  • Roger Tsang
    Roger Tsang
    2007-08-14

    • milestone: 663197 --> v1.9.1
     
  • Roger Tsang
    Roger Tsang
    2007-08-14

    Logged In: YES
    user_id=1246761
    Originator: NO

    This is looking more like a revisit of the rmtfb_getsvr_handle() SSI-1.9.1 bug for which rmtfb_tryagain_handle() was written in SSI-1.9.2 to fix remote tty but maybe should be extended for rmtsock if it is a case of client/server ino mismatch.

     
  • Roger Tsang
    Roger Tsang
    2007-10-29

    Logged In: YES
    user_id=1246761
    Originator: NO

    VPROC recreates the socket for SOCKET_I() during process migration. No -ERFB_TRYAGAIN errors were encountered, so the problem is somewhere in rmtsock.

     
  • ch0hlik
    ch0hlik
    2007-12-05

    Logged In: YES
    user_id=1771064
    Originator: YES

    Roger,
    Is there is any possibility to recive documentation for code used to modify sockets inside kernel?
    Thank you and regards,
    RJ

     
  • ch0hlik
    ch0hlik
    2007-12-05

    Logged In: YES
    user_id=1771064
    Originator: YES

    Roger,
    Is there is any possibility to recive documentation for code used to modify sockets inside kernel?
    Thank you and regards,
    RJ

     
  • Roger Tsang
    Roger Tsang
    2007-12-06

    Logged In: YES
    user_id=1246761
    Originator: NO

    I don't have documentation. Try code inspection... ghost sockets get created during migration and they inherit ssi socket ops used mostly to ship syscalls to origin node.

     
1 2 > >> (Page 1 of 2)