Web lists-archives.com

Re: fork issue on 32bit




On 28/04/2017 20:38, Marco Atzeri wrote:
Hi,

I am rebuilding the pure-ftpd server.
On 64bit I have no issue while testing the 32bit version on

 $ uname -svr
CYGWIN_NT-6.1-WOW 2.8.0(0.309/5/3) 2017-04-01 20:42

 I hit:

$ ./pure-ftpd -B
      0 [main] pure-ftpd 7960 E:\cygwin\usr\sbin\pure-ftpd.exe: ***
fatal error in forked process - fork: can't reserve memory for parent
stack 0x3B0000 - 0x5B0000, (child has 0x330000 - 0x530000), Win32 error 487
      0 [main] pure-ftpd 4752 fork: child -1 - forked process 7960 died
unexpectedly, retry 0, exit code 0xC0000005, errno 11
Unable to start a standalone server - fork: Resource temporarily
unavailable

I excluded AV interference as it happens also on Safe Mode.


for the archive, the issue is caused by linking with
  "-Wl,--dynamicbase"

removing the flag this problem go away.

It was also the reason of the puzzling debug issue
that was present on both 32bit and 64bit builds:

---------------- broken --------------
$ gdb ./pure-ftpd.exe
GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
[cut]
Reading symbols from ./pure-ftpd.exe...done.
(gdb) break main
Breakpoint 1 at 0x417e7e: file main.c, line 6.
(gdb) run
Starting program: /cygdrive/e/cyg_pub/devel/pure-ftpd/prova_1036/pure-ftpd-1.0.36-2.i686/build/src/pure-ftpd.exe
[New Thread 1932.0xd2c]
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x417e70

------------ good -------------------
$ gdb ./pure-ftpd.exe
GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
[cut]
Reading symbols from ./pure-ftpd.exe...done.
(gdb) break main
Breakpoint 1 at 0x417e7e: file main.c, line 6.
(gdb) run
Starting program: /cygdrive/e/cyg_pub/devel/pure-ftpd/prova_1036/pure-ftpd-1.0.36-3.i686/build/src/pure-ftpd.exe
[New Thread 768.0xb44]
[New Thread 768.0x234]
[New Thread 768.0xe24]
[New Thread 768.0x27c]

Breakpoint 1, main (argc=1, argv=0x28cc3c) at main.c:6
6           return pureftpd_start(argc, argv, NULL);


Regards
Marco


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple