Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Sep 2019 11:29:45 +0000
From:      bugzilla-noreply@freebsd.org
To:        gnome@FreeBSD.org
Subject:   [Bug 236815] [patch] devel/glib20: loops over all possible file descriptors
Message-ID:  <bug-236815-6497-yNQycf8JQ9@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-236815-6497@https.bugs.freebsd.org/bugzilla/>
References:  <bug-236815-6497@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236815

--- Comment #19 from rozhuk.im@gmail.com ---
(In reply to Ting-Wei Lan from comment #12)

IMHO this is wrong or incomplete description.

1. malloc() can not cause deadlock, it is heavy used by many multithread ap=
ps.

2. Docs says that opendir() is thread and mt safe:
http://man7.org/linux/man-pages/man3/opendir.3.html
But readdir() is not: MT-Unsafe:
http://man7.org/linux/man-pages/man3/readdir.3.html

3. Reading dir using more than one syscall is bad idea because between read=
 it
can change some content is it will not be handled/processed.
As I remember this was a reason to drop opendir() in mine FAM backend and s=
ome
strange crashes:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214338

So I do not understand why some one can need LOCK() in fdwalk().

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-236815-6497-yNQycf8JQ9>