• Re: Solving thundering Herd with glibc...

    From Scott Lurndal@21:1/5 to Bonita Montero on Thu Apr 24 21:35:30 2025
    Bonita Montero <[email protected]> writes:
    Am 24.04.2025 um 22:39 schrieb Chris M. Thomasson:
    Well, I don't have any more time to mess around with this, but is Bonita
    right? does glibc 100% solve _all_ thundering herd problems? I know
    about wait morphing, however it is not a 100% solution.

    With wait morphing thundering herd is impossible.

    Wait morphing was removed from glibc in 2016, if I recall correctly.

    In any case, a programmer should never assume that the
    run-time system will support wait morphing when writing
    portable code. Release the mutex before signaling the
    condition variable and avoid pthread_cond_broadcast unless
    absolutely necessary.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Vir Campestris@21:1/5 to Bonita Montero on Wed May 14 16:05:02 2025
    On 25/04/2025 09:37, Bonita Montero wrote:
    Am 24.04.2025 um 23:33 schrieb Chris M. Thomasson:

    "there’s no thundering herd, ever!" because a controlled test didn't
    "show it" is like saying race conditions do not exist because your
    code "worked fine this time."? Fair enough?

    Yes, controlled test with 10'000 iterations.
    The code is correct and trivial, but too much for you.

    Once upon a time I put a race in a bit of code.

    It took us 3 years to track down why our customers were reporting
    occasional faults :(

    (It turned out the trick to reproduce it was a combination of lots of
    CPU load and disk transfers not more than once every 30 seconds)

    --
    Do not listen to rumour, but, if you do, do not believe it.
    Ghandi.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Brown@21:1/5 to Vir Campestris on Thu May 15 08:49:28 2025
    On 14/05/2025 17:05, Vir Campestris wrote:
    On 25/04/2025 09:37, Bonita Montero wrote:
    Am 24.04.2025 um 23:33 schrieb Chris M. Thomasson:

    "there’s no thundering herd, ever!" because a controlled test didn't
    "show it" is like saying race conditions do not exist because your
    code "worked fine this time."? Fair enough?

    Yes, controlled test with 10'000 iterations.
    The code is correct and trivial, but too much for you.

    Once upon a time I put a race in a bit of code.

    It took us 3 years to track down why our customers were reporting
    occasional faults :(

    (It turned out the trick to reproduce it was a combination of lots of
    CPU load and disk transfers not more than once every 30 seconds)


    It's always fun dealing with a bug that only triggers in rare timing situations. We once had a mistake in a timing table in a program that
    could sometimes result in intermittent faults in the system if
    particular events occurred at the same time, on the 30th of September.
    Finding an issue that occurred at most once per year was a challenge!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From candycanearter07@21:1/5 to David Brown on Fri May 16 12:30:03 2025
    David Brown <[email protected]> wrote at 06:49 this Thursday (GMT):
    On 14/05/2025 17:05, Vir Campestris wrote:
    On 25/04/2025 09:37, Bonita Montero wrote:
    Am 24.04.2025 um 23:33 schrieb Chris M. Thomasson:

    "there’s no thundering herd, ever!" because a controlled test didn't >>>> "show it" is like saying race conditions do not exist because your
    code "worked fine this time."? Fair enough?

    Yes, controlled test with 10'000 iterations.
    The code is correct and trivial, but too much for you.

    Once upon a time I put a race in a bit of code.

    It took us 3 years to track down why our customers were reporting
    occasional faults :(

    (It turned out the trick to reproduce it was a combination of lots of
    CPU load and disk transfers not more than once every 30 seconds)


    It's always fun dealing with a bug that only triggers in rare timing situations. We once had a mistake in a timing table in a program that
    could sometimes result in intermittent faults in the system if
    particular events occurred at the same time, on the 30th of September. Finding an issue that occurred at most once per year was a challenge!


    If you knew what date the issue was happening on, could you force the
    system clock to be on that day?
    --
    user <candycane> is generated from /dev/urandom

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Brown@21:1/5 to All on Fri May 16 15:33:10 2025
    On 16/05/2025 14:30, candycanearter07 wrote:
    David Brown <[email protected]> wrote at 06:49 this Thursday (GMT):
    On 14/05/2025 17:05, Vir Campestris wrote:
    On 25/04/2025 09:37, Bonita Montero wrote:
    Am 24.04.2025 um 23:33 schrieb Chris M. Thomasson:

    "there’s no thundering herd, ever!" because a controlled test didn't >>>>> "show it" is like saying race conditions do not exist because your
    code "worked fine this time."? Fair enough?

    Yes, controlled test with 10'000 iterations.
    The code is correct and trivial, but too much for you.

    Once upon a time I put a race in a bit of code.

    It took us 3 years to track down why our customers were reporting
    occasional faults :(

    (It turned out the trick to reproduce it was a combination of lots of
    CPU load and disk transfers not more than once every 30 seconds)


    It's always fun dealing with a bug that only triggers in rare timing
    situations. We once had a mistake in a timing table in a program that
    could sometimes result in intermittent faults in the system if
    particular events occurred at the same time, on the 30th of September.
    Finding an issue that occurred at most once per year was a challenge!


    If you knew what date the issue was happening on, could you force the
    system clock to be on that day?

    Yes, once we figured out that the issue was date-dependent. For the
    first few years, all we knew was that we were getting occasional rare
    bug reports and no one saw the coincidence. (This was a program on DOS
    - changing the system clock was easy.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From candycanearter07@21:1/5 to David Brown on Sun May 18 19:20:05 2025
    David Brown <[email protected]> wrote at 13:33 this Friday (GMT):
    On 16/05/2025 14:30, candycanearter07 wrote:
    David Brown <[email protected]> wrote at 06:49 this Thursday (GMT): >>> On 14/05/2025 17:05, Vir Campestris wrote:
    On 25/04/2025 09:37, Bonita Montero wrote:
    Am 24.04.2025 um 23:33 schrieb Chris M. Thomasson:

    "there’s no thundering herd, ever!" because a controlled test didn't >>>>>> "show it" is like saying race conditions do not exist because your >>>>>> code "worked fine this time."? Fair enough?

    Yes, controlled test with 10'000 iterations.
    The code is correct and trivial, but too much for you.

    Once upon a time I put a race in a bit of code.

    It took us 3 years to track down why our customers were reporting
    occasional faults :(

    (It turned out the trick to reproduce it was a combination of lots of
    CPU load and disk transfers not more than once every 30 seconds)


    It's always fun dealing with a bug that only triggers in rare timing
    situations. We once had a mistake in a timing table in a program that
    could sometimes result in intermittent faults in the system if
    particular events occurred at the same time, on the 30th of September.
    Finding an issue that occurred at most once per year was a challenge!


    If you knew what date the issue was happening on, could you force the
    system clock to be on that day?

    Yes, once we figured out that the issue was date-dependent. For the
    first few years, all we knew was that we were getting occasional rare
    bug reports and no one saw the coincidence. (This was a program on DOS
    - changing the system clock was easy.)


    Ah, fair enough.
    --
    user <candycane> is generated from /dev/urandom

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)