[LTP] [PATCH 2/2] syscalls/inotify06: Raise inotify instance limit in /proc

Martin Doucha mdoucha@suse.cz
Thu May 6 17:27:28 CEST 2021


On 05. 05. 21 18:47, Jan Kara wrote:
> On Wed 05-05-21 17:38:47, Martin Doucha wrote:
>> inotify_init() sometimes fails with EMFILE because there are too many
>> partially closed instances waiting for garbage collection. Bump the limit
>> in /proc/sys/fs/inotify/max_user_instances for the duration of the test.
>>
>> Signed-off-by: Martin Doucha <mdoucha@suse.cz>
>> ---
>>
>> I thought about only reading the procfile and calling yield() after every
>> proc_limit/2 iterations to wait for garbage collection but I'm afraid that
>> it might reduce the likelihood of triggering the bug. Since I currently have
>> no system where I could reproduce the race, I've decided to play it safe and
>> bump the /proc limit.
> 
> So waiting would be fine as well. One process simply creates & deletes
> files in a loop until the other performs TEARDOWNS teardowns. It doesn't
> really matter how fast teardowns happen for the race to trigger. But I have
> no problem with this solution either.

Let's go with the patch as is then. Like I said, when I don't have a
system where the issue is reproducible, I prefer to play it safe.

-- 
Martin Doucha   mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic


More information about the ltp mailing list