X-Spam-Check-By: sourceware.org
Date: Wed, 30 Aug 2006 13:03:12 -0400 (EDT)
From: Igor Peshansky <pechtcha@cs.nyu.edu>
Reply-To: cygwin@cygwin.com
To: ukr.name.lists@gmail.com
cc: cygwin@cygwin.com
Subject: Re: Apache 1.3.33 on W2003 problems only on system boot
In-Reply-To: <147239341.20060830182731@gmail.com>
Message-ID: <Pine.GSO.4.63.0608301257430.20474@access1.cims.nyu.edu>
References: <78145923.20060830151248@ukr.name>   <Pine.GSO.4.63.0608301024070.20474@access1.cims.nyu.edu>  <147239341.20060830182731@gmail.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.GSO.4.63.0608301257432.20474@access1.cims.nyu.edu>
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Wed, 30 Aug 2006, ukr.name.lists wrote:

> Hello, Igor.
>
> OK, Here's long story. I'm trying to replay what I did to set
> up Apache before.
>
> Did $cygrunsrv.exe -I httpd -d "CYGWIN httpd" -p /usr/sbin/httpd -a -F
> Started service. Doesn't work. Lines in error_log:
>
> [Wed Aug 30 17:52:30 2006] [notice] Apache/1.3.33 (Cygwin) configured -- resuming normal operations
> [Wed Aug 30 17:52:30 2006] [notice] Accept mutex: pthread (Default: pthread)
> [Wed Aug 30 17:52:30 2006] [alert] (3)No such process: setuid: unable to change to uid: 1003
> [Wed Aug 30 17:52:31 2006] [alert] Child 2920 returned a Fatal error... \nApache is exiting!
>
> uid 1003 exists and my current uid. After some digging found out that
> there's some special user needed instead of SYSTEM to run such services in 2003.
>
> Decided to setup OpenSSH and use it's sshd_server user to run Apache.
>
> Executed ssh-host-config, did $cygrunsrv -S sshd, checked if sshd
> running and accepts connection - yes. Rebooted. Checked if sshd running.
> Kinda. It's still in list of running services but doesn't accept any
> connections. Messages from /var/log/sshd.log:
>       5 [main] ? (3788) E:\Cygwin\usr\sbin\sshd.exe: *** fatal error - E:\Cygwin\usr\sbin\sshd.exe: *** couldn't allocate heap, Win32 error 0, base 0x6A0000, top 0x6B0000, reserve_size 61440, allocsize 65536, page_const 4096
>       9 [main] sshd 1952 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0x100, errno 11
>       4 [main] ? (3960) E:\Cygwin\usr\sbin\sshd.exe: *** fatal error - E:\Cygwin\usr\sbin\sshd.exe: *** couldn't allocate heap, Win32 error 0, base 0x6A0000, top 0x6B0000, reserve_size 61440, allocsize 65536, page_const 4096
> 2754387 [main] sshd 1952 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0x100, errno 11
>       4 [main] ? (1684) E:\Cygwin\usr\sbin\sshd.exe: *** fatal error - E:\Cygwin\usr\sbin\sshd.exe: *** couldn't allocate heap, Win32 error 0, base 0x6A0000, top 0x6B0000, reserve_size 61440, allocsize 65536, page_const 4096
> 38433345 [main] sshd 1952 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0x100, errno 11
>
> Last error repeated on each connect attempt.
>
> Then did:
> $ cygrunsrv -E sshd
> $ telnet localhost 22
> Trying 127.0.0.1...
> telnet: Unable to connect to remote host: Connection refused
> $ cygrunsrv -S sshd
> $ telnet localhost 22
> Trying 127.0.0.1...
> Connected to nowhere-vi3mfi2.
> Escape character is '^]'.
> Connection closed by foreign host.
>
> Now it works. Nothing in log.
>
> I'll stop here before proceeding to Apache because it behave exactly
> the same - "couldn't allocate heap after boot", normal operation after
> restarting service.
>
> Thank you in advance !

Sergei,

The fact that the service doesn't work after system boot and then works
fine after a restart seems to suggest that it's started too early (before
some other service).  You need to discover what that service is (could be
the firewall service, or Tcp/ip, or something else) and add a dependency
to it by using the -y cygrunsrv option.  Your cygcheck output confirms
that your apache service has no dependencies.
HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

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

