Hi Thomas,

----- Forwarded message from "Dr. Volker Zell" <[EMAIL PROTECTED]> -----
> Date: Tue, 30 Mar 2004 09:30:52 +0200
> From: "Dr. Volker Zell" <[EMAIL PROTECTED]>
> Subject: Re: uxterm from xterm-185-3 and xfontsel crashing when running
>  under cygserver support
> To: [EMAIL PROTECTED]
> Reply-To: [EMAIL PROTECTED]
> 
> >>>>> "Corinna" == Corinna Vinschen writes:
> 
>     Corinna> I've build my own debug version of the X stuff today and I tracked the
>     Corinna> SEGV down.  It's an unfortunate combination of two bugs in the SHM
>     Corinna> implementation:
> [...]
> 
> I just tried your fix which seems to be in the 20040329 snapshot. But
> now /usr/sbin/cygserver doesn't start anymore. I installed it as a
> service with cygrunsrv. The same happens for my other cygwin service
> /sbin/init which also refuses to start. In the process list I could see
> 4 !! /bin/cygrunsrv processes so. Reverting to 1.5.9 and all is fine.
----- End forwarded message -----

I've tracked down this problem to the point that I know what change has
introduced this problem.  It happens with all snapshots since 20040326
and the change was this one:

2004-03-26 Thomas Pfaff <[EMAIL PROTECTED]>

        [...]
        (pthread::atforkprepare): Lock file pointer before fork.
        (pthread::atforkparent): Unlock file pointer after fork.
        (pthread::atforkchild): Ditto.

More exactly, the problem happens in pthread::atforkchild ():

        void
        pthread::atforkchild (void)
        {
          MT_INTERFACE->fixup_after_fork (); 

          __fp_unlock_all ();

          [...]
        }

where it hangs in fixup_after_fork().  When turning around the order
of the above two commands, evrything seems to work fine:

        void
        pthread::atforkchild (void)
        {
          __fp_unlock_all ();

          MT_INTERFACE->fixup_after_fork ();

          [...]
        }

Can you explain this?  Is the fix correct?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:[EMAIL PROTECTED]
Red Hat, Inc.

Reply via email to