[stunnel-users] Stunnel blocks booting process when no network connectivity

Muschi Stevenson muschistevenson at googlemail.com
Mon Sep 24 16:06:07 CEST 2012


Hi Mike an others,

I tried to isolate the part that keeps looping indefinitely with some
information obfuscated for privacy, feel free to request any other
part of the strace process that could be of help.

>From what i could see stunnel just keeps looping trying to resolve the
domain ("c\6\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com" =>
stunnel.mydomain.com) and never advances from there stalling the whole
boot process.

I left the strace running for roughly 2 hours and the machine still didn't boot.

[...]
uname({sys="Linux", node="nodename", ...}) = 0
13486 socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 7
13486 connect(7, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("10.10.20.1")}, 16) = 0
13486 poll([{fd=7, events=POLLOUT}], 1, 0) = 1 ([{fd=7, revents=POLLOUT}])
13486 sendto(7, "c\6\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"...,
37, MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=7, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 8
13486 connect(8, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("8.8.8.8")}, 16) = 0
13486 poll([{fd=8, events=POLLOUT}], 1, 0) = 1 ([{fd=8, revents=POLLOUT}])
13486 sendto(8, "c\6\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"...,
37, MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=8, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 poll([{fd=7, events=POLLOUT}], 1, 0) = 1 ([{fd=7, revents=POLLOUT}])
13486 sendto(7, "c\6\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"...,
37, MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=7, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 poll([{fd=8, events=POLLOUT}], 1, 0) = 1 ([{fd=8, revents=POLLOUT}])
13486 sendto(8, "c\6\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"...,
37, MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=8, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 close(7)                          = 0
13486 close(8)                          = 0
13486 stat("/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=192, ...}) = 0
13486 socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 7
13486 connect(7, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("10.10.20.1")}, 16) = 0
13486 poll([{fd=7, events=POLLOUT}], 1, 0) = 1 ([{fd=7, revents=POLLOUT}])
13486 sendto(7, "^S\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"...,
37, MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=7, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 8
13486 connect(8, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("8.8.8.8")}, 16) = 0
13486 poll([{fd=8, events=POLLOUT}], 1, 0) = 1 ([{fd=8, revents=POLLOUT}])
13486 sendto(8, "^S\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"...,
37, MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=8, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 poll([{fd=7, events=POLLOUT}], 1, 0) = 1 ([{fd=7, revents=POLLOUT}])
13486 sendto(7, "^S\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"...,
37, MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=7, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 poll([{fd=8, events=POLLOUT}], 1, 0) = 1 ([{fd=8, revents=POLLOUT}])
13486 sendto(8, "^S\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"...,
37, MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=8, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 close(7)                          = 0
13486 close(8)                          = 0
13486 socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 7
13486 connect(7, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("10.10.20.1")}, 16) = 0
13486 poll([{fd=7, events=POLLOUT}], 1, 0) = 1 ([{fd=7, revents=POLLOUT}])
13486 sendto(7,
"&\315\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"..., 37,
MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=7, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 8
13486 connect(8, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("8.8.8.8")}, 16) = 0
13486 poll([{fd=8, events=POLLOUT}], 1, 0) = 1 ([{fd=8, revents=POLLOUT}])
13486 sendto(8,
"&\315\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"..., 37,
MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=8, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 poll([{fd=7, events=POLLOUT}], 1, 0) = 1 ([{fd=7, revents=POLLOUT}])
13486 sendto(7,
"&\315\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"..., 37,
MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=7, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 poll([{fd=8, events=POLLOUT}], 1, 0) = 1 ([{fd=8, revents=POLLOUT}])
13486 sendto(8,
"&\315\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"..., 37,
MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=8, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 close(7)                          = 0
13486 close(8)                          = 0
13486 stat("/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=192, ...}) = 0
13486 socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 7
13486 connect(7, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("10.10.20.1")}, 16) = 0
13486 poll([{fd=7, events=POLLOUT}], 1, 0) = 1 ([{fd=7, revents=POLLOUT}])
13486 sendto(7, "?k\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"...,
37, MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=7, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 8
13486 connect(8, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("8.8.8.8")}, 16) = 0
13486 poll([{fd=8, events=POLLOUT}], 1, 0) = 1 ([{fd=8, revents=POLLOUT}])
13486 sendto(8, "?k\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"...,
37, MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=8, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 poll([{fd=7, events=POLLOUT}], 1, 0) = 1 ([{fd=7, revents=POLLOUT}])
13486 sendto(7, "?k\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"...,
37, MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=7, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 poll([{fd=8, events=POLLOUT}], 1, 0) = 1 ([{fd=8, revents=POLLOUT}])
13486 sendto(8, "?k\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"...,
37, MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=8, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 close(7)                          = 0
13486 close(8)                          = 0
13486 socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 7
13486 connect(7, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("10.10.20.1")}, 16) = 0
13486 poll([{fd=7, events=POLLOUT}], 1, 0) = 1 ([{fd=7, revents=POLLOUT}])
13486 sendto(7,
"(\343\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"..., 37,
MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=7, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 8
13486 connect(8, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("8.8.8.8")}, 16) = 0
13486 poll([{fd=8, events=POLLOUT}], 1, 0) = 1 ([{fd=8, revents=POLLOUT}])
13486 sendto(8,
"(\343\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"..., 37,
MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=8, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 poll([{fd=7, events=POLLOUT}], 1, 0) = 1 ([{fd=7, revents=POLLOUT}])
13486 sendto(7,
"(\343\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"..., 37,
MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=7, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 poll([{fd=8, events=POLLOUT}], 1, 0) = 1 ([{fd=8, revents=POLLOUT}])
13486 sendto(8,
"(\343\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"..., 37,
MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=8, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 close(7)                          = 0
13486 close(8)                          = 0
13486 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
13486 rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
13486 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
13486 nanosleep({1, 0}, 0x7fff3a3c44f0) = 0
13486 stat("/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=192, ...}) = 0
13486 open("/etc/hosts", O_RDONLY|O_CLOEXEC) = 7
13486 fstat(7, {st_mode=S_IFREG|0644, st_size=261, ...}) = 0
13486 mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa6812b9000
13486 read(7, "127.0.0.1\tlocalhost\n127.0.1.1\tkv"..., 4096) = 261
13486 read(7, "", 4096)                 = 0
13486 close(7)                          = 0
13486 munmap(0x7fa6812b9000, 4096)      = 0
13486 stat("/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=192, ...}) = 0
13486 socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 7
13486 connect(7, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("10.10.20.1")}, 16) = 0
13486 poll([{fd=7, events=POLLOUT}], 1, 0) = 1 ([{fd=7, revents=POLLOUT}])
13486 sendto(7,
"j\312\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"..., 37,
MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=7, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 8
13486 connect(8, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("8.8.8.8")}, 16) = 0
13486 poll([{fd=8, events=POLLOUT}], 1, 0) = 1 ([{fd=8, revents=POLLOUT}])
13486 sendto(8,
"j\312\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"..., 37,
MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=8, events=POLLIN}], 1, 5000) = 0 (Timeout)
13486 poll([{fd=7, events=POLLOUT}], 1, 0) = 1 ([{fd=7, revents=POLLOUT}])
13486 sendto(7,
"j\312\1\0\0\1\0\0\0\0\0\0\3stunnel\vmydomain\3com"..., 37,
MSG_NOSIGNAL, NULL, 0) = 37
13486 poll([{fd=7, events=POLLIN}], 1, 5000) = ? ERESTART_RESTARTBLOCK
(To be restarted)
13476 <... wait4 resumed> 0x7fffad2b832c, 0, NULL) = ? ERESTARTSYS (To
be restarted)
13486 --- SIGINT (Interrupt) @ 0 (0) ---
13476 --- SIGINT (Interrupt) @ 0 (0) ---
13476 rt_sigreturn(0x2)                 = -1 EINTR (Interrupted system call)
13476 wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGINT}], 0, NULL) = 13486
13476 --- SIGCHLD (Child exited) @ 0 (0) ---
13476 rt_sigreturn(0x11)                = 13486
13476 rt_sigprocmask(SIG_SETMASK, [], [], 8) = 0
13476 rt_sigaction(SIGINT, {SIG_DFL, [INT], SA_RESTORER|SA_RESTART,
0x7f4ea78fb4c0}, {0x40f100, ~[KILL STOP RTMIN RT_1], SA_RESTORER,
0x7f4ea78fb4c0}, 8) = 0
13476 tgkill(13476, 13476, SIGINT)      = 0
13476 --- SIGINT (Interrupt) @ 0 (0) ---
13476 +++ killed by SIGINT +++
[...]

On Thu, Sep 20, 2012 at 5:56 PM, Michal Trojnara
<Michal.Trojnara at mirt.net> wrote:
> Muschi Stevenson wrote:
>>
>> Doing an strace as suggested by symcbean shows the following
>
>
> The suggestion was good.  Unfortunately the sample you collected only
> contains execution flow of your shell while processing /etc/init.d/stunnel4
> (or equivalent) startup script.  To also collect the trace of stunnel
> execution use "-f" option of strace.
>
> Mike
> _______________________________________________
> stunnel-users mailing list
> stunnel-users at stunnel.org
> https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users



More information about the stunnel-users mailing list