Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/sys/unix: TestSelect sporadically fails on netbsd #36409

Open
tklauser opened this issue Jan 6, 2020 · 9 comments
Open

x/sys/unix: TestSelect sporadically fails on netbsd #36409

tklauser opened this issue Jan 6, 2020 · 9 comments

Comments

@tklauser
Copy link
Member

@tklauser tklauser commented Jan 6, 2020

Just happened in a Trybot run for https://golang.org/cl/213398:

--- FAIL: TestSelect (0.03s)
    syscall_unix_test.go:552: Select: got 34.212168ms timeout, expected at least 250ms
FAIL
FAIL	golang.org/x/sys/unix	0.197s

https://storage.googleapis.com/go-build-log/693748e9/netbsd-amd64-8_0_26b119e1.log

It sporadically also shows up on build.golang.org:

https://build.golang.org/log/f7b283a921141a8d610478be6749d8939467157e
https://build.golang.org/log/0b854fe4272476f347def0ef570e976539b9de79
https://build.golang.org/log/2822401997cf813bb5dd7fbec7d2ea904e44fb0d
https://build.golang.org/log/a7f67f1b6c400bd4aaeb5f358eb3f9394f07e2de

@ianlancetaylor @bradfitz @bsiegert

@gopherbot gopherbot added this to the Unreleased milestone Jan 6, 2020
@bsiegert
Copy link
Contributor

@bsiegert bsiegert commented Jan 6, 2020

@zoulasc
Copy link
Contributor

@zoulasc zoulasc commented Jan 7, 2020

which branch is that? The master syscall_unix_test.go does not have that many lines?

@tklauser
Copy link
Member Author

@tklauser tklauser commented Jan 7, 2020

@zoulasc
Copy link
Contributor

@zoulasc zoulasc commented Jan 14, 2020

I have not been able to reproduce it on NetBSD-current. I will try it with -8.

@bcmills
Copy link
Member

@bcmills bcmills commented Apr 30, 2020

@bcmills
Copy link
Member

@bcmills bcmills commented Nov 11, 2020

