This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[GOLDSTAR] Re: STC for fork SEGV after dlclose

On May 27 10:19, David Rothenberger wrote:
> The STC fails with the 2013-05-24 32-bit snapshot and the 1.7.19-6
> 64-bit release. The full libapr1 test suite fails with the 64-bit
> release if I include the testdso test cases, but succeeds if I exclude
> them. For 32-bit, the full test suite passes even with the testdso test
> cases. I don't understand why that is.

Me neither.  I debugged this in the 64 bit code, and it turned out that
the 64 bit version stumbled over two bugs.  One of these bugs I
introduced only six days ago, and it affected only the 64 bit version.

The other bug was already present for quite some time and it's a generic
bug which affects 32 and 64 bit.  There's a piece of pre-fork code which
handles the loaded DLLs of a process, and there's one condition which
never worked correctly if all dlopened DLLs had already been dlclosed
before fork was called.
In theory, this should always have crashed.  Did you say in your OP that
the 32 bit 1.7.18 didn't crash, but the fork never run either in the
testcase?  That sounds weird as effect, but the bug might explain that

> That is, my STC shows that a dlclose() will break subsequent fork()
> calls, but that breakage doesn't occur with the full libapr1 test suite
> on 32-bit for some unknown reason.
> But as long as my STC isn't completely ridiculous, fixing it might fix
> the 64-bit test suite.

It's not at all ridiculous.  Thanks for providing it.

I take the opportunity to thank you for all the testcases you provided
in the last couple of months.  Your STCs have helped Cygwin a lot already!

Andrew, I'd like to have a goldstar for David for providing short, simple,
easy to reproduce testcases in plain C.  Thanks!

Other than that, I'll upload a new 32 bit snapshot and a new 64 bit
Cygwin package within the next hour or so.  Please give both of them
a try.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]