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]

1.5.21: Problems with fifos


Hello

First, I would like to mention that I am new on this list and new to cygwin.
Also I would like to thank everyone that has contributed to cygwin!

Recently I tried to get my own project AFD (automatic file distribution
system http://www.dwd.de/AFD) to work under windows with the help of
cygwin. Compiling works without any problems, however trying to start
the application I always get the following errors:

  72382 [main] init_afd 1788 fhandler_base::fork_fixup: /home/Holger/afd/fifodir/afd_cmd.fifo - Win32 error 6, handle io_handle<0x0>
  72797 [main] init_afd 1788 fhandler_base::fork_fixup: /home/Holger/afd/fifodir/afd_resp.fifo - Win32 error 6, handle io_handle<0x0>
  72932 [main] init_afd 1788 fhandler_base::fork_fixup: /home/Holger/afd/fifodir/amg_cmd.fifo - Win32 error 6, handle io_handle<0x0>
  73151 [main] init_afd 1788 fhandler_base::fork_fixup: /home/Holger/afd/fifodir/fd_cmd.fifo - Win32 error 6, handle io_handle<0x0>
  73294 [main] init_afd 1788 fhandler_base::fork_fixup: /home/Holger/afd/fifodir/probe_only.fifo - Win32 error 6, handle io_handle<0x0>
  97242 [main] init_afd 988 fhandler_base::fork_fixup: /home/Holger/afd/fifodir/afd_cmd.fifo - Win32 error 6, handle io_handle<0x0>
  98646 [main] init_afd 988 fhandler_base::fork_fixup: /home/Holger/afd/fifodir/afd_resp.fifo - Win32 error 6, handle io_handle<0x0>
 117644 [main] init_afd 988 fhandler_base::fork_fixup: /home/Holger/afd/fifodir/amg_cmd.fifo - Win32 error 6, handle io_handle<0x0>

I think that I have found the cause for these error messages. When I remove
the FD_CLOEXEC flag, that was used to open the fifo's, the message would
disapear. However all my process are still stuck somewhere in some win32
libs. Below is some gdb output of two stuck process:

   $ ps x
         PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
        2172       1    2172       2172  con 1004 04:45:18 /usr/bin/bash
        2620    2172    2620       2656  con 1004 04:45:31 /usr/bin/sh
        2668    2620    2620       2688  con 1004 04:45:31 /usr/X11R6/bin/xinit
        2700    2668    2700       2720  con 1004 04:45:31 /usr/X11R6/bin/XWin
        2840    2668    2840       2864  con 1004 04:45:36 /usr/bin/xterm
   I    2888    2840    2888       2904    0 1004 04:45:37 /usr/bin/bash
        3356    2888    3356       3368    0 1004 04:45:44 /usr/bin/rxvt
        3392    3356    3392       3412    1 1004 04:45:45 /usr/bin/sh
        3760    2888    3760       3772    0 1004 04:45:50 /usr/bin/rxvt
        3796    3760    3796       3812    2 1004 04:45:50 /usr/bin/sh
         336       1    1620        336    ? 1004 04:47:04 /home/Holger/afd/bin/init_afd
         832     336    1620       1920    ? 1004 04:47:04 /home/Holger/afd/bin/system_log
         828     336    1620       1792    ? 1004 04:47:04 /home/Holger/afd/bin/receive_log
         736     336    1620        296    ? 1004 04:47:04 /home/Holger/afd/bin/transfer_log
        1908     336    1620       2120    ? 1004 04:47:04 /home/Holger/afd/bin/trans_db_log
        1732     336    1620        308    ? 1004 04:47:04 /home/Holger/afd/bin/archive_watch
        1644     336    1620       1224    ? 1004 04:47:04 /home/Holger/afd/bin/input_log
        2116     336    1620       2268    ? 1004 04:47:05 /home/Holger/afd/bin/output_log
        1956     336    1620       2284    ? 1004 04:47:05 /home/Holger/afd/bin/delete_log
        2216     336    1620       2236    ? 1004 04:47:05 /home/Holger/afd/bin/production_log
        2396    3796    2396       2440    2 1004 04:48:13 /usr/bin/ps
   $
   $ gdb init_afd 336
   GNU gdb 6.5.50.20060706-cvs (cygwin-special)
   Copyright (C) 2006 Free Software Foundation, Inc.
   GDB is free software, covered by the GNU General Public License, and you are
   welcome to change it and/or distribute copies of it under certain conditions.
   Type "show copying" to see the conditions.
   There is absolutely no warranty for GDB.  Type "show warranty" for details.
   This GDB was configured as "i686-pc-cygwin"...
   Attaching to program `/home/Holger/afd/bin/init_afd.exe', process 336
   Loaded symbols for /cygdrive/c/WINDOWS/system32/ntdll.dll
   Loaded symbols for /cygdrive/c/WINDOWS/system32/kernel32.dll
   Loaded symbols for /usr/bin/cygwin1.dll
   Loaded symbols for /cygdrive/c/WINDOWS/system32/advapi32.dll
   Loaded symbols for /cygdrive/c/WINDOWS/system32/rpcrt4.dll

   [Switching to thread 336.0x970]
   (gdb) where
   #0  0x7c911231 in ntdll!DbgUiConnectToDbg ()
      from /cygdrive/c/WINDOWS/system32/ntdll.dll
   #1  0x7c9607a8 in ntdll!KiIntSystemCall ()
      from /cygdrive/c/WINDOWS/system32/ntdll.dll
   #2  0x00000005 in ?? ()
   #3  0x00000004 in ?? ()
   #4  0x00000001 in ?? ()
   #5  0x19a6ffd0 in ?? ()
   #6  0x805686c0 in ?? ()
   #7  0xffffffff in ?? ()
   #8  0x7c91ee18 in strchr () from /cygdrive/c/WINDOWS/system32/ntdll.dll
   #9  0x7c9607c8 in ntdll!KiIntSystemCall ()
      from /cygdrive/c/WINDOWS/system32/ntdll.dll
   #10 0x00000000 in ?? ()
   (gdb) quit
   The program is running.  Quit anyway (and detach it)? (y or n) y
   Detaching from program: /home/Holger/afd/bin/init_afd.exe, Pid 336
   $ gdb system_log 832
   GNU gdb 6.5.50.20060706-cvs (cygwin-special)
   Copyright (C) 2006 Free Software Foundation, Inc.
   GDB is free software, covered by the GNU General Public License, and you are
   welcome to change it and/or distribute copies of it under certain conditions.
   Type "show copying" to see the conditions.
   There is absolutely no warranty for GDB.  Type "show warranty" for details.
   This GDB was configured as "i686-pc-cygwin"...
   Attaching to program `/home/Holger/afd/bin/system_log.exe', process 1920
   Loaded symbols for /cygdrive/c/WINDOWS/system32/ntdll.dll
   Loaded symbols for /cygdrive/c/WINDOWS/system32/kernel32.dll
   Loaded symbols for /usr/bin/cygwin1.dll
   Loaded symbols for /cygdrive/c/WINDOWS/system32/advapi32.dll
   Loaded symbols for /cygdrive/c/WINDOWS/system32/rpcrt4.dll

   [Switching to thread 1920.0xa14]
   (gdb) where
   #0  0x7c911231 in ntdll!DbgUiConnectToDbg ()
      from /cygdrive/c/WINDOWS/system32/ntdll.dll
   #1  0x7c9607a8 in ntdll!KiIntSystemCall ()
      from /cygdrive/c/WINDOWS/system32/ntdll.dll
   #2  0x00000005 in ?? ()
   #3  0x00000004 in ?? ()
   #4  0x00000001 in ?? ()
   #5  0x1887ffd0 in ?? ()
   #6  0x804fbaa6 in ?? ()
   #7  0xffffffff in ?? ()
   #8  0x7c91ee18 in strchr () from /cygdrive/c/WINDOWS/system32/ntdll.dll
   #9  0x7c9607c8 in ntdll!KiIntSystemCall ()
      from /cygdrive/c/WINDOWS/system32/ntdll.dll
   #10 0x00000000 in ?? ()
   (gdb) quit
   The program is running.  Quit anyway (and detach it)? (y or n) y
   Detaching from program: /home/Holger/afd/bin/system_log.exe, Pid 1920

Unfortunatly I do not know what is going on here. Can someone please help
me locate what I am doing wrong?

My application makes much use of fifo's and reading the archive of this
mailing list I found places where it was mentioned that fifo support is not
yet complete (unfortunatly I do not have a link). But I do not know if this
is still true and if this is my problem.

Additionally I found in the list that opening fifo's O_RDWR is not working
under cygwin (this is also not defined in the specs, but most unixes do
support it), so I used the workaround to open() the fifo once for reading
and another open() for writting (ie. using two filedescriptors for one fifo).
Should this work under cygwin?

Attached I have the cygcheck.out file. Please tell me if I forget to mention
any information that could be usefull or what I can do to solve this.

Thanks,
Holger
--

Attachment: cygcheck.out
Description: Text document

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