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]

Re: Problems running Jabberd v1.4.3 under Cygwin v1.5.7 (or latest snapshot), and heap allocation error caused by fork()


Hey Larry,

Basically, no, I haven't been able to reproduce it outside of Jabberd.

Then again, I don't have a lot of custom source to compile/use. My simple test program (the one which loaded a DLL which in turn did a fork()) worked fine, but that was an uber-simple app.

Jabberd fires up multiple threads/processes with more than one fork()/spawn_() call prior to reaching the dnsrv module where the final fork() breaks the camel's back as it were.

Note that when you run Jabberd with the Win32-specific version (which does not use fork()), this error does not popup. So it's almost like too many forks are occurring, just one too many to push onto the heap, or when you hit a certain number you suddenly invade illegal memory space. But using the switch I listed to increase the heap size--my understanding is the default in Cygwin is 1MB and it's fixed, so the switch SHOULD have made it close to 5MB, which should be more than enough space RAM-wise--this should have 'fixed' the issue but didn't.

So I'm still scratching my head. Short of writing a more sophisticated app which just forks() like mad (gee, sounds like an X-rated program :-/), not sure how I can try to duplicate this.

Are there any other things I can look at to clue in on whether the issue is running out of memory or some such thing? The box I'm doing this on has 512MB RAM and it's not being taxed at all when I run these tests. My laptop has 256MB and when I have time, I'll try and redo these tests on it as well to see, but I suspect the same issue will occur.

I have never had luck with running the *nix dnsrv code under Cygwin (the same errors showed up under Cygwin 1.5.5 back in November/December when I first tried this, but didn't have much time then so just resolved myself to using the Win-specific code). But now with even that not working, figured might as well see if I can't make this all work *nix-native like, and maybe kill off the 2 EXE setup vs. the usual single executable under *nix.

Anyway, any thoughts/ideas/etc. still welcome. I figure if the folks on this list don't have ideas, I'm pretty well screwed. :-/

Larry Hall wrote:
At 07:03 PM 3/11/2004, you wrote:

At this point, I do not know if I am chasing my tail or not. When an application suffers this Win32 error 487 message, is it usually an indication of some glitch in cygwin1.dll, or is it as the message seems to indicate, either some sort of issue of not enough stack/heap space, or worse, some kind of access violation where the program is attempting to access memory it should not?



Here's what Windows says about error # 487:


# net helpmsg 487

Attempt to access invalid address.

So it would appear that your last guess is the proper one. Can you reproduce it outside of Jabberd?



--
Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
838 Washington Street (508) 893-9889 - FAX
Holliston, MA 01746





--
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/


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