linuxproc

why the value of /proc/$pid/comm is changed running tsan?


I compile program with tsan(ThreadSanitizer), and running it. Besides I read /proc/$pid/comm of this process, expect the value is program's name. But I got "exe", why?

./my_program

root     25515   712  0 09:40 pts/1    00:00:00 my_program

cat /proc/25515/comm
exe

use gcc 7.3.0

I want to know what happened the value of comm file.


Solution

  • This problem is tsan re-exec program with name "exe". source code here InitializePlatform. disable ASLR can fix this problem.