[CCing visa@ in]
On 2018-08-25 21:40:57, Tom Murphy <[email protected]> wrote:
> On Thu, Aug 23, 2018 at 08:45:54PM +0900, Tom Murphy wrote:
> > I've narrowed it down.
> >
> >Last kernel where adb works: June 24 09:59:46 MDT 2018
> >1st Kernel where adb panics: June 25 13:10:32 MDT 2018
> >
> > [...]
> >
> > I'm going to look at the commits next.
> >
> >-Tom
>
> I can verify that this commit is what makes the kernel panic when adb is
> run and an Android device is connected to the machine with ADB enabled:
>
> https://marc.info/?l=openbsd-cvs&m=152996258723362&w=2
>
> CVSROOT: /cvs
> Module name: src
> Changes by: [email protected] 2018/06/25 10:06:27
>
> Modified files:
> sys/kern : vfs_syscalls.c
> lib/libc/sys : dup.2
>
> Log message:
> During open(2), release the fdp lock before calling vn_open(9).
> This lets other threads of the process modify the file descriptor
> table even if the vn_open(9) call blocks.
>
> The change has an effect on dup2(2) and dup3(2). If the new descriptor
> is the same as the one reserved by an unfinished open(2), the system
> call will fail with error EBUSY. The accept(2) system call already
> behaves like this.
>
> Issue pointed out by art@ via mpi@
>
> Tested in a bulk build by ajacoutot@
> OK mpi@
>
> * * *
>
> I tested kernels compiled just before that commit and right after, and that
> commit makes the kernel panic.
>
I can also confirm that reverting this patch fixes the kernel
panics when launching ADB for me as well. I'm currently syncing
my phone to my HDD as I type this.
I'm still building against kernel sources from here:
OpenBSD 6.3-current (GENERIC.MP) #163: Mon Jul 30 12:45:31 MDT 2018
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
So fair warning, my tree is still a little bit out of date (I'm
planning on upgrading to a newer snap this weekend if I have the
time) but, as stated above, I can at least confirm that reverting
this patch fixes the panics for me.
--
Bryan