Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 10 Feb 2019 01:29:32 +0300
From: Alexey Izbyshev <izbyshev@...ras.ru>
To: musl@...ts.openwall.com
Cc: Szabolcs Nagy <nsz@...t70.net>
Subject: Re: __synccall: deadlock and reliance on racy /proc/self/task

On 2019-02-10 00:40, Szabolcs Nagy wrote:
> the attached patch fixes the issue on my machine.
> i don't know if this is just luck.
> 
> the assumption is that if /proc/self/task is read twice such that
> all tids in it seem to be active and caught, then all the active
> threads of the process are caught (no new threads that are already
> started but not visible there yet)
> 
> anyway i had to retry until there are no exiting threads in dir to
> reliably fix the deadlock.

Unfortunately, on 4.15.x kernel, I've got both the deadlock (~23000 
iterations) and the mismatch (after I removed kill() loop; ~19000 
iterations).

On 4.4.x, it took ~30 mln. iterations to get the mismatch (on 
deadlock-free version):

--iter: 30198000
--iter: 30199000
mismatch: tid 539: 1000 != 0

Alexey

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.