Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 1 Apr 2005 14:11:43 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: ipc, sockets and windows sp2 Message-ID: <20050401121143.GD1471@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <424D0232 DOT 5060305 AT smousseland DOT com> <20050401090414 DOT GD7415 AT cygbert DOT vinschen DOT de> <424D2B0B DOT 8000604 AT smousseland DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <424D2B0B.8000604@smousseland.com> User-Agent: Mutt/1.4.2i On Apr 1 13:05, Vincent Dedun wrote: > So I hope you wouldn't mind I attached a short testing program you can > easily compil with gcc to reproduce the bug. Cool, that's exactly what I was asking for. I was immediately able to reproduce the problem and it turned out, that on fork() the socket duplication from parent to child process for some reason occupied space in the child, which in the parent is occupied by the shared memory returned by shmat. Consequentially the duplication of the shared memory couldn't occupy the same address as in the parent. That's a fatal error so the forked child terminated itself with error 487, which basically means "Invalid address". I've changed fork() so that the shared memory is duplicated before sockets are duplicated, which is ok because sockets don't have special requirements for memory addresses. That works fine for me, but it would be good if you could test the next snapshot, which I just uploaded, nevertheless. It's just incredible that nobody found this problem before. Again, thanks for the testcase, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/