Hi Guanglin,
    In your Ubuntu 10.4 (32-bit), does DMTCP always fail (even on
small programs)?  Are you using DMTCP or just MTCP or just libmtcp.so
in isolation?
    Locally, we have available a 32-bit Ubuntu 9.10 system
(one release earlier than 10.4), and DMTCP does work on this.  DMTCP was
also tested on 32-bit Ubuntu 11.10 and works.
    By the way, vdso is usually an issue only on 32-bit machines,
due to the smaller address space.  When DMTCP restarts, it must make sure
that the new vdso (generated by the kernel) does not conflict with
regions mapped prior to checkpoint.
    One quick workaround that you could try would be to turn off ASLR.
To do this, as root do:
  echo 0 > /proc/sys/kernel/randomize_va_space
A more drastic solution is to turn off vdso:
  echo 0 > /proc/sys/vm/vdso_enabled

    If you can provide an unprivileged guest account (sent to me ---
not to the full list) with your 32-bit Ubuntu 10.04 setup, I'd be happy
to look at your machine and give you a more detailed diagnosis on how
to make MTCP work without changing your proc system parameters.

Best wishes,
- Gene

On Mon, Jul 30, 2012 at 07:31:52PM -0400, Guanglin Xu wrote:
> Hi,
> I am really interested in libmtcp.so, but now I get trouble with it.
> 
> According to the comments from mtcp.c,
> --"We must also keep the new vdso segment, provided by mtcp_restart.",
> but what if a restored library want to occupy this memory region?
> 
> Unfortunately, on my Ubuntu 10.04 32bit, mtcp_restart always maps [vdso]
> into 0x110000 (btw, how do you disable ASLR here?) , where confliction
> occurs very frequently and cause segmentation error.
> 
> I think it is a bug of mtcp. Can you fix it? or give comments so I can do it?
> 
> thank you.
> 
> Guanglin
> 
> 
> I'd love to give 2 memory maps here:
> garin@ubuntu:~/workspace/testmtcpsimple_pthread/Release$ cat /proc/`pidof
> testmtcp3`/maps
> 00110000-00263000 r-xp 00000000 07:00 1569891   
> /lib/tls/i686/cmov/libc-2.11.1.so
> 00263000-00265000 r--p 00153000 07:00 1569891   
> /lib/tls/i686/cmov/libc-2.11.1.so
> 00265000-00266000 rw-p 00155000 07:00 1569891   
> /lib/tls/i686/cmov/libc-2.11.1.so
> 00266000-00269000 rw-p 00000000 00:00 0
> 00269000-0028d000 r-xp 00000000 07:00 1569902   
> /lib/tls/i686/cmov/libm-2.11.1.so
> 0028d000-0028e000 r--p 00023000 07:00 1569902   
> /lib/tls/i686/cmov/libm-2.11.1.so
> 0028e000-0028f000 rw-p 00024000 07:00 1569902   
> /lib/tls/i686/cmov/libm-2.11.1.so
> 00297000-00298000 r-xp 00000000 00:00 0          [vdso]
> 005f9000-0060e000 r-xp 00000000 07:00 1569842   
> /lib/tls/i686/cmov/libpthread-2.11.1.so
> 0060e000-0060f000 r--p 00014000 07:00 1569842   
> /lib/tls/i686/cmov/libpthread-2.11.1.so
> 0060f000-00610000 rw-p 00015000 07:00 1569842   
> /lib/tls/i686/cmov/libpthread-2.11.1.so
> 00610000-00612000 rw-p 00000000 00:00 0
> 00a39000-00a54000 r-xp 00000000 07:00 1580341    /lib/ld-2.11.1.so
> 00a54000-00a55000 r--p 0001a000 07:00 1580341    /lib/ld-2.11.1.so
> 00a55000-00a56000 rw-p 0001b000 07:00 1580341    /lib/ld-2.11.1.so
> 00b6d000-00b86000 r-xp 00000000 07:00 1448440   
> /home/garin/testground/dmtcp-1.2.5/mtcp/libmtcp.so.1.0.0
> 00b86000-00b87000 r--p 00018000 07:00 1448440   
> /home/garin/testground/dmtcp-1.2.5/mtcp/libmtcp.so.1.0.0
> 00b87000-00b88000 rw-p 00019000 07:00 1448440   
> /home/garin/testground/dmtcp-1.2.5/mtcp/libmtcp.so.1.0.0
> 00b88000-00b95000 rw-p 00000000 00:00 0
> 00dac000-00dae000 r-xp 00000000 07:00 1569825   
> /lib/tls/i686/cmov/libdl-2.11.1.so
> 00dae000-00daf000 r--p 00001000 07:00 1569825   
> /lib/tls/i686/cmov/libdl-2.11.1.so
> 00daf000-00db0000 rw-p 00002000 07:00 1569825   
> /lib/tls/i686/cmov/libdl-2.11.1.so
> 08048000-08049000 r-xp 00000000 07:00 1446125   
> /home/garin/testground/dmtcp-1.2.5/mtcp/testmtcp3
> 08049000-0804a000 r--p 00000000 07:00 1446125   
> /home/garin/testground/dmtcp-1.2.5/mtcp/testmtcp3
> 0804a000-0804b000 rw-p 00001000 07:00 1446125   
> /home/garin/testground/dmtcp-1.2.5/mtcp/testmtcp3
> 0804b000-0804c000 rw-p 00000000 00:00 0
> 08936000-08957000 rw-p 00000000 00:00 0          [heap]
> b576c000-b576d000 ---p 00000000 00:00 0
> b576d000-b5f6d000 rw-p 00000000 00:00 0
> b5f6d000-b5f6e000 ---p 00000000 00:00 0
> b5f6e000-b676e000 rw-p 00000000 00:00 0
> b676e000-b676f000 ---p 00000000 00:00 0
> b676f000-b6f6f000 rw-p 00000000 00:00 0
> b6f6f000-b6f70000 ---p 00000000 00:00 0
> b6f70000-b7772000 rw-p 00000000 00:00 0
> b7781000-b7783000 rw-p 00000000 00:00 0
> bfed2000-bfee7000 rw-p 00000000 00:00 0          [stack]
> 
> garin@ubuntu:~/workspace/testmtcpsimple_pthread/Release$ cat /proc/`pidof
> mtcp_restart`/maps
> 00110000-00263000 r-xp 00000000 07:00 1569891   
> /lib/tls/i686/cmov/libc-2.11.1.so            ##before restores, here lies
> [vdso] section. so conflicts now!
> 00263000-00265000 r--p 00153000 07:00 1569891   
> /lib/tls/i686/cmov/libc-2.11.1.so
> 00265000-00266000 rw-p 00155000 07:00 1569891   
> /lib/tls/i686/cmov/libc-2.11.1.so
> 00266000-00269000 rw-p 00000000 00:00 0
> 00269000-0028d000 r-xp 00000000 07:00 1569902   
> /lib/tls/i686/cmov/libm-2.11.1.so
> 0028d000-0028e000 r--p 00023000 07:00 1569902   
> /lib/tls/i686/cmov/libm-2.11.1.so
> 0028e000-0028f000 rw-p 00024000 07:00 1569902   
> /lib/tls/i686/cmov/libm-2.11.1.so
> 00297000-00298000 r-xp 00000000 00:00 0
> 005f9000-0060e000 r-xp 00000000 07:00 1569842   
> /lib/tls/i686/cmov/libpthread-2.11.1.so
> 0060e000-0060f000 r--p 00014000 07:00 1569842   
> /lib/tls/i686/cmov/libpthread-2.11.1.so
> 0060f000-00610000 rw-p 00015000 07:00 1569842   
> /lib/tls/i686/cmov/libpthread-2.11.1.so
> 00610000-00612000 rw-p 00000000 00:00 0
> 00a39000-00a54000 r-xp 00000000 07:00 1580341    /lib/ld-2.11.1.so
> 00a54000-00a55000 r--p 0001a000 07:00 1580341    /lib/ld-2.11.1.so
> 00a55000-00a56000 rw-p 0001b000 07:00 1580341    /lib/ld-2.11.1.so
> 00b6d000-00b95000 rwxp 00000000 00:00 0
> 00dac000-00dae000 r-xp 00000000 07:00 1569825   
> /lib/tls/i686/cmov/libdl-2.11.1.so
> 00dae000-00daf000 r--p 00001000 07:00 1569825   
> /lib/tls/i686/cmov/libdl-2.11.1.so
> 00daf000-00db0000 rw-p 00002000 07:00 1569825   
> /lib/tls/i686/cmov/libdl-2.11.1.so
> 08048000-08049000 r-xp 00000000 07:00 1446125   
> /home/garin/testground/dmtcp-1.2.5/mtcp/testmtcp3
> 08049000-0804a000 r--p 00000000 07:00 1446125   
> /home/garin/testground/dmtcp-1.2.5/mtcp/testmtcp3
> 0804a000-0804b000 rw-p 00001000 07:00 1446125   
> /home/garin/testground/dmtcp-1.2.5/mtcp/testmtcp3
> 0804b000-0804c000 rw-p 00000000 00:00 0
> 08936000-08957000 rw-p 00000000 00:00 0          [heap]
> b576c000-b576d000 ---p 00000000 00:00 0
> b576d000-b5f6d000 rw-p 00000000 00:00 0
> b5f6d000-b5f6e000 ---p 00000000 00:00 0
> b5f6e000-b676e000 rw-p 00000000 00:00 0
> b676e000-b676f000 ---p 00000000 00:00 0
> b676f000-b6f6f000 rw-p 00000000 00:00 0
> b6f6f000-b6f70000 ---p 00000000 00:00 0
> b6f70000-b7772000 rw-p 00000000 00:00 0
> b7781000-b7783000 rw-p 00000000 00:00 0
> bfce4000-bfee7000 rw-p 00000000 00:00 0
> 
> ...
> [7591] mtcp.c:2172 checkpointhread:
>   everything resumed
> [7591] mtcp.c:3511 stopthisthread:
>   tid 7615 returning to 0x110400
> [7591] mtcp.c:3488 stopthisthread:
>   thread 7616 resuming
> [Segmentation fault
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Dmtcp-forum mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dmtcp-forum

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Dmtcp-forum mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dmtcp-forum

Reply via email to