Now it seems the crashes are relating to another problem reported earlier:
1.5.20: Occasionally infinite loop happens in do_exit() (dcrt0.cc) (see
attached original text below)
I managed to make sure the infinite loop had not happened (more about
that later) and then tested to run configure for squid-2.6 multiple
times (ran for 2 hours) and was unable to reproduce a single crash.
So I am guessing the infinite loop and hence explicitly killing the
offending process would leave cygwin in some funny state and lead to
those crashes.
The infinite loop problem happened fairly often whenever I started X
Windows. And I basically did all the tests inside xterm, i.e. always
after an infinite loop had happened. I started to notice the potential
relationship when I had successfully run configure for squid-2.6 without
any crash inside just bash with no X Windows running at the time.
And I notice the infinite loop problem seems to be relating epist, a
utility comes with and for openbox 2.3.1 which I built myself and use as
the windows manager. (Note that the official cygwin openbox is still of
version 0.99) Once I have removed epist from starting in xinitrc, the
infinite loop problem no longer happens and that allows me to do the
test above.
As to why I wondered that epist is part of the problem is that there is
a strange characteristic about it. That is the process is not listed
with ps or procps or even ps -W (as a Windows process) but indeed it is
running and functional. (Unbelievable?) It is still shown in Task
Manager of course but just like invisible inside cygwin. And it won't be
killed automatically upon terminating X Windows. I need to kill it
explicitly after terminated X Windows.
If this is not complicated enough, I have to mention openbox 2.3.1
cannot be built by default on cygwin as it requires gcc-2.95. So I have
to fix it to support gcc-3.4.4, the current official cygwin gcc, and
tweak Makefiles after configure (to link to Xft, fontconfig, iconv) to
build. If you would like to test all these (I'd be very grateful if you
do so), you may like to take my attached patch for openbox 2.3.1.
Regards,
Kiyo
### Problem reported earlier ###
1.5.20: Occasionally infinite loop happens in do_exit() (dcrt0.cc)
==================================================================
Using 1.5.20-1 on Windows XP, occasionally a process would become
consuming all CPU cycles (90+%) upon termination.
Tested snapshot 20060707 and the problem persists.
I debugged into the process using msdev and found the attached stack trace.
The infinite loop is inside ntdll.
0x61004b4c is the last address in cygwin1 which has never been get back to.
BTW, the address corresponding to line 1113 of dcrt0.cc (snapshot
20060707) function do_exit() at the line:
cygwin_shared->tty.terminate();
So look very much like a problem I reported before for 1.5.19-4.
But that one was constantly reproducible with running gvim in diff mode.
And that problem has been gone with 1.5.20-1.
Now, the infinite loop problem happens more unpredictably and just
occasionally.
------------------------------------------------------------------
Christopher Faylor wrote:
On Wed, Jul 19, 2006 at 05:30:05PM +1000, Kiyo Kelvin Lee wrote:
Actually, I have 2 systems (one XP [AMD Athlon 64 3500] and one Win2K
[Celeron 900]) both have the same problem and attached are the cygcheck
output.
My sh.exe is bash.exe.
The crashes happen just sparsely and not upon all processes termination.
When I ran, say, configure for openbox-2, I always got at least a few
crashes but the configure procedure should have already ran hundreds of
processes. Note the crashes did not seem to affect the configure procedure
and configure finished just normally.
I tried to debug bash and get the stack trace with no success.
The crashing dialog is like attached to a ghost process. Click on CANCEL
does not start msdev.exe as the debugger.
Running msdev wouldn't be very interesting anyway.
Possibly setting CYGWIN=error_start=c:/cygwin/bin/gdb.exe might cause
gdb to pop up, however.
Also tried to attach to a bash using gdb before running configure, the
crashes still happen but gdb just couldn't catch anything, the bash just
kept running (inside gdb).
I'm not sure what this means. If bash kept running then that would
indicate that it isn't the bash which is crashing. Possibly a forked
cgf
copy is crashing.
diff -C3 -r openbox-2.3.1/configure openbox-2.3.1-p1/configure
*** openbox-2.3.1/configure Thu Apr 10 13:53:56 2003
--- openbox-2.3.1-p1/configure Thu Jul 6 11:52:09 2006
***************
*** 1449,1454 ****
--- 1449,1455 ----
program_transform_name="s,\$,$program_suffix,;$program_transform_name"
# Double any \ or $. echo might interpret backslashes.
# By default was `s,x,x', remove it if useless.
+ program_transform_name_sh=`echo $program_transform_name | sed 's/;s,x,x,$//'`
cat <<\_ACEOF >conftest.sed
s/[\\$]/&&/g;s/;s,x,x,$//
_ACEOF
***************
*** 1485,1491 ****
fi
! PACKAGE=openbox
VERSION=2.3.1
--- 1486,1492 ----
fi
! PACKAGE=`echo openbox | sed "$program_transform_name_sh"`
VERSION=2.3.1
diff -C3 -r openbox-2.3.1/nls/C/Makefile.am openbox-2.3.1-p1/nls/C/Makefile.am
*** openbox-2.3.1/nls/C/Makefile.am Sat Mar 22 11:55:59 2003
--- openbox-2.3.1-p1/nls/C/Makefile.am Thu Jul 6 11:52:09 2006
***************
*** 21,26 ****
--- 21,28 ----
ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/en_US; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/en_GB; \
ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/en_GB; \
+ rm -f $(DESTDIR)$(pkgdatadir)/nls/en_AU; \
+ ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/en_AU; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/en; \
ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/en; \
fi
***************
*** 29,36 ****
rm -f $(DESTDIR)$(pkgdatadir)/nls/C/openbox.cat; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/US_ASCII; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/POSIX; \
- rm -f $(DESTDIR)$(pkgdatadir)/nls/en_GB; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/en_US; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/en; \
rmdir $(DESTDIR)$(pkgdatadir)/nls/C; \
fi
--- 31,39 ----
rm -f $(DESTDIR)$(pkgdatadir)/nls/C/openbox.cat; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/US_ASCII; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/POSIX; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/en_US; \
+ rm -f $(DESTDIR)$(pkgdatadir)/nls/en_GB; \
+ rm -f $(DESTDIR)$(pkgdatadir)/nls/en_AU; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/en; \
rmdir $(DESTDIR)$(pkgdatadir)/nls/C; \
fi
diff -C3 -r openbox-2.3.1/nls/C/Makefile.in openbox-2.3.1-p1/nls/C/Makefile.in
*** openbox-2.3.1/nls/C/Makefile.in Thu Apr 10 13:53:58 2003
--- openbox-2.3.1-p1/nls/C/Makefile.in Thu Jul 6 11:52:09 2006
***************
*** 194,199 ****
--- 194,201 ----
ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/en_US; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/en_GB; \
ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/en_GB; \
+ rm -f $(DESTDIR)$(pkgdatadir)/nls/en_AU; \
+ ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/en_AU; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/en; \
ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/en; \
fi
***************
*** 202,209 ****
rm -f $(DESTDIR)$(pkgdatadir)/nls/C/openbox.cat; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/US_ASCII; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/POSIX; \
- rm -f $(DESTDIR)$(pkgdatadir)/nls/en_GB; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/en_US; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/en; \
rmdir $(DESTDIR)$(pkgdatadir)/nls/C; \
fi
--- 204,212 ----
rm -f $(DESTDIR)$(pkgdatadir)/nls/C/openbox.cat; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/US_ASCII; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/POSIX; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/en_US; \
+ rm -f $(DESTDIR)$(pkgdatadir)/nls/en_GB; \
+ rm -f $(DESTDIR)$(pkgdatadir)/nls/en_AU; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/en; \
rmdir $(DESTDIR)$(pkgdatadir)/nls/C; \
fi
diff -C3 -r openbox-2.3.1/src/Screen.cc openbox-2.3.1-p1/src/Screen.cc
*** openbox-2.3.1/src/Screen.cc Sun Apr 20 04:25:29 2003
--- openbox-2.3.1-p1/src/Screen.cc Thu Jul 6 11:52:09 2006
***************
*** 1558,1564 ****
// is the window a KDE systray window?
Window systray;
if (xatom->getValue(w, XAtom::kde_net_wm_system_tray_window_for,
! XAtom::window, (uint32_t) systray) && systray != None) {
addSystrayWindow(w);
return;
}
--- 1558,1564 ----
// is the window a KDE systray window?
Window systray;
if (xatom->getValue(w, XAtom::kde_net_wm_system_tray_window_for,
! XAtom::window, (uint32_t&) systray) && systray != None)
{
addSystrayWindow(w);
return;
}
***************
*** 1600,1606 ****
Window systray;
if (xatom->getValue(w->getClientWindow(),
XAtom::kde_net_wm_system_tray_window_for,
! XAtom::window, (uint32_t) systray) && systray != None) {
removeSystrayWindow(w->getClientWindow());
return;
}
--- 1600,1606 ----
Window systray;
if (xatom->getValue(w->getClientWindow(),
XAtom::kde_net_wm_system_tray_window_for,
! XAtom::window, (uint32_t&) systray) && systray != None)
{
removeSystrayWindow(w->getClientWindow());
return;
}
diff -C3 -r openbox-2.3.1/src/Timer.hh openbox-2.3.1-p1/src/Timer.hh
*** openbox-2.3.1/src/Timer.hh Sat Mar 22 11:56:00 2003
--- openbox-2.3.1-p1/src/Timer.hh Thu Jul 6 11:52:09 2006
***************
*** 98,106 ****
~_timer_queue(void) {}
void release(const _Tp& value) {
! c.erase(std::remove(c.begin(), c.end(), value), c.end());
// after removing the item we need to make the heap again
! std::make_heap(c.begin(), c.end(), comp);
}
bool empty(void) const { return _Base::empty(); }
size_t size(void) const { return _Base::size(); }
--- 98,106 ----
~_timer_queue(void) {}
void release(const _Tp& value) {
! _Base::c.erase(std::remove(_Base::c.begin(), _Base::c.end(), value),
_Base::c.end());
// after removing the item we need to make the heap again
! std::make_heap(_Base::c.begin(), _Base::c.end(), _Base::comp);
}
bool empty(void) const { return _Base::empty(); }
size_t size(void) const { return _Base::size(); }
diff -C3 -r openbox-2.3.1/src/Util.cc openbox-2.3.1-p1/src/Util.cc
*** openbox-2.3.1/src/Util.cc Sun Apr 6 03:34:42 2003
--- openbox-2.3.1-p1/src/Util.cc Thu Jul 6 11:52:09 2006
***************
*** 272,278 ****
static char buf[ICONV_BUFSIZE];
char *obuf = buf;
size_t olen = ICONV_BUFSIZE - 1;
! char *ibuf = (char *) s.c_str();
size_t ilen = strlen(ibuf);
ic = iconv_open(to, from);
--- 272,278 ----
static char buf[ICONV_BUFSIZE];
char *obuf = buf;
size_t olen = ICONV_BUFSIZE - 1;
! const char *ibuf = s.c_str();
size_t ilen = strlen(ibuf);
ic = iconv_open(to, from);
diff -C3 -r openbox-2.3.1/src/Window.hh openbox-2.3.1-p1/src/Window.hh
*** openbox-2.3.1/src/Window.hh Sun Apr 20 04:25:29 2003
--- openbox-2.3.1-p1/src/Window.hh Thu Jul 6 11:52:09 2006
***************
*** 411,417 ****
void installColormap(bool install);
void restore(bool remap);
void configure(int dx, int dy, unsigned int dw, unsigned int dh);
! void setWorkspace(unsigned int n);
void changeBlackboxHints(const BlackboxHints *net);
void restoreAttributes(void);
--- 411,417 ----
void installColormap(bool install);
void restore(bool remap);
void configure(int dx, int dy, unsigned int dw, unsigned int dh);
! void setWorkspace(uint32_t n);
void changeBlackboxHints(const BlackboxHints *net);
void restoreAttributes(void);
diff -C3 -r openbox-2.3.1/src/i18n.cc openbox-2.3.1-p1/src/i18n.cc
*** openbox-2.3.1/src/i18n.cc Mon Apr 21 12:03:44 2003
--- openbox-2.3.1-p1/src/i18n.cc Thu Jul 6 11:52:09 2006
***************
*** 110,116 ****
# endif // MCLoadBySet
if (catalog_fd == (nl_catd) -1)
! fprintf(stderr, "failed to open catalog, using default messages\n");
#endif // HAVE_CATOPEN
}
--- 110,116 ----
# endif // MCLoadBySet
if (catalog_fd == (nl_catd) -1)
! fprintf(stderr, "failed to open catalog %s, using default messages\n",
catalog_filename.c_str());
#endif // HAVE_CATOPEN
}
diff -C3 -r openbox-2.3.1/util/epist/epist.cc
openbox-2.3.1-p1/util/epist/epist.cc
*** openbox-2.3.1/util/epist/epist.cc Sun Apr 6 03:28:03 2003
--- openbox-2.3.1-p1/util/epist/epist.cc Thu Jul 6 11:52:09 2006
***************
*** 25,30 ****
--- 25,33 ----
#endif // HAVE_CONFIG_H
extern "C" {
+ #ifdef HAVE_STDIO_H
+ # include <stdio.h>
+ #endif // HAVE_STDIO_H
#ifdef HAVE_UNISTD_H
# include <sys/types.h>
# include <unistd.h>
diff -C3 -r openbox-2.3.1/util/epist/window.cc
openbox-2.3.1-p1/util/epist/window.cc
*** openbox-2.3.1/util/epist/window.cc Sun Apr 20 04:25:29 2003
--- openbox-2.3.1-p1/util/epist/window.cc Thu Jul 6 12:09:59 2006
***************
*** 169,175 ****
void XWindow::updateDesktop() {
if (! _xatom->getValue(_window, XAtom::net_wm_desktop, XAtom::cardinal,
! static_cast<uint32_t &>(_desktop)))
_desktop = 0;
}
--- 169,175 ----
void XWindow::updateDesktop() {
if (! _xatom->getValue(_window, XAtom::net_wm_desktop, XAtom::cardinal,
! (uint32_t&)_desktop))
_desktop = 0;
}
--
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/