NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/57145: gmake: *** INTERNAL: readdir: Operation not supported. Stop.



It looks like the EOPNOTSUPP is explained by autofs's lack of lseek.

I'm still unclear on the EINVAL.  My best guess is that:

1. somehow, fp->f_offset gets set to something negative
2. sys_lseek -> vn_seek -> VOP_SEEK -> genfs_seek fails with EINVAL

I can't find a way for (1) to happen on ufs or tmpfs, but maybe it
could happen with nfs -- reviewing that code is a lot of work.

One path that crossed my mind is a race in readdir by multiple threads
or processes on the same file object, which might have been fixed by
<https://mail-index.netbsd.org/source-changes/2023/04/22/msg144249.html>
(which has not been pulled up to netbsd-9), but I doubt that's
happening here.

So I'll go ahead and commit the readdir(3) fix, but I'm still
suspicious of EINVAL.  It would be worthwhile to try to instrument
this and reproduce it to find out where it's coming from, in case
there's another bug lurking.


Home | Main Index | Thread Index | Old Index