Bug#679447: Coro segfaults
Dmitry E. Oboukhov
unera at debian.org
Sat Jul 7 08:52:48 UTC 2012
>> https://gist.github.com/3059829
> Looking at that program, it seems you build a very large recursive data
> structure and then free it in one go, without providing appropriate stack
> space for this operation, so the segfault just means "out of memory"
> because of the deep recursion.
> As such, the problem has nothing to do with Coro, you are just running out
> of memory (and Coro detects this because it places guard pages at the end
> of stack to catch this problem).
> You can verify that by using gdb to get a backtrace on the crash - most
> likely you will see hundreds of recursions inside sv_free.
> If you free large data structures you need to increase the stack space,
> either using ulimit -s and/or using Coro::State::cctx_stacksize. Or change
> your program to use less memory on free.
https://gist.github.com/3059829#gistcomment-366066
I've just dropped out a lot of unnessesary code and reduced iterations
count in test.
So now example crashes if it uses 100x(100+0-100) asyncs and uses
weaken.
But if it doesn't use weakens it never crashes even if it uses
500x(2000+0-100) iterations.
ulimit -s and Coro::State::cctx_stacksize don't influence on crashes.
--
. ''`. Dmitry E. Oboukhov
: :’ : email: unera at debian.org jabber://UNera@uvw.ru
`. `~’ GPGKey: 1024D / F8E26537 2006-11-21
`- 1B23 D4F8 8EC0 D902 0555 E438 AB8C 00CF F8E2 6537
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20120707/18bd4b86/attachment.pgp>
More information about the pkg-perl-maintainers
mailing list