RE : tee core dumped

2003-09-05 Thread Philippe Torche
Many thanks,

I've tested it successfully with the latest CVS version (Friday 5 oct
10:50 GMT+2)

 -Message d'origine-
 De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 De la part de Christopher Faylor
 Envoyé : vendredi, 5. septembre 2003 03:57
 À : [EMAIL PROTECTED]
 Objet : Re: tee core dumped
 
 
 On Fri, Aug 29, 2003 at 12:11:43PM +0200, Philippe Torche wrote:
 No body arrived to reproduce this ?
 Actually I can produce this sometimes using isql from MS, gawk, ... 
 It's for me a very big problem !
 
 This will be fixed in the next snapshot:
 
 http://cygwin.com/snapshots/
 
 and in the 1.5.4 release, of course.
 --
 Please use the resources at cygwin.com rather than sending personal
email. Special for spam email harvesters: send   email to
[EMAIL PROTECTED] and be permanently blocked from mailing lists at
sources.redhat.com


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



Re: RE : tee core dumped

2003-09-05 Thread Christopher Faylor
On Fri, Sep 05, 2003 at 12:07:32PM +0200, Philippe Torche wrote:
I've tested it successfully with the latest CVS version (Friday 5 oct
10:50 GMT+2)

Btw, this problem is due to an, IMO, bone headed thing that tee does to
its argv list.  It moves things around in this array and eliminates the
NULL termination.

