Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Sep 2025 13:13:48 +0200
From:      Paul Floyd <paulf2718@gmail.com>
To:        freebsd-hackers@FreeBSD.org
Subject:   select(2) regression?
Message-ID:  <c6f20acb-6548-4be0-a143-d30222ca4429@gmail.com>

index | next in thread | raw e-mail

Hi

I'm testing Valgrind to try to get it ready for 15.0-RELEASE. I've 
seeing several new issues. Here is the first one.

In one testcase this code

    for (i = 0; i < loops; i++) {
       if (sleepms > 0 && s->sleep) {
          t[s->t].tv_sec = sleepms / 1000;
          t[s->t].tv_usec = (sleepms % 1000) * 1000;
          ret = select (0, NULL, NULL, NULL, &t[s->t]);
          /* We only expect a timeout result or EINTR from the above. */
          if (ret != 0 && errno != EINTR)
             perror("unexpected result from select");
       }
       if (burn > 0 && s->burn)
          do_burn();
    }

is failing with the select call returning 93. I don't see how that is 
possible with 0 nfds and empty fd sets. Note that the problem is in vgdb 
which is a plain C exe not running under Valgrind. I'll see if I can 
make a smaller reproducer. This is on amd64. It looks like a regression 
to me - select worked as expected as far as I can remember going back to 
FreeBSD 10.

A+

Paul




help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c6f20acb-6548-4be0-a143-d30222ca4429>