2020-11-10T21:10:18-35f3e6c/netbsd-amd64-9_0
2020-11-07T08:05:50-4d91cf3/netbsd-386-9_0
2020-11-07T08:05:50-4d91cf3/netbsd-amd64-9_0
2020-11-06T08:11:18-db71ae6/netbsd-amd64-9_0
2020-10-28T09:49:53-708e7fb/netbsd-386-9_0
2020-10-27T14:07:54-0fcbb8f/netbsd-386-9_0
2020-10-27T14:07:54-0fcbb8f/netbsd-amd64-9_0
2020-10-27T09:04:13-e147114/netbsd-386-9_0
2020-10-27T09:04:13-e147114/netbsd-amd64-9_0
2020-10-26T13:34:11-418715b/netbsd-386-9_0
2020-10-24T13:24:49-ef9fd89/netbsd-386-9_0
2020-10-24T13:24:49-ef9fd89/netbsd-amd64-9_0
2020-10-22T20:17:47-fb209a7/netbsd-386-9_0
2020-10-20T23:07:47-6e5568b/netbsd-amd64-9_0
2020-10-18T23:04:17-eeed37f/netbsd-386-9_0
2020-10-17T00:35:18-b09fb70/netbsd-386-9_0
2020-10-17T00:35:18-b09fb70/netbsd-amd64-9_0
2020-10-16T16:01:50-f659759/netbsd-386-9_0
2020-10-15T00:08:50-e3ed001/netbsd-386-9_0
2020-10-14T08:05:44-cc95f25/netbsd-386-9_0
2020-10-13T13:26:46-2da7054/netbsd-386-9_0
2020-10-13T13:26:46-2da7054/netbsd-amd64-9_0
2020-10-13T13:26:27-a5aeffa/netbsd-386-9_0
2020-10-09T02:54:20-dfb3f7c/netbsd-386-9_0
2020-10-09T02:54:20-dfb3f7c/netbsd-amd64-9_0
2020-10-07T16:58:08-a893ed3/netbsd-386-9_0
2020-10-07T08:21:16-8445cc0/netbsd-386-9_0
2020-10-07T08:21:16-8445cc0/netbsd-amd64-9_0
2020-10-06T15:56:30-ac719f4/netbsd-amd64-9_0
2020-10-06T15:36:26-097ba2f/netbsd-386-9_0
2020-10-05T17:22:24-9971236/netbsd-386-9_0
2020-10-05T06:50:44-765f4ea/netbsd-386-9_0
2020-10-05T06:50:44-765f4ea/netbsd-amd64-9_0
2020-09-30T18:57:26-fdedc70/netbsd-386-9_0
2020-09-29T08:30:18-4d22bbb/netbsd-amd64-9_0
2020-09-26T10:08:07-9d91bd6/netbsd-amd64-9_0
2020-09-23T18:26:05-d9f96fd/netbsd-386-9_0
2020-09-17T07:31:48-efd3b9a/netbsd-amd64-9_0
2020-09-16T08:47:44-dbad9cb/netbsd-386-9_0
2020-09-16T08:47:44-dbad9cb/netbsd-amd64-9_0
2020-09-15T08:46:02-288bc34/netbsd-386-9_0
2020-09-15T08:46:02-288bc34/netbsd-amd64-9_0
2020-09-09T08:10:42-eff7692/netbsd-386-9_0
2020-09-09T08:10:42-eff7692/netbsd-amd64-9_0
2020-08-31T18:03:12-196b9ba/netbsd-386-9_0
2020-08-28T19:40:41-157a740/netbsd-386-9_0
2020-08-28T16:14:17-c663848/netbsd-amd64-9_0
2020-08-28T08:12:04-131dc92/netbsd-386-9_0
2020-08-26T17:35:25-f9321e4/netbsd-amd64-9_0
2020-08-24T13:15:25-c12d262/netbsd-amd64-9_0
2020-08-21T14:05:26-fda5168/netbsd-386-9_0
2020-08-20T21:24:57-1fb7954/netbsd-386-9_0
2020-08-19T17:11:15-d785dc2/netbsd-amd64-9_0
2020-08-19T03:55:08-9a32b3a/netbsd-amd64-9_0
2020-08-17T15:53:16-9781c65/netbsd-386-9_0
2020-08-17T15:53:16-9781c65/netbsd-amd64-9_0
2020-08-17T08:59:35-3ff754b/netbsd-amd64-9_0
2020-08-14T20:00:57-3d37ad5/netbsd-386-9_0
2020-08-10T15:15:05-1b9f125/netbsd-386-9_0
2020-08-08T12:01:58-1030fc2/netbsd-amd64-9_0
2020-08-05T06:55:43-0cf7623/netbsd-amd64-9_0
2020-08-03T21:05:38-64077c9/netbsd-amd64-9_0
2020-07-24T16:12:37-0e2f3a6/netbsd-386-9_0
2020-06-22T21:40:17-ed371f2/netbsd-amd64-9_0
2020-06-22T18:24:13-4b0db7f/netbsd-amd64-9_0
2020-06-15T20:00:32-f1bc736/netbsd-amd64-9_0
2020-06-10T11:11:08-226ff32/netbsd-386-9_0
2020-06-10T11:11:08-226ff32/netbsd-amd64-9_0
2020-06-02T22:51:09-6fdc65e/netbsd-386-9_0
2020-06-02T10:08:48-8d3cce7/netbsd-386-9_0
2020-05-23T22:24:54-0598657/netbsd-386-9_0
2020-05-01T05:29:02-1037786/netbsd-386-9_0
2020-04-30T08:24:07-1f56873/netbsd-amd64-9_0
2020-04-28T20:04:54-593003d/netbsd-386-9_0
2020-04-28T20:04:54-593003d/netbsd-amd64-9_0
2020-04-27T17:57:16-29b5707/netbsd-386-9_0
2020-04-27T17:57:16-29b5707/netbsd-amd64-9_0
2020-04-20T16:35:11-1957bb5/netbsd-amd64-9_0
2020-04-13T16:56:38-669c56c/netbsd-amd64-9_0
2020-04-09T09:22:40-59c9f1b/netbsd-amd64-9_0
2020-04-08T04:01:46-ea54a3c/netbsd-386-9_0
2020-04-06T15:51:08-e3b113b/netbsd-386-9_0
2020-04-06T11:34:30-c6e801f/netbsd-amd64-8_0
2020-03-31T12:40:33-c3d8025/netbsd-amd64-8_0
2020-03-27T17:32:47-9dae0f8/netbsd-amd64-8_0
2020-03-23T22:24:14-85ca7c5/netbsd-amd64-8_0
2020-03-21T13:42:03-328b4cd/netbsd-amd64-8_0
2020-03-16T21:47:34-08c6161/netbsd-amd64-8_0
2020-03-02T15:01:41-5c8b2ff/netbsd-amd64-8_0
2020-03-02T08:32:56-062a440/netbsd-amd64-8_0
2020-03-01T04:06:27-c5d0d7b/netbsd-amd64-8_0
2020-02-19T09:19:48-cb0a6d8/netbsd-amd64-8_0
2020-02-17T22:08:22-9197077/netbsd-amd64-8_0
2020-02-02T16:47:22-d101bd2/netbsd-amd64-8_0
2020-01-07T14:46:01-ef85f5a/netbsd-amd64-8_0
2020-01-06T11:46:38-5f8ca72/netbsd-amd64-8_0
2020-01-03T14:33:44-a1369af/netbsd-amd64-8_0
2019-12-23T22:40:30-abf886d/netbsd-amd64-8_0
2019-12-19T23:57:34-af0d71d/netbsd-amd64-8_0
2019-11-27T02:17:46-63cb32a/netbsd-amd64-8_0
2019-11-26T13:16:56-8a8471f/netbsd-amd64-8_0
2019-11-20T15:59:48-bd43791/netbsd-amd64-8_0