The Cygwin DLL should not crash when a user changes input like this,
(and this is the second problem we've seen like this in two weeks) but
still, what tee is doing is very strange.

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/



Re: tee core dumped

2003-09-04 Thread Christopher Faylor
On Fri, Aug 29, 2003 at 12:11:43PM +0200, Philippe Torche wrote:
No body arrived to reproduce this ?
Actually I can produce this sometimes using isql from MS, gawk, ...
It's for me a very big problem !

This will be fixed in the next snapshot:

http://cygwin.com/snapshots/

and in the 1.5.4 release, of course.
--
Please use the resources at cygwin.com rather than sending personal email.
Special for spam email harvesters: send email to [EMAIL PROTECTED]
and be permanently blocked from mailing lists at sources.redhat.com

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



RE : tee core dumped

2003-08-29 Thread Philippe Torche
No body arrived to reproduce this ?
Actually I can produce this sometimes using isql from MS, gawk, ...
It's for me a very big problem !

Please help me !

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part
de Philippe Torche
Envoyé : mercredi, 27. août 2003 13:02
À : [EMAIL PROTECTED]
Objet : tee core dumped


I found a problem with tee (probably), please try this sample code
below. I've found the same problem with other tools like gawk, ...

echo '#!/usr/bin/bash
sleep 10  /dev/null 21 
transfert_job=$!

echo LINENO=$LINENO
procps -p $transfert_job -o 'pid,ppid'
echo LINENO=$LINENO
'  test.sh
chmod +x test.sh
# OK
test.sh  test.out
# KO KO KO KO KO KO KO KO KO KO KO KO KO KO
test.sh | tee test.out
# Segmentation fault (core dumped)

Info:



$ cat tee.exe.stackdump
Exception: STATUS_ACCESS_VIOLATION at eip=610BA041
eax= ebx=615F1F50 ecx= edx=6F6C5C72 esi=0076FE9C
edi=6F6C5C72 ebp=0076FE74 esp=0076FE70 program=C:\cygwin\bin\tee.exe
cs=001B ds=0023 es=0023 fs=0038 gs= ss=0023 Stack trace:
Frame Function  Args
0076FE74  610BA041  (6F6C5C72, 0076FEA0, 0004, 0076FE9C) 0076FEB4
6105828B  (00A2, , , ) 0076FF04  61077738
(FFFE, 0010, , ) 0076FF84  61077CC8  (610D1B58,
, 858A88E0, 804FAB78) 0076FFB4  610053C8  (610D1B58, ,
0022FC44, 610D1B58)
  3 [sig] tee 2400 handle_exceptions: Error while dumping state
(probably corrupted stack)


$ /usr/bin/tee --version
tee (sh-utils) 2.0.15
Written by Mike Parker, Richard M. Stallman, and David MacKenzie.


$ cygcheck -svr

Cygwin Win95/NT Configuration Diagnostics
Current System Time: Wed Aug 27 12:43:46 2003

Windows XP Professional Ver 5.1 Build 2600 Service Pack 1

Path:   .
C:\cygwin\usr\local\bin
C:\cygwin\bin
C:\cygwin\bin
c:\Perl\bin\
c:\WINDOWS\system32
c:\WINDOWS
c:\WINDOWS\System32\Wbem
c:\util
C:\cygwin\bin
c:\Program Files\doxygen\bin
c:\PROGRA~1\ATT\Graphviz\bin
c:\PROGRA~1\ATT\Graphviz\bin\tools
c:\Program Files\CodeProject\NScript
c:\Program Files\Microsoft SQL Server\80\Tools\Binn\
C:\cygwin\home\pto\bin
c:\PROGRA~1\HTMLHE~1

C:\cygwin\bin\id.exe output (nontsec)
UID: 1003(pto)   GID: 547(Power
groups=513(None) 544(Administrators)
545(Users)

C:\cygwin\bin\id.exe output (ntsec)
UID: 1003(pto)   GID: 547(Power
groups=513(None) 544(Administrators)
545(Users)

SysDir: C:\WINDOWS\System32
WinDir: C:\WINDOWS

CYGWIN = `binmode ntsec codepage:ansi'
HOME = `C:\cygwin\home\pto'
MAKE_MODE = `unix'
PWD = `/home/pto/tmp'
USER = `pto'

ALLUSERSPROFILE = `C:\Documents and Settings\All Users'
APPDATA = `C:\Documents and Settings\pto\Application Data' BASH_ENV =
`/home/pto/.bashrc' CLASSPATH = `C:\Program
Files\Altova\xmlspy\XMLSpyInterface.jar'
COLUMNS = `110'
COMMONPROGRAMFILES = `C:\Program Files\Common Files' COMPUTERNAME =
`PC5' COMSPEC = `C:\WINDOWS\system32\cmd.exe' CVS_RSH = `ssh' DISPLAY =
`:0.0' EDITOR = `vim' HOMEDRIVE = `C:' HOMEPATH = `\Documents and
Settings\pto' INCLUDE = `c:\Program Files\Microsoft Visual Studio .NET
2003\SDK\v1.1\include\;C:\Program Files\Microsoft Visual Studio
.NET\FrameworkSDK\include\' LIB = `c:\Program Files\Microsoft Visual
Studio .NET 2003\SDK\v1.1\Lib\;C:\Program Files\Microsoft Visual Studio
.NET\FrameworkSDK\Lib\' LINES = `48' LOGONSERVER = `\\PC5' MANPATH =
`:/usr/ssl/man' NUMBER_OF_PROCESSORS = `1' OLDPWD = `/home/pto' OS =
`Windows_NT' PATHEXT =
`.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
PROCESSOR_ARCHITECTURE = `x86'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 8 Stepping 1, AuthenticAMD'
PROCESSOR_LEVEL = `6' PROCESSOR_REVISION = `0801' PROGRAMFILES =
`C:\Program Files' PS1 = `\[\033]0;\w\007 [EMAIL PROTECTED]
\[\033[33m\w\033[0m\] $ ' SESSIONNAME = `Console' SHLVL = `1' SYBASE =
`c:\sybase' SYBASE_JRE = `c:\sybase\shared-1_0\jre1.2.2' SYSTEMDRIVE =
`C:' SYSTEMROOT = `C:\WINDOWS' TEMP = `c:\DOCUME~1\pto\LOCALS~1\Temp'
TERM = `cygwin' TMP = `c:\DOCUME~1\pto\LOCALS~1\Temp' USERDOMAIN = `PC5'
USERNAME = `pto' USERPROFILE = `C:\Documents and Settings\pto'
VS71COMNTOOLS = `c:\Program Files\Microsoft Visual Studio .NET
2003\Common7\Tools\' VSCOMNTOOLS = `C:\Program Files\Microsoft Visual
Studio .NET\Common7\Tools\' WINDIR = `C:\WINDOWS' _ =
`/usr/bin/cygcheck'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
  (default) = `/cygdrive'
  cygdrive flags = 0x0022 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus

Re: RE : tee core dumped

2003-08-29 Thread Elfyn McBratney
Philippe Torche wrote:
 No body arrived to reproduce this ?
 Actually I can produce this sometimes using isql from MS, gawk, ...
 It's for me a very big problem !
 
 Please help me !

Calm down!  The last two weeks have been stressful for most with all of
the viruses and spam flying around on the list.  It's easy to miss *1*
post.

 [...]
 I found a problem with tee (probably), please try this sample code
 below. I've found the same problem with other tools like gawk, ...
 
 echo '#!/usr/bin/bash
 sleep 10  /dev/null 21 
 transfert_job=$!
 
 echo LINENO=$LINENO
 procps -p $transfert_job -o 'pid,ppid'
 echo LINENO=$LINENO
 '  test.sh
 chmod +x test.sh
 # OK
 test.sh  test.out
 # KO KO KO KO KO KO KO KO KO KO KO KO KO KO
 test.sh | tee test.out
 # Segmentation fault (core dumped)

I can re-produce this (same as above) and from within gdb, with a SEGV as a
result of both.  I don't have a debug version installed, so if anyone else
does and want's to try and help out.  :-)

 [...]
 
 $ cat tee.exe.stackdump
 Exception: STATUS_ACCESS_VIOLATION at eip=610BA041
 eax= ebx=615F1F50 ecx= edx=6F6C5C72 esi=0076FE9C
 edi=6F6C5C72 ebp=0076FE74 esp=0076FE70 program=C:\cygwin\bin\tee.exe
 cs=001B ds=0023 es=0023 fs=0038 gs= ss=0023 Stack trace:
 Frame Function  Args
 0076FE74  610BA041  (6F6C5C72, 0076FEA0, 0004, 0076FE9C) 0076FEB4
 6105828B  (00A2, , , ) 0076FF04  61077738
 (FFFE, 0010, , ) 0076FF84  61077CC8  (610D1B58,
 , 858A88E0, 804FAB78) 0076FFB4  610053C8  (610D1B58, ,
 0022FC44, 610D1B58)
   3 [sig] tee 2400 handle_exceptions: Error while dumping state
 (probably corrupted stack)
 [...]

Please do not inline cygcheck output, always attach it *to the mail*.  It
create's false positives for those searching the archives, and can be a real
pain if your looking for something and all you get is masses and masses of
hits from people's mail that has inlined cygcheck output.

-- Elfyn

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



Re: tee core dumped

2003-08-29 Thread Igor Pechtchanski
On Wed, 27 Aug 2003, Philippe Torche wrote:

 I found a problem with tee (probably), please try this sample code
 below. I've found the same problem with other tools like gawk, ...

 echo '#!/usr/bin/bash
 sleep 10  /dev/null 21 
 transfert_job=$!

 echo LINENO=$LINENO
 procps -p $transfert_job -o 'pid,ppid'
 echo LINENO=$LINENO
 '  test.sh
 chmod +x test.sh
 # OK
 test.sh  test.out
 # KO KO KO KO KO KO KO KO KO KO KO KO KO KO
 test.sh | tee test.out
 # Segmentation fault (core dumped)

 Info:
 

 
 $ cat tee.exe.stackdump
 Exception: STATUS_ACCESS_VIOLATION at eip=610BA041
 eax= ebx=615F1F50 ecx= edx=6F6C5C72 esi=0076FE9C
 edi=6F6C5C72
 ebp=0076FE74 esp=0076FE70 program=C:\cygwin\bin\tee.exe
 cs=001B ds=0023 es=0023 fs=0038 gs= ss=0023
 Stack trace:
 Frame Function  Args
 0076FE74  610BA041  (6F6C5C72, 0076FEA0, 0004, 0076FE9C)
 0076FEB4  6105828B  (00A2, , , )
 0076FF04  61077738  (FFFE, 0010, , )
 0076FF84  61077CC8  (610D1B58, , 858A88E0, 804FAB78)
 0076FFB4  610053C8  (610D1B58, , 0022FC44, 610D1B58)
   3 [sig] tee 2400 handle_exceptions: Error while dumping state
 (probably corrupted stack)

 
 $ /usr/bin/tee --version
 tee (sh-utils) 2.0.15
 Written by Mike Parker, Richard M. Stallman, and David MacKenzie.

 
 $ cygcheck -svr
 [snip]

Philippe,

Lack of responses doesn't necessarily indicate that your post wasn't seen
(or your problem reproduced), but more likely lack of time for debugging
the problem (see http://www.catb.org/~esr/faqs/smart-questions.html).

FWIW, I was able to reproduce your problem (in fact, simply calling
/bin/procps -p $$ -o 'pid,ppid' | tee test.out was enough to trigger the
problem). At the moment, I don't have an unstripped version of the DLL
installed on my system, so I couldn't do the debugging necessary for this.
From the range of addresses in the stack trace, it seems to happen
somewhere in the Cygwin DLL itself.  I've compared the strace for the
problematic command with the one from simply doing echo | tee test.out.
The difference in straces is not significant (to me), except that readv()
seems to never get to the end of fhandler_base::read().  I'm attaching the
relevant chunk of the diffs (with times and PIDs stripped out to minimize
noise) in the hopes that this helps someone else debug this.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster.  -- Patrick Naughton--- tee-echo.strace 2003-08-29 09:18:45.0 -0400
+++ tee-procps.strace   2003-08-29 09:18:54.0 -0400
@@ -5,7 +5,7 @@ DLL version:  1003.22, api: 0.78

 DLL build:2003-03-18 09:20
 OS version:   Windows NT-5.0
 Heap size:402653184
-Date/Time:2003-08-29 09:01:55
+Date/Time:2003-08-29 09:04:09
 **
 X X [main] tee  environ_init: 0x10020008: !C:=C:\cygwin\bin
 X X [main] tee  environ_init: 0x100204D0: ALLUSERSPROFILE=C:\Documents and 
Settings\All Users
@@ -199,11 +199,11 @@ X X [main] tee  sigproc_init: proces
 X X [main] tee  _cygwin_istext_for_stdio: _cygwin_istext_for_stdio (0)
 X X [main] tee  _cygwin_istext_for_stdio:  _cifs: fd not open
 X X [main] tee  _cygwin_istext_for_stdio: _cygwin_istext_for_stdio (1)
+X X [sig] tee  wait_sig: sigcatch_nonmain 0xCC, sigcatch_main 0xD0
+X X [sig] tee  wait_sig: Ready.  dwProcessid 
 X X [main] tee  _cygwin_istext_for_stdio:  _cifs: fd not open
 X X [main] tee  _cygwin_istext_for_stdio: _cygwin_istext_for_stdio (2)
 X X [main] tee  _cygwin_istext_for_stdio:  _cifs: fd not open
-X X [sig] tee  wait_sig: sigcatch_nonmain 0xCC, sigcatch_main 0xD0
-X X [sig] tee  wait_sig: Ready.  dwProcessid 
 X X [main] tee  build_argv: argv[0] = 'tee'
 X X [main] tee  build_argv: argv[1] = 'test.out'
 X X [main] tee  build_argv: argc 2
@@ -215,8 +215,8 @@ X X [main] tee  dtable::build_fhandl
 X X [main] tee  fhandler_base::set_flags: flags 0x10002, supplied_bin 0x0
 X X [main] tee  fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x1
 X X [main] tee  fhandler_base::set_flags: filemode set to binary
-X X [main] tee  fhandler_base::init: created new fhandler_base for handle 0x2A8, 
bin 1
-X X [main] tee  dtable::init_std_file_from_handle: fd 0, handle 0x2A8
+X X [main] tee  fhandler_base::init: created new fhandler_base for handle 0x2A4, 
bin 1
+X X [main] tee