In <list-1730392@2rosenthals.com>, on 03/07/21
at 08:15 PM, "Massimo S." <ecs-isp@2rosenthals.com> said:
Hi Massimo,
>i alredy have log to debug level 7
>but this not help, since the new version crash before creating the log
>file
The log file logic is bit complicated and it appears we have an issue in
the stunnel patches.
When you define a log file, you can lose log output in some cases and an
abort (it's not a crash) is one of those cases.
When the abort occurs, it causes the code that would write the cached log
files to the log file to by bypassed.
The workaround is to disable the output setting with:
; output = r:\stunnel.log
and to add
foreground = yes
which has the side effect of routing log output to the console.
However, this is not going to help you in this case, because it appears
that this is really the first and only line of log output. I faked the
ssl_init() failure under the debugger to check this.
This is where I found we have an issue in the patches. Since we don't
support daemonize(), I patched the code a while ago to default to make
forground mode the default. The patch is still there:
options.c:951
#if !defined(__OS2__)
new_global_options.option.foreground=0;
#else
// 2011-01-07 SHL
// default to foreground mode because this better matches older builds
which
// suppressed daemonize which forground implies, but did not set
the flag
// so some of the code still acted as if daemonize was in effect
new_global_options.option.foreground=1;
#endif
However, it looks like I missed a line of code or the sources have changed
since 2011. :-)