@bcmills bcmills changed the title x/sys/unix: TestSelect sporadically fails on netbsd/amd64 x/sys/unix: TestSelect sporadically fails on netbsd Nov 11, 2020
@bcmills
Copy link
Member

@bcmills bcmills commented Jun 7, 2021

2021-06-03T12:58:02-9665404/netbsd-386-9_0
2021-06-03T12:58:02-9665404/netbsd-amd64-9_0
2021-06-01T08:02:50-7ecdf8e/netbsd-386-9_0
2021-06-01T08:02:50-7ecdf8e/netbsd-amd64-9_0
2021-05-25T14:32:21-35b2ab0/netbsd-amd64-9_0
2021-05-21T20:33:32-0cec03c/netbsd-386-9_0
2021-05-14T08:44:01-e8d321e/netbsd-386-9_0
2021-05-11T11:38:59-b0526f3/netbsd-amd64-9_0
2021-05-07T16:14:34-a76c4d0/netbsd-386-9_0
2021-05-07T01:43:57-30e306a/netbsd-386-9_0
2021-05-07T01:43:57-30e306a/netbsd-amd64-9_0
2021-05-03T17:37:54-0981d60/netbsd-386-9_0
2021-05-03T17:37:54-0981d60/netbsd-amd64-9_0
2021-04-26T23:07:00-d19ff85/netbsd-amd64-9_0
2021-04-23T08:28:22-04245dc/netbsd-amd64-9_0
2021-04-21T22:16:51-33663a6/netbsd-386-9_0
2021-04-20T20:58:09-ac73e9f/netbsd-386-9_0
2021-04-20T20:58:09-ac73e9f/netbsd-amd64-9_0
2021-04-20T07:25:15-93ed5bc/netbsd-386-9_0
2021-04-19T17:01:43-37df388/netbsd-amd64-9_0
2021-04-15T04:56:47-66c3f26/netbsd-386-9_0
2021-04-14T05:50:47-fe65e33/netbsd-386-9_0
2021-04-12T22:04:55-f1c623a/netbsd-386-9_0
2021-03-26T22:08:04-49726bf/netbsd-386-9_0
2021-03-26T22:08:04-49726bf/netbsd-amd64-9_0
2021-03-24T05:16:08-47abb65/netbsd-386-9_0
2021-03-24T05:16:08-47abb65/netbsd-amd64-9_0
2021-03-20T14:08:29-1e4c9ba/netbsd-386-9_0
2021-03-19T07:12:55-635bc2c/netbsd-386-9_0
2021-03-19T07:07:19-193893d/netbsd-386-9_0
2021-03-17T22:57:23-c4fcb01/netbsd-386-9_0
2021-03-17T22:57:23-c4fcb01/netbsd-amd64-9_0
2021-03-17T09:18:45-3901687/netbsd-amd64-9_0
2021-03-16T16:44:54-77fc1ea/netbsd-amd64-9_0
2021-03-16T09:29:37-0b90fd5/netbsd-amd64-9_0
2021-03-15T16:08:23-c6e025a/netbsd-386-9_0
2021-03-15T16:08:23-c6e025a/netbsd-amd64-9_0
2021-03-14T19:57:30-07df6a1/netbsd-amd64-9_0
2021-03-13T20:20:42-bd2e134/netbsd-amd64-9_0
2021-03-13T11:07:37-8e9fff1/netbsd-amd64-9_0
2021-03-09T07:47:19-68d1333/netbsd-386-9_0
2021-03-09T07:47:19-68d1333/netbsd-amd64-9_0
2021-03-08T17:07:21-88b6017/netbsd-386-9_0
2021-03-08T17:07:21-88b6017/netbsd-amd64-9_0
2021-03-05T23:01:14-8fe3ee5/netbsd-386-9_0
2021-03-05T03:40:16-7844c3c/netbsd-386-9_0
2021-03-05T03:40:16-7844c3c/netbsd-amd64-9_0
2021-03-05T03:01:59-61f932b/netbsd-amd64-9_0
2021-03-04T20:38:40-7b4935e/netbsd-386-9_0
2021-03-04T20:38:40-7b4935e/netbsd-amd64-9_0
2021-03-04T15:22:09-afaa365/netbsd-386-9_0
2021-03-04T15:22:09-afaa365/netbsd-amd64-9_0
2021-03-04T12:46:12-50617c2/netbsd-386-9_0
2021-03-03T07:41:36-134d130/netbsd-386-9_0
2021-03-01T09:17:18-77cc208/netbsd-386-9_0
2021-02-27T04:07:30-b0d1d43/netbsd-386-9_0
2021-02-27T04:07:30-b0d1d43/netbsd-amd64-9_0
2021-02-26T18:17:00-f36f782/netbsd-386-9_0
2021-02-26T18:17:00-f36f782/netbsd-amd64-9_0
2021-02-25T13:49:36-a50acf3/netbsd-386-9_0
2021-02-25T09:19:47-4ada943/netbsd-386-9_0
2021-02-25T01:42:09-683adc9/netbsd-386-9_0
2021-02-25T01:42:09-683adc9/netbsd-amd64-9_0
2021-02-24T23:11:01-5640770/netbsd-amd64-9_0
2021-02-23T21:21:15-eede423/netbsd-386-9_0
2021-02-23T21:21:15-eede423/netbsd-amd64-9_0
2021-02-23T09:59:34-7937bea/netbsd-386-9_0
2021-02-23T09:59:34-7937bea/netbsd-amd64-9_0
2021-02-20T05:07:31-9a76102/netbsd-386-9_0
2021-02-20T05:07:31-9a76102/netbsd-amd64-9_0
2021-02-19T17:28:41-57ea560/netbsd-386-9_0
2021-02-18T08:51:08-9555bcd/netbsd-amd64-9_0
2021-02-18T08:40:38-e8e2918/netbsd-amd64-9_0
2021-02-17T10:54:51-b926d43/netbsd-386-9_0
2021-02-17T08:59:31-73548a7/netbsd-386-9_0
2021-02-16T16:36:48-f7da38b/netbsd-386-9_0
2021-01-24T15:45:48-22da62e/netbsd-amd64-9_0
2021-01-23T23:11:50-1d47697/netbsd-amd64-9_0
2021-01-22T23:57:52-a8b976e/netbsd-amd64-9_0
2021-01-22T09:31:01-04d7465/netbsd-386-9_0
2021-01-22T09:31:01-04d7465/netbsd-amd64-9_0
2021-01-19T21:28:57-b64e53b/netbsd-386-9_0
2021-01-13T18:17:07-4bcb84e/netbsd-386-9_0
2021-01-13T18:17:07-4bcb84e/netbsd-amd64-9_0
2021-01-13T00:00:19-eaf3bda/netbsd-386-9_0
2021-01-12T09:13:31-59c308d/netbsd-386-9_0
2021-01-08T17:29:13-0df2131/netbsd-386-9_0
2021-01-08T17:29:13-0df2131/netbsd-amd64-9_0
2021-01-05T21:07:32-16f7687/netbsd-386-9_0
2021-01-05T21:07:32-16f7687/netbsd-amd64-9_0
2021-01-04T20:47:34-6f83486/netbsd-amd64-9_0
2020-12-31T18:44:35-2d18734/netbsd-amd64-9_0
2020-12-23T07:45:33-0d417f6/netbsd-amd64-9_0
2020-12-14T21:06:02-f9fddec/netbsd-386-9_0
2020-12-14T09:51:26-aec9a39/netbsd-386-9_0
2020-12-14T09:51:18-8c39875/netbsd-386-9_0
2020-12-07T22:35:42-d4d67f9/netbsd-386-9_0
2020-12-04T22:54:14-ed75229/netbsd-386-9_0
2020-12-02T21:35:21-69691e4/netbsd-amd64-9_0
2020-12-01T14:50:00-ef89a24/netbsd-amd64-9_0
2020-11-30T17:19:29-760e229/netbsd-amd64-9_0
2020-11-26T22:47:55-f88b827/netbsd-amd64-9_0
2020-11-19T10:28:17-f84b799/netbsd-386-9_0
2020-11-19T10:28:17-f84b799/netbsd-amd64-9_0
2020-11-18T18:29:58-a01c418/netbsd-amd64-9_0
2020-11-12T07:39:58-5cba982/netbsd-amd64-9_0

