plasma-umass / coz

Coz: Causal Profiling
Other
4.08k stars 159 forks source link

Interrupted system call #148

Closed sigiesec closed 4 years ago

sigiesec commented 4 years ago

I tried running coz on the inproc_lat benchmark program from zeromq/libzmq. This causes an interrupted system call I identified via strace as follows:

[pid 29215] poll([{fd=12, events=POLLIN}], 1, 0) = ? ERESTART_RESTARTBLOCK (Interrupted by signal)
[pid 29215] --- SIGPROF {si_signo=SIGPROF, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=NULL}} ---

While the code might be changed to work around this, this seems to quite heavily affect the analysis results, or doesn't it?

bjorn3 commented 4 years ago

Interrupted syscalls should always be restarted by the program performing the syscall.

sigiesec commented 4 years ago

Fair enough... I now got a recording (https://pastebin.com/DWLYFKNY) but coz plot claims it is empty... I specified progress points in the code though both using COZ_BEGIN/COZ_END and using COZ_PROGRESS.

sigiesec commented 4 years ago

Sorry, I missed linking against dl. I thought I did since there was no error, but I found that the symbol is defined weakly to suppress an error. Now I have results plotted :)

emeryberger commented 4 years ago

Great! Glad you figured this out! (Closing the issue.)