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

Error on FreeBSD 10: ERROR: slave read failed: No such file or directory #32

Closed
do11 opened this issue Jan 12, 2016 · 1 comment
Closed

Comments

@do11
Copy link

do11 commented Jan 12, 2016

There is intermittent error on FreeBSD 10.

Pipe-based Context Switching -- 1 copy
==> "/mnt/xxx/byte-unixbench/UnixBench/pgms/context1" 10 2>&1 >> "/mnt/xxx/byte-unixbench/UnixBench/results/test-2016-01-12-03.log"

#### Pass 1


# COUNT0: 1653905
# COUNT1: 1
# COUNT2: lps
# ERROR: slave read failed: No such file or directory
# elapsed: 10.034850
# pid: 2346
# status: 0

Hack:

src/context1.c:
if (read(p1[0], (char *)&check, sizeof(check)) != sizeof(check)) {
                                if ((errno != 0) && (errno != EINTR))
                                        perror("slave read failed");
                                exit(1);
}

Additional note:

You incorrectly check return value of read(). errno should be checked only if read() returns -1, otherwise it may contain garbage (as it occurs on Freebsd 10).

@gstrauss
Copy link
Collaborator

This is fixed in commit 64c45b4

@kdlucas kdlucas closed this as completed Jul 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants