public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/108835] New: gm2 tests at large -jNN numbers do not return
@ 2023-02-17 12:28 aldyh at gcc dot gnu.org
  2023-02-19 20:29 ` [Bug testsuite/108835] " gaius at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: aldyh at gcc dot gnu.org @ 2023-02-17 12:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108835

            Bug ID: 108835
           Summary: gm2 tests at large -jNN numbers do not return
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: aldyh at gcc dot gnu.org
  Target Milestone: ---

Running make check -j55 sometimes yields tests that fail to terminate in the
gm2/ directory.  For example, coroutine.x5 and testtransfer.x5.

Worst case scenario there should be a timeout for these tests.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug testsuite/108835] gm2 tests at large -jNN numbers do not return
  2023-02-17 12:28 [Bug testsuite/108835] New: gm2 tests at large -jNN numbers do not return aldyh at gcc dot gnu.org
@ 2023-02-19 20:29 ` gaius at gcc dot gnu.org
  2023-02-19 20:34 ` gaius at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-02-19 20:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108835

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-02-19

--- Comment #1 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Confirmed that testtransfer and coroutine hang.  I've re-implemented
libgm2/libm2iso/RTco.cc and have seen 100000 invocations of the above programs
run to completion without hanging.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug testsuite/108835] gm2 tests at large -jNN numbers do not return
  2023-02-17 12:28 [Bug testsuite/108835] New: gm2 tests at large -jNN numbers do not return aldyh at gcc dot gnu.org
  2023-02-19 20:29 ` [Bug testsuite/108835] " gaius at gcc dot gnu.org
@ 2023-02-19 20:34 ` gaius at gcc dot gnu.org
  2023-02-19 22:10 ` cvs-commit at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-02-19 20:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108835

--- Comment #2 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Created attachment 54487
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54487&action=edit
Proposed fix

Here is the work in progress patch (code could do with a cleanup).

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug testsuite/108835] gm2 tests at large -jNN numbers do not return
  2023-02-17 12:28 [Bug testsuite/108835] New: gm2 tests at large -jNN numbers do not return aldyh at gcc dot gnu.org
  2023-02-19 20:29 ` [Bug testsuite/108835] " gaius at gcc dot gnu.org
  2023-02-19 20:34 ` gaius at gcc dot gnu.org
@ 2023-02-19 22:10 ` cvs-commit at gcc dot gnu.org
  2023-02-20  7:12 ` aldyh at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-02-19 22:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108835

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Gaius Mulley <gaius@gcc.gnu.org>:

https://gcc.gnu.org/g:b9c83e7789f7eec9871e370739baa55fd70be4cf

commit r13-6135-gb9c83e7789f7eec9871e370739baa55fd70be4cf
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Sun Feb 19 22:08:31 2023 +0000

    libgm2/libm2iso/RTco.cc (re-implementation) Bugfix for [PR108835]

    This is a re-implementation of RTco.cc which fixes the race hazzard
    seen occasionally when running testtransfer and coroutines from the
    modula2 testsuite.

    libgm2/ChangeLog:

            PR testsuite/108835
            * libm2iso/RTco.cc: Re-implementation using a single lock
            mutex and inlined wait/signal implementation within
            transfer.

    Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug testsuite/108835] gm2 tests at large -jNN numbers do not return
  2023-02-17 12:28 [Bug testsuite/108835] New: gm2 tests at large -jNN numbers do not return aldyh at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-02-19 22:10 ` cvs-commit at gcc dot gnu.org
@ 2023-02-20  7:12 ` aldyh at gcc dot gnu.org
  2023-02-20 13:28 ` gaius at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: aldyh at gcc dot gnu.org @ 2023-02-20  7:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108835

--- Comment #4 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
Thank you very much for such a prompt fix.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug testsuite/108835] gm2 tests at large -jNN numbers do not return
  2023-02-17 12:28 [Bug testsuite/108835] New: gm2 tests at large -jNN numbers do not return aldyh at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-02-20  7:12 ` aldyh at gcc dot gnu.org
@ 2023-02-20 13:28 ` gaius at gcc dot gnu.org
  2023-02-22 11:10 ` iains at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-02-20 13:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108835

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Gaius Mulley <gaius at gcc dot gnu.org> ---
thanks for reporting the bug, closing as now fixed.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug testsuite/108835] gm2 tests at large -jNN numbers do not return
  2023-02-17 12:28 [Bug testsuite/108835] New: gm2 tests at large -jNN numbers do not return aldyh at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-02-20 13:28 ` gaius at gcc dot gnu.org
@ 2023-02-22 11:10 ` iains at gcc dot gnu.org
  2023-06-30 14:15 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: iains at gcc dot gnu.org @ 2023-02-22 11:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108835

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |iains at gcc dot gnu.org
         Resolution|FIXED                       |---
             Status|RESOLVED                    |REOPENED
             Target|                            |*-*-darwin*

--- Comment #6 from Iain Sandoe <iains at gcc dot gnu.org> ---
still fails on several Darwin versions (depending on hardware).

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug testsuite/108835] gm2 tests at large -jNN numbers do not return
  2023-02-17 12:28 [Bug testsuite/108835] New: gm2 tests at large -jNN numbers do not return aldyh at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-02-22 11:10 ` iains at gcc dot gnu.org
@ 2023-06-30 14:15 ` cvs-commit at gcc dot gnu.org
  2023-07-03 14:24 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-30 14:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108835

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain D Sandoe <iains@gcc.gnu.org>:

https://gcc.gnu.org/g:ef4ea6e08707d27674a8c5ddb4b478aac8713c03

commit r14-2218-gef4ea6e08707d27674a8c5ddb4b478aac8713c03
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Sat Feb 25 23:18:13 2023 +0000

    modula-2: Amend the handling of failed select() calls in RTint [PR108835].

    When we make a select() that fails, there is an attempt to (a) diagnose
    why and (b) make a fallback.  These actions are causing some tests to
    hang on some Darwin versions, this is because the first action that is
    tried to assist in diagnosis/fallback handling is to replace the set
    timeout with NIL (which causes select to wait forever, modulo other
    reasons it might complete).

    To fix this, call select with a zero timeout when checking for error
    conditions.  Also, as we check the possible failure conditions, if we
    find a change that succeeds, then stop looking for errors.

    Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

            PR testsuite/108835

    gcc/m2/ChangeLog:

            * gm2-libs/RTint.mod: Do not use NIL timeout setting on select,
            test failures sequentially, finishing on the first success.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug testsuite/108835] gm2 tests at large -jNN numbers do not return
  2023-02-17 12:28 [Bug testsuite/108835] New: gm2 tests at large -jNN numbers do not return aldyh at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-06-30 14:15 ` cvs-commit at gcc dot gnu.org
@ 2023-07-03 14:24 ` cvs-commit at gcc dot gnu.org
  2023-07-27 21:43 ` gaius at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-03 14:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108835

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Iain D Sandoe
<iains@gcc.gnu.org>:

https://gcc.gnu.org/g:e79c65331190bef99c88062c77d557d161caf380

commit r13-7525-ge79c65331190bef99c88062c77d557d161caf380
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Sat Feb 25 23:18:13 2023 +0000

    modula-2: Amend the handling of failed select() calls in RTint [PR108835].

    When we make a select() that fails, there is an attempt to (a) diagnose
    why and (b) make a fallback.  These actions are causing some tests to
    hang on some Darwin versions, this is because the first action that is
    tried to assist in diagnosis/fallback handling is to replace the set
    timeout with NIL (which causes select to wait forever, modulo other
    reasons it might complete).

    To fix this, call select with a zero timeout when checking for error
    conditions.  Also, as we check the possible failure conditions, if we
    find a change that succeeds, then stop looking for errors.

    Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

            PR testsuite/108835

    gcc/m2/ChangeLog:

            * gm2-libs/RTint.mod: Do not use NIL timeout setting on select,
            test failures sequentially, finishing on the first success.

    (cherry picked from commit ef4ea6e08707d27674a8c5ddb4b478aac8713c03)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug testsuite/108835] gm2 tests at large -jNN numbers do not return
  2023-02-17 12:28 [Bug testsuite/108835] New: gm2 tests at large -jNN numbers do not return aldyh at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2023-07-03 14:24 ` cvs-commit at gcc dot gnu.org
@ 2023-07-27 21:43 ` gaius at gcc dot gnu.org
  2023-08-10 12:55 ` iains at gcc dot gnu.org
  2023-08-10 14:10 ` gaius at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-07-27 21:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108835

--- Comment #9 from Gaius Mulley <gaius at gcc dot gnu.org> ---
This looks fixed from the commit trail - can this PR be closed now?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug testsuite/108835] gm2 tests at large -jNN numbers do not return
  2023-02-17 12:28 [Bug testsuite/108835] New: gm2 tests at large -jNN numbers do not return aldyh at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2023-07-27 21:43 ` gaius at gcc dot gnu.org
@ 2023-08-10 12:55 ` iains at gcc dot gnu.org
  2023-08-10 14:10 ` gaius at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: iains at gcc dot gnu.org @ 2023-08-10 12:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108835

--- Comment #10 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Gaius Mulley from comment #9)
> This looks fixed from the commit trail - can this PR be closed now?

It's "fixed" - in that the more defensive coding around the select calls no
longer triggers the hanging case.

Unfortunately, I was not able to find any conclusive reason why the select
calls are getting incorrect input in the first place.  So, we can close this
bug but perhaps remember in the back of the mind that something (unknown) is
still not quite right with the select usage.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug testsuite/108835] gm2 tests at large -jNN numbers do not return
  2023-02-17 12:28 [Bug testsuite/108835] New: gm2 tests at large -jNN numbers do not return aldyh at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2023-08-10 12:55 ` iains at gcc dot gnu.org
@ 2023-08-10 14:10 ` gaius at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-08-10 14:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108835

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|REOPENED                    |RESOLVED

--- Comment #11 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Closing as the problem has gone away.  For reference another bug disappeared in
modula2/108404 when the select use was re-written.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-08-10 14:10 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-17 12:28 [Bug testsuite/108835] New: gm2 tests at large -jNN numbers do not return aldyh at gcc dot gnu.org
2023-02-19 20:29 ` [Bug testsuite/108835] " gaius at gcc dot gnu.org
2023-02-19 20:34 ` gaius at gcc dot gnu.org
2023-02-19 22:10 ` cvs-commit at gcc dot gnu.org
2023-02-20  7:12 ` aldyh at gcc dot gnu.org
2023-02-20 13:28 ` gaius at gcc dot gnu.org
2023-02-22 11:10 ` iains at gcc dot gnu.org
2023-06-30 14:15 ` cvs-commit at gcc dot gnu.org
2023-07-03 14:24 ` cvs-commit at gcc dot gnu.org
2023-07-27 21:43 ` gaius at gcc dot gnu.org
2023-08-10 12:55 ` iains at gcc dot gnu.org
2023-08-10 14:10 ` gaius at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).