<div dir="ltr">Hi,<div><br></div><div>JFYI, I've also tried your reproducer on my laptop using a newly installed ubuntu 18.04.</div><div><br></div><div>$ uname -r</div><div>4.17.0-rc5+</div><div>$ ldd --version<br></div><div>ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27<br></div><div>...</div><div>$ ./strace -eclone ./a.out<br></div><div><div>clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fccc3684790) = 3723</div><div>3723</div><div>+++ exited with 0 +++</div></div><div>$ dmesg</div><div>[49004.917782] traps: a.out[3723] general protection ip:7fccc3165dfe sp:7fff6d775c58 error:0 in <a href="http://libc-2.27.so">libc-2.27.so</a>[7fccc3081000+1e7000]<br></div><div><br></div><div>I'm curious while getting this error log, I still can't reproduce the problem you said so I wonder if this error is really the cause of your problem.</div><div>I can't figure it out and I guess I should learn more about this "general protection".</div><div><br></div><div>Zhibin Li</div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 21, 2018 at 11:54 PM, Chen Jingpiao <span dir="ltr"><<a href="mailto:chenjingpiao@gmail.com" target="_blank">chenjingpiao@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Unfortunately, the progress was slow last week. I meet a fault that I never meet.<br></div><div>It took me a lot of time to debug.</div><div><br></div><div>I report the bug here, look forward to someone can give me a help.</div><div><br></div><div>Environment:</div><div>$ uname -a</div><div>Linux VM-250-130-ubuntu 4.16.0-rc5 #14 SMP Tue Mar 20 11:06:37 CST 2018 x86_64 x86_64 x86_64 GNU/Linux</div><div><br></div><div>glibc: <a href="http://libc-2.19.so" target="_blank">libc-2.19.so</a></div><div><br></div><div>Description:</div><div>The child process does not return after fork().</div><div><br></div><div>$ dmesg</div><div>[ 4648.471410] traps: a.out[31678] general protection</div><div>ip:7fed4d16e100 sp:7fff286159e8 error:0 in <a href="http://libc-2.19.so" target="_blank">libc-2.19.so</a>[7fed4d0a9000+<wbr>1be000]</div><div><br></div><div>Reproduce the fault:</div><div>$ git remote add ppiao <a href="https://github.com/ppiao/strace.git" target="_blank">https://github.com/ppiao/<wbr>strace.git</a></div><div>$ git fetch ppiao ppiao/next:ppiao/next</div><div>$ git checkout ppiao/next</div><div>$ ./bootstrap && ./configure && make</div><div>$ ./strace -eopen ls >/dev/null # w<span style="color:rgb(67,67,67);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(252,252,254);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">ork properly</span></div><div><br></div><div>/* fork.c */</div><div>#include <stdio.h></div><div>#include <unistd.h></div><div><br></div><div>int main(void)</div><div>{</div><div><span style="white-space:pre-wrap"> </span>int pid = fork();</div><div><br></div><div><span style="white-space:pre-wrap"> </span>fprintf(stderr, "%d\n", pid);</div><div><br></div><div><span style="white-space:pre-wrap"> </span>return 0;</div><div>}</div><div><br></div><div>$ gcc fork.c</div><div>$ ./strace -eclone ./a.out # the child process does not return</div><div>$ dmesg</div><div>[ 4648.471410] traps: a.out[31678] general protection</div><div>ip:7fed4d16e100 sp:7fff286159e8 error:0 in <a href="http://libc-2.19.so" target="_blank">libc-2.19.so</a>[7fed4d0a9000+<wbr>1be000]</div><div><br></div><div>Thank you!</div><div><br></div><div>--</div><div>Chen Jingpiao</div></div>
<br>-- <br>
Strace-devel mailing list<br>
<a href="mailto:Strace-devel@lists.strace.io">Strace-devel@lists.strace.io</a><br>
<a href="https://lists.strace.io/mailman/listinfo/strace-devel" rel="noreferrer" target="_blank">https://lists.strace.io/<wbr>mailman/listinfo/strace-devel</a><br>
<br></blockquote></div><br></div></div></div>