[stunnel-users] Fix unexpected stunnel-4.10 exits on FreeBSD

Vasil Dimov vd at datamax.bg
Wed Jun 15 17:57:07 CEST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Jun 15, 2005 at 04:31:16PM +0200, Michal Trojnara wrote:
> Here is the whole backtrace:
> 
...
> #29 0x0804b4e0 in alloc_client_session () at client.c:92
> #30 0x08054412 in create_client (ls=613270282, s=59548, arg=0x402d5440,
>     cli=0x402d5440 <_IO_2_1_stderr_>) at sthreads.c:133
> Previous frame inner to this frame (corrupt stack?)
> 
> Interesting, isn't it?

Yes, it seems that the stack is totally corrupted with all those
0x00000000s on it.

So the problem may not be in swapcontext() or ucontext at all.
Maybe the stack gets corrupted just before the crash (swapcontext call)
or 50 lines before that?

You should try to run the prog via gdb and set some breakpoint nearby
(but before) swapcontext call and then step carefully and inspect what
happens after each move, especially the contents of ctx->ctx and
ready_head->ctx and all their members and sub-members.

....

OK I see in the mailing list that the bug is hunted already. It would be
really hard to debug that problem. Thanks to
https://listman.redhat.com/archives/phil-list/2003-January/msg00097.html
-----BEGIN PGP SIGNATURE-----

iD8DBQFCsE/TFw6SP/bBpCARAi/rAKCc/rSj9KWlqtKX05Aq7C1TA62gHACePxYr
ESfFLKeUeYRzj6tG5rW65T4=
=Va26
-----END PGP SIGNATURE-----



More information about the stunnel-users mailing list