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: text/binmode endless loop


On Thu, Jul 29, 2004 at 10:20:44PM +0200, Alexander Gottwald wrote:
>from an strace of XWin
>
>   63 1636203 [main] Xwin 1404 writev: 1 = write (3, 0x22ED50, 1), errno 2
>   63 1636266 [main] Xwin 1404 fhandler_base::set_flags: flags 0x120601, supplied_bin 0x0
>   62 1636328 [main] Xwin 1404 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x20000
>   62 1636390 [main] Xwin 1404 fhandler_base::set_flags: filemode set to text
>   62 1636452 [main] Xwin 1404 _cygwin_istext_for_stdio: fd 3: defaulting to text
>   64 1636516 [main] Xwin 1404 setmode_helper: improbable, but 0 != 3
>   63 1636579 [main] Xwin 1404 setmode_helper: improbable, but 1 != 3
>   64 1636643 [main] Xwin 1404 setmode_helper: improbable, but 2 != 3
>   64 1636707 [main] Xwin 1404 setmode_helper: improbable, but 0 != 3
>   63 1636770 [main] Xwin 1404 setmode_helper: improbable, but 1 != 3
>   64 1636834 [main] Xwin 1404 setmode_helper: improbable, but 2 != 3
>   63 1636897 [main] Xwin 1404 setmode_helper: file was binary now text
>   68 1636965 [main] Xwin 1404 setmode: (3</tmp/XWin.log>, 0x20000) returning binary
>   65 1637030 [main] Xwin 1404 fhandler_base::set_flags: flags 0x110601, supplied_bin 0x0
>   62 1637092 [main] Xwin 1404 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
>   63 1637155 [main] Xwin 1404 fhandler_base::set_flags: filemode set to binary
>   62 1637217 [main] Xwin 1404 _cygwin_istext_for_stdio: fd 3: opened as binary
>   64 1637281 [main] Xwin 1404 setmode_helper: improbable, but 0 != 3
>   63 1637344 [main] Xwin 1404 setmode_helper: improbable, but 1 != 3
>   64 1637408 [main] Xwin 1404 setmode_helper: improbable, but 2 != 3
>   64 1637472 [main] Xwin 1404 setmode_helper: improbable, but 0 != 3
>   64 1637536 [main] Xwin 1404 setmode_helper: improbable, but 1 != 3
>   63 1637599 [main] Xwin 1404 setmode_helper: improbable, but 2 != 3
>   63 1637662 [main] Xwin 1404 setmode_helper: file was text now binary
>   64 1637726 [main] Xwin 1404 setmode: (3</tmp/XWin.log>, 0x10000) returning text
>   67 1637793 [main] Xwin 1404 writev: writev (3, 0x22ED50, 1)
>   63 1637856 [main] Xwin 1404 fhandler_base::write: binary write
>   72 1637928 [main] Xwin 1404 fhandler_base::write: 1 = write (0x100E2033, 1)
>   63 1637991 [main] Xwin 1404 writev: 1 = write (3, 0x22ED50, 1), errno 2
>   63 1638054 [main] Xwin 1404 fhandler_base::set_flags: flags 0x120601, supplied_bin 0x0
>   63 1638117 [main] Xwin 1404 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x20000
>   62 1638179 [main] Xwin 1404 fhandler_base::set_flags: filemode set to text
>   63 1638242 [main] Xwin 1404 _cygwin_istext_for_stdio: fd 3: defaulting to text
>   63 1638305 [main] Xwin 1404 setmode_helper: improbable, but 0 != 3
>   64 1638369 [main] Xwin 1404 setmode_helper: improbable, but 1 != 3
>   64 1638433 [main] Xwin 1404 setmode_helper: improbable, but 2 != 3
>   64 1638497 [main] Xwin 1404 setmode_helper: improbable, but 0 != 3
>   63 1638560 [main] Xwin 1404 setmode_helper: improbable, but 1 != 3
>   64 1638624 [main] Xwin 1404 setmode_helper: improbable, but 2 != 3
>   63 1638687 [main] Xwin 1404 setmode_helper: file was binary now text
>
>and this many, many times. / was mounted in textmode.
>
>The error does only occur if a second thread is created.

This shows write() being called repeatedly.  The fact that
setmode_helper shows up a bunch of time doesn't mean that it is caught
in a loop.  You can't infer that from strace.  You'd need to confirm
that with gdb.

cgf

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