[Bug 261690] NFSv4 mount on Linux client hangs during complex access patterns (gcc bootstrapping on client)

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 04 Feb 2022 12:01:15 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261690

--- Comment #1 from Björn Fischer <bf@cebitec.uni-bielefeld.de> ---
Ok, I found a way to trigger the problem with this silly perl script on the
Linux client, so no need to pull off a complete GCC bootstrap:

#!/usr/bin/perl

use strict;
use warnings;

use threads;
use IO::Handle;
use Fcntl qw(SEEK_SET SEEK_CUR SEEK_END);

my $testfile = 'testfile';

my $thread = {};
map { $thread->{$_} = threads->create(
    sub {
        open(my $fh, '+>', $testfile) or die "Can't open +> $testfile: $!";
        my $id = $_;
        map {
            seek $fh, int(rand(1024*4096)), SEEK_SET;
            print $fh 'foobar' x (500 + int(rand(4000)));
            $fh->flush();
        } (0..10000);
        close $fh;
    }
) } (0..1000);

map {
    $thread->{$_}->join();
} (0..1000);

-- 
You are receiving this mail because:
You are the assignee for the bug.