ipc, sockets and windows sp2

Vincent Dedun kraken+spam@smousseland.com
Fri Apr 1 11:06:00 GMT 2005


Corinna Vinschen wrote :

>>There seems to be odd problems with windows sp2 (and some sp1 with 
>>undetermined updates).
>>    
>>
>
>Never heard of Windows sp2.  NT4 SP2?  2000 SP2?  XP SP2?
>  
>
I'm sorry I sometimes forget there are several windows versions.
I'm using windows xp sp2 with all lastest microsoft updates (Windows XP 
Pro. V 5.1 Build 2600 SP2)
I had the same result on some windows xp sp1 computers which had some 
microsoft updates.
I had a correct behaviour (no bug), on some windows xp sp1 computers 
which had no updates.
I tried lastest cygwin snapshot (2005-Mar-30). So cygwin dll version is 
1.5.14 build on March 30 2005.
I attach cygcheck.out as asked in the cygwin' problem webpage.

>>I work on windows version of drqueue, which is an opensource distributed 
>>rendering management software (for use with maya rendering for exemple), 
>>designed for unix, so it uses IPC ans sockets.
>>
>>The port works well for the most of it, except for the server itself 
>>(the master program).
>>The unix version has no problem on all this, it works on linux, bsds, irix..
>>
>>Please take a look in the main loop (main function), of this short file :
>>http://www.drqueue.org/svn/trunk/drqueue/master.c
>>
>>basicly, the program do this :
>>-init config
>>-load saved database of jobs
>>-set signals handlers
>>-get shared memory (IPC shared memory and semaphores)
>>-fork a consitency checking task (it is not involved in the problem, i 
>>tested)
>>-bind a port (it's server!)
>>-then go the usual main loop which forks childs process to accept 
>>connections.
>>
>>on windows sp2 (and some sp1 with updates), the master keep yelling a 
>>strange error  :
>>
>>*** MapViewOfFileEx (0xF10000), Win32 error 487.  Terminating.
>>
>>error 487 means 
>>"Attempt to access invalid address."
>>    
>>
>
>Ok, three things here.
>
>First, please follow the reporting guidelines on
>http://cygwin.com/problems.html.
>  
>
i read most of it before sending the message, but I was not enough 
precise in my previous mail, I'm sorry.

>Second, did you try a developers snapshot from http://cygwin.com/snapshots?
>  
>
i just tried (i installed it as said in the faq, check cygcheck.out, 
you'll see dll version is lastest).
I got the same result

>Third, if that's not already mentioned on the problems web page, please
>try to create a short, brief, concise, simple, as minimal as possible,
>self-contained testcase which allows to reproduce the problem.
>  
>
I didn't find something in the mailing list talking specifically on 
socket, ipc and windows xp sp2 problem.

So I hope you wouldn't mind I attached a short testing program you can 
easily compil with gcc to reproduce the bug.
If you have SP1, you may not see the bug (depend of your upgrades).
I attached the program output with those MapViewOfFileEx errors.

In the C file :
If you do not define USE_IPC, you should not have the bug, as it occurs 
only with shared memory used.
If you define BIND_AFTER_FORK, you should not have the bug either, as it 
occurs when there is a fork after a BIND and before end of socket usage. 
But using BIND_AFTER_WORK is not a good way to handle the socket.

If you know a workaround, waiting this to be fixed, I would enjoy to use 
it in my program.

Thank you and sorry for my lack of precision in previous mail,

Vincent



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050401/b2c33866/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fork-ipc.c
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050401/b2c33866/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fork-ipc.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050401/b2c33866/attachment-0001.ksh>
-------------- next part --------------
--
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/


More information about the Cygwin mailing list