@zoulasc
Copy link
Contributor

@zoulasc zoulasc commented Jun 7, 2021

This does not seem to fail for me:

#include <sys/select.h>
#include <errno.h>
#include <stdio.h>
#include <time.h>
int
main(void)
{
        struct timespec dts, ets, sts, ts;
        for (;;) {
                clock_gettime(CLOCK_MONOTONIC, &sts);   
#ifdef PSELECT
                ts.tv_sec = 0;
                ts.tv_nsec = 250000000;
                if (pselect(0, NULL, NULL, NULL, &ts, NULL) == -1
                    && errno == EINTR)
                        continue;
#else
                struct timeval tv;
                tv.tv_sec = 0;
                tv.tv_usec = 250000;
                if (select(0, NULL, NULL, NULL, &tv) == -1 && errno == EINTR)
                        continue;
                ts.tv_nsec = tv.tv_usec * 1000;
#endif
                clock_gettime(CLOCK_MONOTONIC, &ets);   
                timespecsub(&ets, &sts, &dts);
                if (dts.tv_nsec < 200000000) {
                        fprintf(stderr, "too little sleep r=%d s=%d\n",
                                dts.tv_nsec, ts.tv_nsec);
                }
        }
        return 0;
}

@bcmills
Copy link
Member

@bcmills bcmills commented Jun 7, 2021

I wouldn't be surprised if the test is somewhat sensitive to timing and/or machine load — for example, it may be triggering a bug that only occurs under heavy load, or that only occurs on relatively underpowered machines.

(Eyeballing the dashboard, the failure rate on the Go builders seems to be something on the order of 2–5%.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants