RE: bash, dircolors, setsid and a stackdump
I just compiled the cygwin dll from latest CVS, and the problem reported in this thread, ie the script: -- #!/bin/bash echo foo sleep 10 -- When run with "setsid bash script.sh" no longer produces a stackdump and works correctly. -- Rafael -- 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: bash, dircolors, setsid and a stackdump
On Thu, 22 Jan 2004, David Rothenberger wrote: > Rafael Kitover wrote: > > > I would dearly love to know how you get those lovely line numbers in the > > stackdump :) > > I used the unstripped DLL from my CVS build and then used addr2line on > each function address in the stacktrace, specifying the DLL as the > executable. I.e., > > addr2line -e /bin/cygwin1.dll > > I don't know whether it's necessary to be running the unstripped DLL when > the stacktrace is generated, but I was. It is. If you think about it, it's rather obvious... If you run one DLL and then use another as the executable for addr2line, the addresses are all going to be different. > I have since discovered that while dircolors does cause the stackdump, the > problem is not dircolors. With that line commented from /etc/profile, I > don't get a stackdump but the script does not complete its execution. Hmm... Note that to use the dircolors file, one needs to do a back-quote substitution. Just an observation. Igor > I determined this by executing the script > > ---begin script--- > #!/bin/sh > echo foo > t > sleep 10 > ---end script--- > > and noting that t was created but of zero length. > > Dave -- 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 -- 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: bash, dircolors, setsid and a stackdump
Rafael Kitover wrote: I would dearly love to know how you get those lovely line numbers in the stackdump :) I used the unstripped DLL from my CVS build and then used addr2line on each function address in the stacktrace, specifying the DLL as the executable. I.e., addr2line -e /bin/cygwin1.dll I don't know whether it's necessary to be running the unstripped DLL when the stacktrace is generated, but I was. I have since discovered that while dircolors does cause the stackdump, the problem is not dircolors. With that line commented from /etc/profile, I don't get a stackdump but the script does not complete its execution. I determined this by executing the script ---begin script--- #!/bin/sh echo foo > t sleep 10 ---end script--- and noting that t was created but of zero length. Dave -- 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: bash, dircolors, setsid and a stackdump
>-Original Message- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of >David Rothenberger >Sent: Thursday, January 22, 2004 10:32 AM >To: [EMAIL PROTECTED] >Subject: bash, dircolors, setsid and a stackdump > >I've just encountered a very strange problem involving setsid, rxvt, >bash and dircolors. I'm using CVS from Thu Jan 22 07:18:16 PST >2004. > >I have a simple script script.sh: > >---begin script--- >#!/bin/sh >echo foo >sleep 10 >---end script--- > >I have uncommented the dircolors line in the default /etc/profile >and am using the default /etc/DIR_COLORS. > >I start an rxvt window with "rxvt -e bash --login -i". From that >window, I execute "setsid bash script.sh" and get a stackdump from >sleep.exe. > >---begin stackdump--- >Exception: STATUS_ACCESS_VIOLATION at eip=6100256C >eax=616727A4 ebx= ecx=6167 edx=435F534C esi=0EC8 edi=00BE >ebp=0022DA88 esp=0022DA70 program=C:\cygwin\bin\sleep.exe >cs=001B ds=0023 es=0023 fs=003B gs= ss=0023 >Stack trace: >Frame Function Args >0022DA88 6100256C (6167, 0002, 0022DAA8, ) >/netrel/src/cygwin-20040122/winsup/cygwin/cygheap.cc:180 [SNIP] I also see this, with rxvt and zsh. I would dearly love to know how you get those lovely line numbers in the stackdump :) Also I tried setting CYGWIN_DEBUG=sleep, but that never got to attach gdb before the process died. -- Rafael -- 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/
bash, dircolors, setsid and a stackdump
I've just encountered a very strange problem involving setsid, rxvt, bash and dircolors. I'm using CVS from Thu Jan 22 07:18:16 PST 2004. I have a simple script script.sh: ---begin script--- #!/bin/sh echo foo sleep 10 ---end script--- I have uncommented the dircolors line in the default /etc/profile and am using the default /etc/DIR_COLORS. I start an rxvt window with "rxvt -e bash --login -i". From that window, I execute "setsid bash script.sh" and get a stackdump from sleep.exe. ---begin stackdump--- Exception: STATUS_ACCESS_VIOLATION at eip=6100256C eax=616727A4 ebx= ecx=6167 edx=435F534C esi=0EC8 edi=00BE ebp=0022DA88 esp=0022DA70 program=C:\cygwin\bin\sleep.exe cs=001B ds=0023 es=0023 fs=003B gs= ss=0023 Stack trace: Frame Function Args 0022DA88 6100256C (6167, 0002, 0022DAA8, ) /netrel/src/cygwin-20040122/winsup/cygwin/cygheap.cc:180 0022DAA8 610915CF (0A03001C, 0022EC9C, 0022E370, 0022E370) /netrel/src/cygwin-20040122/winsup/cygwin/syscalls.cc:104 0022EDB8 6108EFDE (0A04CFF0, 0A04C5C8, 0A04D138, 0003) /netrel/src/cygwin-20040122/winsup/cygwin/spawn.cc:794 0022EDE8 6108FC36 (0003, 0A04CFF0, 0A04C5C8, 0A04D138) /netrel/src/cygwin-20040122/winsup/cygwin/spawn.cc:975 0022EE08 6102729B (0A04CFF0, 0A04C5C8, 0A04D138, 61088DE7) /netrel/src/cygwin-20040122/winsup/cygwin/exec.cc:36 0022EEF8 610868F1 (0A04CFF0, 0A04C5C8, 0A04D138, )??:0 0022EF48 00414735 (0A04CE48, , 0A045398, )??:0 0022EFB8 004135B3 (0A04CD80, , , )??:0 0022EFF8 004107BF (0A045380, , , )??:0 0022F028 004101E4 (0A045380, , 004888F4, 0A041310)??:0 0022F058 004039F9 (61672C1C, 0002, 0002, 0001)??:0 0022F0B0 00401783 (0002, 61672C1C, 0A0411A8, 0022F108)??:0 0022F0F0 61005EB5 (0022F108, 77D447A6, , 77D42EC8) /netrel/src/cygwin-20040122/winsup/cygwin/dcrt0.cc:901 0022FF90 61005FA0 (, , , ) /netrel/src/cygwin-20040122/winsup/cygwin/dcrt0.cc:945 End of stack trace ---end stackdump--- I do not encounter the problem if I * run the command from a cmd.exe window either from within a "bash --login -i" shell or directly from cmd.exe; * comment out the dircolors line in /etc/profile; or * invoke "setsid sh script.sh" If I run "setsid bash script.sh" from an ash shell (running in a cmd.exe window or rxvt) I don't get a stackdump, but the shell won't accept another command until the script terminates. Dave #!/bin/sh #while true; do #if [ "`/bin/procps -o ppid -p $$ --no-heading | /bin/awk '{print $1}'`" = "1" ]; then #exit #fi echo foo sleep 10 #done Exception: STATUS_ACCESS_VIOLATION at eip=6100256C eax=616727A4 ebx= ecx=6167 edx=435F534C esi=0EC8 edi=00BE ebp=0022DA88 esp=0022DA70 program=C:\cygwin\bin\sleep.exe cs=001B ds=0023 es=0023 fs=003B gs= ss=0023 Stack trace: Frame Function Args 0022DA88 6100256C (6167, 0002, 0022DAA8, ) /netrel/src/cygwin-20040122/winsup/cygwin/cygheap.cc:180 0022DAA8 610915CF (0A03001C, 0022EC9C, 0022E370, 0022E370) /netrel/src/cygwin-20040122/winsup/cygwin/syscalls.cc:104 0022EDB8 6108EFDE (0A04CFF0, 0A04C5C8, 0A04D138, 0003) /netrel/src/cygwin-20040122/winsup/cygwin/spawn.cc:794 0022EDE8 6108FC36 (0003, 0A04CFF0, 0A04C5C8, 0A04D138) /netrel/src/cygwin-20040122/winsup/cygwin/spawn.cc:975 0022EE08 6102729B (0A04CFF0, 0A04C5C8, 0A04D138, 61088DE7) /netrel/src/cygwin-20040122/winsup/cygwin/exec.cc:36 0022EEF8 610868F1 (0A04CFF0, 0A04C5C8, 0A04D138, )??:0 0022EF48 00414735 (0A04CE48, , 0A045398, )??:0 0022EFB8 004135B3 (0A04CD80, , , )??:0 0022EFF8 004107BF (0A045380, , , )??:0 0022F028 004101E4 (0A045380, , 004888F4, 0A041310)??:0 0022F058 004039F9 (61672C1C, 0002, 0002, 0001)??:0 0022F0B0 00401783 (0002, 61672C1C, 0A0411A8, 0022F108)??:0 0022F0F0 61005EB5 (0022F108, 77D447A6, , 77D42EC8) /netrel/src/cygwin-20040122/winsup/cygwin/dcrt0.cc:901 0022FF90 61005FA0 (, , , ) /netrel/src/cygwin-20040122/winsup/cygwin/dcrt0.cc:945 End of stack trace Cygwin Win95/NT Configuration Diagnostics Current System Time: Thu Jan 22 08:11:42 2004 Windows XP Professional Ver 5.1 Build 2600 Service Pack 1 Path: ~\bin C:\cygwin\usr\local\bin C:\cygwin\usr\local\bin\i686-pc-cygwin C:\cygwin\bin c:\jdk1.2.2\bin c:\ntreskit c:\oracle\ora817\bin C:\cygwin\bin C:\cygwin\usr\X11R6\bin c:\oracle\ora920\bin C:\cygwin\usr\sbin c:\WINDOWS\system32 c:\WINDOWS c:\WINDOWS\System32\Wbem c:\Program Files\Rational\ClearCase\bin c:\Program Files\Rational\common c:\