Re: Cygwin 3.4.3 and 3.5.0... hangs in make, top, procps, ls /proc/PID/...
On Mon, 2 Jan 2023 11:32:01 +0900 Takashi Yano wrote: > On Sat, 31 Dec 2022 13:01:29 -0700 > Brian Inglis wrote: > > was also getting the messages below locally and still on GitHub scallywag: > > > > cygcheck (6936) child_copy: cygheap read copy failed, > > > > ../curl/scallywag/1_x86_64 build.log:2022-12-26T00:39:35.6163236Z 0 > > [main] cygcheck (6936) child_copy: cygheap read copy failed, > > 0x0..0x80003B5F0, > > done 0, windows pid 6936, Win32 error 299 > > ../curl/scallywag/1_x86_64 build.log:2022-12-26T00:48:03.4525278Z 0 > > [main] cygcheck (568) child_copy: cygheap read copy failed, > > 0x0..0x80003BA48, > > done 0, windows pid 568, Win32 error 299 > > ../dialog/scallywag/1_x86_64 build.log:2022-12-31T18:42:37.0939902Z > > 0 > > [main] cygcheck (6992) child_copy: cygheap read copy failed, > > 0x0..0x80003CB38, > > done 0, windows pid 6992, Win32 error 299 > > I guess this is another problem. I found this issue occurs after the commit 30add3e6b3e3: "Cygwin: exec: don't access cygheap before it's initialized" . Reverting this commit solves the issue. To reproduce the problem relatively frequently, try: while true; do cygcheck -cd cygwin > /dev/null; done in bash. Corinna, could you please have a look at this issue as well? -- Takashi Yano -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
Re: Cygwin 3.4.3 and 3.5.0... hangs in make, top, procps, ls /proc/PID/...
On Thu, 29 Dec 2022 21:59:45 -0700 Brian Inglis wrote: > I got some hangs (deadlock?) between (parallel?) make jobs, top, procps, and > even ls /proc/*/ when trying to cygport all check curl or look at the process > statuses when builds hung under Cygwin 3.4.3 and 3.5.0-0.69... > > Had to revert to a Cygwin 3.4.0-344 test build from Dec 16 sources to build > and > check curl etc. > > Only external differences seems to be recent dll sizes are *MUCH* smaller: > > $ ls -glort /bin/cygwin1*.dll > -rwxr-xr-x 1 3588124 Sep 5 05:17 /bin/cygwin1-prev.dll > -rwxr-xr-x 1 3561202 Dec 16 00:33 /bin/cygwin1-test.dll > -rwxr-xr-x 1 3561202 Dec 16 00:33 /bin/cygwin1.dll > -rwxr-xr-x 1 2951221 Dec 16 05:50 /bin/cygwin1-save.dll > -rwxr-xr-x 1 2951221 Dec 16 05:50 /bin/cygwin1-curr.dll > -rwxr-xr-x 1 2940981 Dec 23 03:03 /bin/cygwin1-69.dll > > and tars: > -rwxr-xr-x 1 3563651 2022-12-04 06:09 usr/bin/cygwin1.dll cygwin-3.4.0-1 > -rwxr-xr-x 1 3563526 2022-12-10 13:12 usr/bin/cygwin1.dll cygwin-3.4.1-1 > -rwxr-xr-x 1 3564074 2022-12-11 05:06 usr/bin/cygwin1.dll cygwin-3.4.2-1 > -rwxr-xr-x 1 2951221 2022-12-16 05:50 usr/bin/cygwin1.dll cygwin-3.4.3-1 > -rwxr-xr-x 1 2940981 2022-12-23 03:03 usr/bin/cygwin1.dll cygwin-3.5.0-0.69... > > Anyone seen this issue or anything come to mind to cause or help diagnose > this? > > Running MS Win 10.0.19044.2364 21H2 patched to date. I have looked into this issue a bit, and found that q->sigtls becomes sometimes NULL and access violation occurs at the following code. winsup/cygwin/sigproc.cc: 1378 if (q->sigtls->sigmask & (bit = SIGTOMASK (q->si.si_signo))) { tl_entry = cygheap->find_tls (q->si.si_signo, issig_wait); I'm not sure why this happens, however it seems that the following patch fixes the issue. diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index ce36c8be3..90eaa2a47 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -1375,6 +1375,8 @@ wait_sig (VOID *) *pack.mask = 0; while ((q = q->next)) { + if (q->sigtls == NULL) + continue; if (q->sigtls->sigmask & (bit = SIGTOMASK (q->si.si_signo))) { tl_entry = cygheap->find_tls (q->si.si_signo, issig_wait); Corinna, could you please have a look? On Sat, 31 Dec 2022 13:01:29 -0700 Brian Inglis wrote: > was also getting the messages below locally and still on GitHub scallywag: > > cygcheck (6936) child_copy: cygheap read copy failed, > > ../curl/scallywag/1_x86_64 build.log:2022-12-26T00:39:35.6163236Z 0 > [main] cygcheck (6936) child_copy: cygheap read copy failed, > 0x0..0x80003B5F0, > done 0, windows pid 6936, Win32 error 299 > ../curl/scallywag/1_x86_64 build.log:2022-12-26T00:48:03.4525278Z 0 > [main] cygcheck (568) child_copy: cygheap read copy failed, 0x0..0x80003BA48, > done 0, windows pid 568, Win32 error 299 > ../dialog/scallywag/1_x86_64 build.log:2022-12-31T18:42:37.0939902Z 0 > [main] cygcheck (6992) child_copy: cygheap read copy failed, > 0x0..0x80003CB38, > done 0, windows pid 6992, Win32 error 299 I guess this is another problem. -- Takashi Yano -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
Re: Cygwin 3.4.3 and 3.5.0... hangs in make, top, procps, ls /proc/PID/...
On Sat, 31 Dec 2022, Brian Inglis wrote: > was also getting the messages below locally and still on GitHub scallywag: > > cygcheck (6936) child_copy: cygheap read copy failed, > > ../curl/scallywag/1_x86_64 build.log:2022-12-26T00:39:35.6163236Z 0 > [main] cygcheck (6936) child_copy: cygheap read copy failed, 0x0..0x80003B5F0, > done 0, windows pid 6936, Win32 error 299 > ../curl/scallywag/1_x86_64 build.log:2022-12-26T00:48:03.4525278Z 0 > [main] cygcheck (568) child_copy: cygheap read copy failed, 0x0..0x80003BA48, > done 0, windows pid 568, Win32 error 299 > ../dialog/scallywag/1_x86_64 build.log:2022-12-31T18:42:37.0939902Z 0 > [main] cygcheck (6992) child_copy: cygheap read copy failed, 0x0..0x80003CB38, > done 0, windows pid 6992, Win32 error 299 This feels ASLR related. Maybe try what Corinna suggested in https://cygwin.com/pipermail/cygwin/2022-December/252720.html for a similar error in Docker? > Try this: > > cp /bin/cygwin1.dll ~/docker-cygwin1.dll > peflags -d0 ~/docker-cygwin1.dll > > Then copy that DLL over to /bin/cygwin1.dll in your docker image > and try again. Though of course disregard 'docker' there. -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
[ANNOUNCEMENT] Test: ncurses/-demo libncurses/-devel/++/w10 terminfo/-extra 6.4-1.20221231 (TEST)
The following test packages have been uploaded to the Cygwin distribution: * ncurses 6.4-1.20221231 * ncurses-demo 6.4-1.20221231 * libncurses-devel 6.4-1.20221231 * libncurses++w10 6.4-1.20221231 * libncursesw10 6.4-1.20221231 * terminfo 6.4-1.20221231 * terminfo-extra6.4-1.20221231 Please test these packages as extensively as possible (especially if you are a Cygwin package maintainer) as libncursesw10 is used in many libraries including libreadline and utilities including less, vim, emacs, most other editors, screen, tmux, mail and web clients, and bash. Package maintainers should install this test release and rerun checks of as many libraries and packages depending on libncurses{,++}w10 as possible. The ncurses (new curses) library is an emulation of Sys V R 4 curses, and more. It uses terminfo format, supports pads, color, multiple highlights, forms characters, function key mapping, and has all the other SVR4 curses enhancements over BSD curses. For more information see the project home page: https://invisible-island.net/ncurses As there are multiple components and many changes each release see below or read /usr/share/doc/ncurses/ANNOUNCE and /usr/share/doc/ncurses/NEWS after installation: https://invisible-island.net/ncurses/announce.html#h2-release-notes Release Notes These notes are for ncurses 6.4, released December 31, 2022. This release is designed to be source-compatible with ncurses 5.0 through 6.3; providing extensions to the application binary interface (ABI). Although the source can still be configured to support the ncurses 5 ABI, the reason for the release is to reflect improvements to the ncurses 6 ABI and the supporting utility programs. There are, of course, numerous other improvements, listed in this announcement. The most important bug-fixes/improvements dealt with robustness issues. The release notes also mention some other bug-fixes, but are focused on new features and improvements to existing features since ncurses 6.3 release. Library improvements New features There are no new features in this release. Other improvements These are improvements to existing features: * modify delscreen to more effectively delete all windows on the given screen. * modify wnoutrefresh to call pnoutrefresh if its parameter is a pad, rather than treating it as an error, and modify new_panel to permit its window-parameter to be a pad * modify curses_trace() to show the trace-mask as symbols, e.g., TRACE_ORDINARY, DEBUG_LEVEL(3). * improve checks for valid mouse events when an intermediate mouse state is not part of the mousemask specified by the caller * allow extended-color number in opts parameter of wattr_on. * improve _tracecchar_t2 formatting of base+combining character. * trim out some unwanted linker options from ncurses*config and .pc files seen in Fedora 36+. * improve shell-scripts with shellcheck * improve use of "trap" in shell scripts, using a script. * modify make-tar.sh scripts to make timestamps more predictable. These are corrections to existing features: * modify misc/gen-pkgconfig.in to allow for the case where the library directory does not yet exist, since this is processed before doing an install * set trailing null on string passed from winsnstr to wins_nwstr. * modify waddch_literal to allow for double-width base character when merging a combining character Program improvements Several improvements were made to the utility programs: infocmp * rewrite canonical_name function of infocmp to ensure buffer size * improve readability of long parameterized expressions with the infocmp "-f" option by allowing split before a "%p" marker. * modify verbose-option of infocmp, tic, toe to enable debug-tracing if that is configured. tabs limit tab-stop values to max-columns tic add consistency check in tic for u6/u7/u8/u9 and NQ capabilities. tput corrected use of original tty-modes in init/reset subcommands Examples Along with the library and utilities, improvements were made to the ncurses-examples. Most of this activity aimed at improving the test-packages: * add minimal -h (usage) and -V (version) getopt logic to all ncurses-examples programs. * fix an error in "@" command in test/ncurses.c F-menu * add curses_trace to ifdef's for START_TRACE in test/test.priv.h * improve pthread-configuration for test/worm.c * add setlocale call to several test-programs. * workaround in test/picsmap.c for use of floating point for rgb values by ImageMagick 6.9.11, which appears to use the wrong upper limit. * use static libraries for AdaCurses test-package for Mageia, since no gprbuild package is available. * install Ada95 sample programs in libexecdir, adding a wrapp
[ANNOUNCEMENT] Test: ncurses/-demo libncurses/-devel/++/w10 terminfo/-extra 6.3-2.20221224 (TEST)
The following test packages have been uploaded to the Cygwin distribution: * ncurses 6.3-2.20221224 * ncurses-demo 6.3-2.20221224 * libncurses-devel 6.3-2.20221224 * libncurses++w10 6.3-2.20221224 * libncursesw10 6.3-2.20221224 * terminfo 6.3-2.20221224 * terminfo-extra6.3-2.20221224 Please test these packages as extensively as possible (especially if you are a Cygwin package maintainer) as libncursesw10 is used in many libraries including libreadline and utilities including less, vim, emacs, most other editors, screen, tmux, mail and web clients, and bash. Package maintainers should install this test release and rerun checks of as many libraries and packages depending on libncurses{,++}w10 as possible. The ncurses (new curses) library is an emulation of Sys V R 4 curses, and more. It uses terminfo format, supports pads, color, multiple highlights, forms characters, function key mapping, and has all the other SVR4 curses enhancements over BSD curses. For more information see the project home page: https://invisible-island.net/ncurses As there are multiple components and many changes each release please see below or read /usr/share/doc/ncurses/NEWS after installation: https://invisible-island.net/ncurses/announce.html 20221224 * add mutex lock/unlock in a few places reported by thread-sanitizer * add/use bracketed+paste to help identify terminals supporting this xterm feature 20221217 * install Ada95 sample programs in libexecdir, adding a wrapper script to invoke those. 20221210 * add minimal -h/-V getopt logic to the remaining test-programs. * free new_pair() data in delscreen * add clarification of the scope of dynamic variables in terminfo(5). * remove a stray '/' from description of %g in terminfo(5). 20221203 * add -h usage and -V version options to the test-programs which use getopt. * use "command -v" rather than "type" in Ada95/gen/Makefile.in to fix a portability issue * update ncurses-howto, more documentation fixes along with corrections to example programs. 20221126 * fix an error in pathname of explain.txt * fix an error in "@" command in test/ncurses.c F-menu * improve formatting of ncurses-intro.html and hackguide.html * improve man/curs_clear.3x links to other pages 20221119 * use static libraries for AdaCurses test-package for Mageia, since no gprbuild package is available. * updated test packages for Debian. 20221112 * build-fixes for AdaCurses RPM test-package. 20221105 * regenerate configure scripts with autoconf 2.52.20221009 * modify "--with-manpage-format" to support bzip2 and xz compression * modify make-tar.sh scripts to make timestamps more predictable. 20221029 * improve curs_slk.3x discussion of extensions and portability 20221023 * change man_db.renames to template, to handle ncurses*-config script with the extra-suffix configure option. 20221015 * fix another memory-leak in tic. * update install-sh script from autoconf, to fix install problem for Ada95 with Arch * update CF_XOPEN_SOURCE, adding GNU libc suffixes for abi64, abin32, x32 * correct ifdef's for _nc_set_read_thread() 20221008 * correct a switch-statement case in configure script to allow for test builds with ABI=7. * modify misc/gen-pkgconfig.in to allow for the case where the library directory does not yet exist, since this is processed before doing an install 20221001 * modify configure/scripts to work around interference by GNU grep 3.8 * update CF_XOPEN_SOURCE, adding variants "gnueabi" and "gnueabihf" to get _DEFAULT_SOURCE special case 20220924 * modify configure macro CF_BUILD_CC to check if the build-compiler works, rather than that it is different from the cross-compiler, e.g., to accommodate a compiler which can be used for either purpose with different flags * fix another memory-leak in tic. * correct change for cppcheck in menu library * update config.guess, config.sub 20220917 * reduce memory-leak in tic by separating allocations for struct entry from TERMTYPE2 * improve interaction between tic -v option and NCURSES_TRACE, by processing the latter only when -v option does not set _nc_tracing. * modify curses_trace() to show the trace-mask as symbols, e.g., TRACE_ORDINARY, DEBUG_LEVEL(3). 20220910 * amend verbose-option change to make this affect level 3, e.g., using "tic -cv3 terminfo". * work around musl's nonstandard use of feature test macros by adding a definition for NCURSES_WIDECHAR to the generated ".pc" and *-config files 20220903 * modify verbose-option of infocmp, tic, toe to enable debug-tracing if that is configured. 20220827 * modify configure scripts to use overlooked cases for LD and PKG_CONFIG variables * modify nsterm to use xterm+alt1049 * modify putty to use xterm+alt1049 20220820 * fix some cppcheck warnings, mostly style, in ncurses and c++ libraries and progs directory. * ad