Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-17756

CYGWIN's fork() function is broken in ReactOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • None
    • Host: Windows XP SP3
      VM: QEMU 2.7.0
      Reactos LiveCD Build 20211204-0.4.15-dev-3453-gff89651
      CYGWIN 1.7.18

    Description

      Easy to reproduce: using cmd execute forked.exe from forked.zip with cygwin1.dll in the same folder.

      Expected result: forked.exe uses fork() to create a child process, then you should see an output like this:

      fork() returns 2888
      fork() returns 0
      

      This works in Windows XP SP3

      Current behavior in ReactOS: forked.exe shows the following output:

      fork() returns -1
      

      A -1 return value means the function failed somewhere, plus, a zombie forked.exe process is created waiting for 5 minutes before terminating by itself.

      This is the most relevant part in debug log:

       
      (/ntoskrnl/mm/ARM3/virtual.c:5336) Unable to find VAD for address 0x60FF0000
      (/ntoskrnl/se/accesschk.c:541) Request for zero access to an object. Denying.
      (/ntoskrnl/mm/ARM3/virtual.c:5336) Unable to find VAD for address 0x60FC0000
      (/ntoskrnl/mm/ARM3/virtual.c:5336) Unable to find VAD for address 0x60FF0000
      (/ntoskrnl/mm/ARM3/virtual.c:5336) Unable to find VAD for address 0x60FE0000
      (/ntoskrnl/mm/ARM3/virtual.c:5336) Unable to find VAD for address 0x60FD0000
      

      Tested in both bootcd and livecd.

      Aside note: this is fixed by Cygwin 2.5.2, but because another bug, it only works in bootcd builds, but for this report, I want to focus in Cygwin 1.7.18.

      PD: Please apologize me for editing many times this bug report.

      Attachments

        1. 2K3_SP2_eng_ok.png
          2K3_SP2_eng_ok.png
          37 kB
        2. cygwin1_1.7.28-x-b.txt
          1 kB
        3. forked_ultimate.zip
          2.04 MB
        4. forked.zip
          983 kB
        5. hello.zip
          1.17 MB
        6. hiawatha.txt
          3 kB
        7. hiawatha-9.15.zip
          3.16 MB
        8. reactos-reactos_server-log-cygwin.txt
          63 kB
        9. screenshot-1.png
          screenshot-1.png
          34 kB
        10. vbox-cygwin.txt
          55 kB

        Activity

          People

            Unassigned Unassigned
            Julcar Julcar
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: