gzip sleeps until 'strace'ing the process
Hello,
If you have some hints, please put me in the CC.
We launched a job which forks a
gzip -cd
which is basically zcat.
This process is accessing a file within a NFS mounted directory:
# ps aux|grep gzip user 32078 0.0 0.0 4140 552 pts/0 S+ 15:06 0:00 gzip -cd -f file_in_NFS_mounted_directory
The file is properly ziped.
The process is in the sleep state - also the file can be accessed.
If I 'strace' it the process finishes successfully.
# strace -p 32078 Process 32078 attached - interrupt to quit write(1, "e-010 5.5565\n121.951418712 2.2249"..., 24578) = 24578 write(1, "3 -0.3036801 -3.1699e-011 5.30998"..., 32768) = 32768 write(1, "2015e-010 5.5565\n121.9529017461 2"..., 32768) = 32768 write(1, "\n121.9543512274 0.166872 -0.13840"..., 32768) = 32768 write(1, "-011 5.5565\n121.9558745249 5.2519"..., 32768) = 32768 write(1, "08331213 -4.2015e-010 5.80302\n121"..., 32768) = 32768 write(1, "1.9587130924 4.603975 -0.2485881 "..., 32768) = 32768 read(8, "\361\234a\325\305\3161\373x\307\324\312\240+\307\354\211Y\357cH\234\360\362\315\235NV\310O\\\212\236"..., 32768) = 14630 read(8, ""..., 18138) = 0 write(1, "600686259 5.408658 -0.5240481 -1."..., 32768) = 32768 write(1, "5.707316 -0.3587721 -4.2015e-010 "..., 32768) = 32768 write(1, "1.9627260083 5.766155 -0.3587721 "..., 30733) = 30733 close(8) = 0 exit_group(0) = ? Process 32078 detached
I found it puzzling since strace should not have an influence on the state of a process.
In the /proc directory I found the follwing:
/proc/32078# cat status
Name: gzip State: S (sleeping) Tgid: 32078 Pid: 32078 PPid: 31592 TracerPid: 0 Uid: 5059 5059 5059 5059 Gid: 5000 5000 5000 5000 FDSize: 256 Groups: 5000 5001 5002 VmPeak: 4140 kB VmSize: 4140 kB VmLck: 0 kB VmHWM: 552 kB VmRSS: 552 kB VmData: 492 kB VmStk: 84 kB VmExe: 52 kB VmLib: 1432 kB VmPTE: 32 kB Threads: 1 SigQ: 0/68608 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001300001 SigCgt: 0000000000805002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: fffffffffffffeff voluntary_ctxt_switches: 55 nonvoluntary_ctxt_switches: 1
Do you have any idea?
Cheers,
Henning Fehrmann