On 2024-06-24 12:04, Brian Inglis via Cygwin-apps wrote:
On 2024-06-24 11:14, Brian Inglis via Cygwin-apps wrote:
On 2024-06-23 20:37, Ken Brown via Cygwin-apps wrote:
On 6/23/2024 7:46 PM, Brian Inglis via Cygwin-apps wrote:
On 2024-06-23 15:46, Marco Atzeri via Cygwin-apps wrote:
On 23/06/2024 22:13, Marco Atzeri wrote:
On 22/06/2024 19:57, Brian Inglis via Cygwin-apps wrote:
Update to current needed to update libgcrypt if you could please oblige?
unfortunately any recent version up to 1.50 are failing a lot of tests
PASS: t-version.exe
PASS: t-strerror.exe
fopen failed with bad code: 20
PASS: t-syserror.exe
FAIL: t-lock.exe
FAIL: t-printf.exe
FAIL: t-poll.exe
FAIL: t-b64.exe
FAIL: t-argparse.exe
FAIL: t-logging.exe
PASS: t-stringutils.exe
PASS: t-malloc.exe
=======================================
6 of 11 tests failed
I was never able to find a solution, so if any one can look and give any
suggestion, I will appreciate
regards
Marco
I just rebuilt the old 1.37 and it is reporting the same errors,
while in 2020 it was passing all the tests
so it seems something else is playing a role here
very puzzling
Hi Marco,
I noticed that the build is generating libtool wrapper sources, executables,
and shell scripts under .../build/tests/.libs/ for the test programs, so if
that also happens with 1.37, that raises my suspicions that what is failing
is something to do with those wrappers and Cygwin libtool mods.
Another possibility is that the failures are caused by a Cygwin bug
introduced since 2020. There have been several bugs in Cygwin 3.5.3 that
have been fixed. Since 3.5.4 hasn't been released yet, you could try the
latest test release of 3.6, which has all the bug fixes.
FWIW, I tried running t-lock.exe under strace and saw "SetThreadName:
SetThreadDescription() failed", followed quickly by a SIGSEGV. That again
suggests a possible Cygwin bug.
Thanks Ken,
Great suggestion - also did strace on t-printf from 1.50 tests/.libs with
src/.libs in the path to pick up test dll and got a loop due to a SEGV on
0000000500000000 - makes interesting reading, but does not mean much to me -
terminated it eventually.
Attached log has been reduced by ~156MB and 2.5MLOC and lightly sanitized.
However, I see no changes since to SetThread related stuff since misc_funcs.cc
in 2022.
There may be some issues with Windows error or exception handling, so I will
retry under cygwin... 3.6.0-115...
No changes after upgrading all cygwin... packages to test 3.6.0-139... including
also taking the precaution of running:
$ env -i PATH=build/src/.libs:/usr/bin:/bin:/sbin:/usr/sbin strace ./t-printf
...
$ head /proc/version
CYGWIN_NT-10.0-19045 version 3.6.0-0.139.g7e3c833592b2.x86_64
(runneradmin@fv-az534-931) (gcc version 11.4.0 (GCC) ) 2024-06-16 15:01 UTC
So perhaps the SetThreadDescription stuff needs another look?
Anyone familiar with that?
I cut down various parts of the program, and finally narrowed it down to gpgrt
allocation or cygwin allocation corrupting the stack so return fails.
See attached gdb log.
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry
one_test_x0 (format=format@entry=0x10040518e "%d %% %d") at stc-t-printf.c:101
101 if (one_test_rc1 == -1)
(gdb)
107 show (" sys: ->%s<-\n", one_test_buf1);
(gdb)
0x0000000100401087 in show (format=format@entry=0x10040505c " sys: ->%s<-\n")
at /usr/src/debug/libgpg-error-1.50-1/tests/t-common.h:119
119 /usr/src/debug/libgpg-error-1.50-1/tests/t-common.h: No such file or
directory.
(gdb)
122 in /usr/src/debug/libgpg-error-1.50-1/tests/t-common.h
(gdb)
run_tests () at stc-t-printf.c:201
201 one_test_2 ("%d %% %d", 17, 768114563);
(gdb)
0x000000010040142d in one_test_x1 (format=format@entry=0x10040518e "%d %% %d")
at stc-t-printf.c:112
112 {
(gdb)
117 errno = ENOENT;
(gdb)
__errno () at
/usr/src/debug/cygwin-3.6.0-0.139.g7e3c833592b2/newlib/libc/errno/errno.c:17
17 return &_REENT_ERRNO(_REENT);
(gdb)
__getreent () at
/usr/src/debug/cygwin-3.6.0-0.139.g7e3c833592b2/winsup/cygwin/include/cygwin/config.h:40
40 __asm __volatile__ ("movq %%gs:8,%0" : "=r" (ret));
(gdb)
__errno () at
/usr/src/debug/cygwin-3.6.0-0.139.g7e3c833592b2/winsup/cygwin/include/cygwin/config.h:44
44 return (struct _reent *) (ret - __CYGTLS_PADSIZE__);
(gdb)
one_test_x1 (format=format@entry=0x10040518e "%d %% %d") at stc-t-printf.c:118
118 va_start (arg_ptr, format);
(gdb)
119 rc2 = gpgrt_vasprintf (&buf2, format, arg_ptr);
(gdb)
gpgrt_vasprintf (r_buf=r_buf@entry=0x7ffffcaf0, format=format@entry=0x10040518e
"%d %% %d",
ap=ap@entry=0x7ffffcb48 "\021") at
/usr/src/debug/libgpg-error-1.50-1/src/visibility.c:714
714 return _gpgrt_estream_vasprintf (r_buf, format, ap);
(gdb)
_gpgrt_estream_vasprintf (bufp=bufp@entry=0x7ffffcaf0,
format=format@entry=0x10040518e "%d %% %d",
arg_ptr=arg_ptr@entry=0x7ffffcb48 "\021") at
/usr/src/debug/libgpg-error-1.50-1/src/estream-printf.c:1836
1836 {
(gdb)
1840 parm.error_flag = 0;
(gdb)
1841 parm.alloced = 512;
(gdb)
1842 parm.used = 0;
(gdb)
1843 parm.buffer = my_printf_realloc (NULL, parm.alloced);
(gdb)
_gpgrt_realloc (a=0x0, n=512) at
/usr/src/debug/libgpg-error-1.50-1/src/init.c:235
235 if (custom_realloc)
(gdb)
238 if (!n)
(gdb)
233 _gpgrt_realloc (void *a, size_t n)
(gdb)
_gpgrt_realloc (n=512, a=0x0) at
/usr/src/debug/libgpg-error-1.50-1/src/init.c:244
244 if (!a)
(gdb)
245 return malloc (n);
(gdb)
233 _gpgrt_realloc (void *a, size_t n)
(gdb)
0x00000004882524af in _gpgrt_realloc (n=512, a=<optimized out>) at
/usr/src/debug/libgpg-error-1.50-1/src/init.c:245
245 return malloc (n);
(gdb)
/cygdrive/d/a/scallywag/gdb/gdb-13.2-1.x86_64/src/gdb-13.2/gdb/infrun.c:2640:
internal-error: resume_1: Assertion `pc_in_thread_step_range (pc, tp)' failed.
(gdb) bt
#0 0x0000000488266100 in malloc ()
at
/usr/src/debug/cygwin-3.6.0-0.139.g7e3c833592b2/winsup/cygwin/mm/malloc_wrapper.cc:85
#1 0x000000048825ba5a in _gpgrt_estream_vasprintf (bufp=bufp@entry=0x7ffffcaf0,
format=format@entry=0x10040518e "%d %% %d",
arg_ptr=arg_ptr@entry=0x7ffffcb48 "\021")
at /usr/src/debug/libgpg-error-1.50-1/src/estream-printf.c:1843
#2 0x000000048825cf95 in gpgrt_vasprintf (r_buf=r_buf@entry=0x7ffffcaf0,
format=format@entry=0x10040518e "%d %% %d",
ap=ap@entry=0x7ffffcb48 "\021") at
/usr/src/debug/libgpg-error-1.50-1/src/visibility.c:714
#3 0x000000010040147e in one_test_x1 (format=format@entry=0x10040518e "%d %%
%d") at stc-t-printf.c:119
#4 0x0000000100401e5b in run_tests () at stc-t-printf.c:201
#5 main (argc=<optimized out>, argv=<optimized out>) at stc-t-printf.c:559