sigprocmask system call

Daniil Cherednik dcherednik at masterhost.ru
Wed Oct 19 14:35:09 UTC 2011


Hello.

We are using FreeBSD 8.2 on hight load projects. When I was preparing 
system for production I sow strange (as me think) behavior that can lead 
to increased load on servers.

If I made truss on httpd (apache22) process, I saw too much syscalls 
such us:

24822: sigprocmask(SIG_BLOCK,0x0,0x0)            = 0 (0x0)
24822: sigprocmask(SIG_BLOCK,0x0,0x0)            = 0 (0x0)
24822: sigprocmask(SIG_BLOCK,0x0,0x0)            = 0 (0x0)
24822: sigprocmask(SIG_BLOCK,0x0,0x0)            = 0 (0x0)
24822: sigprocmask(SIG_BLOCK,0x0,0x0)            = 0 (0x0)
... too many line ...

and

24822: 
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|S
IGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
24822: sigprocmask(SIG_SETMASK,0x0,0x0)          = 0 (0x0)
24822: 
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|S
IGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
24822: sigprocmask(SIG_SETMASK,0x0,0x0)          = 0 (0x0)
24822: 
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|S
IGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
24822: sigprocmask(SIG_SETMASK,0x0,0x0)          = 0 (0x0)
... too many line ...


but apache, and modules loaded from it do not call this directly.
I was trying to use DTRACE for getting information about syscalls, and I 
got same result.

I wrote tiny sample

code:
#include<iostream>
main(){
     fork();
}
I ran it on FreeBSD:
truss -f ./mytest 2>&1 | grep sigprocmask | wc -l
30

Is it normal to call so many syscalls ? For example, there is no 
sigprocmask syscalls when I run it in Linux.



-- 

? ?????????,
Daniil Cherednik
.masterhost



More information about the freebsd-questions mailing list