Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 27 Jun 2022 10:37:37 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: Florian Weimer <fweimer@...hat.com>
Cc: Nick Peng <pymumu@...il.com>, musl@...ts.openwall.com
Subject: Re: BUG: Calling readdir/dirfd after vfork will cause
 deadlock.

* Florian Weimer <fweimer@...hat.com> [2022-06-27 09:42:57 +0200]:
> * Szabolcs Nagy:
> 
> > * Nick Peng <pymumu@...il.com> [2022-06-25 11:40:17 +0800]:
> >> Description:  After vfork, calling functions such as readdir/dirfd may
> >> cause deadlock. GNU C is OK.
> >
> > why do you think "GNU C is OK"? is this from some real software?
> 
> glibc supports opendir/readdir/closedir after vfork as an extension.
> The JVM depends on it.

how does that work? i think glibc just calls vfork syscall (or
clone(CLONE_VM|CLONE_VFORK)) from asm and opendir allocates.
so i'd expect a deadlock where the parent waits for the child
to exec while holding the malloc lock.

> 
> Of course it's undefined, but I really see no way around keeping support
> for it for the time being.
> 
> Thanks,
> Florian

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.