[erlang-patches] Fix efile_drv crash when using async thread pool

Filipe David Manana <>
Fri Jan 11 21:12:12 CET 2013


On Fri, Jan 11, 2013 at 8:00 PM, Björn-Egil Dahlberg <> wrote:
> On 2013-01-08 11:46, Filipe David Manana wrote:
>>
>> Any reason for no feedback on this submission? It's quite critical
>> imho, it affects all file:open/2 calls that specify the 'compressed'
>> option, even for files that are not compressed. For example,
>> file_sorter always opens file with the 'compressed' option, and
>> shutting down a process that uses it, leads to these crashes when
>> using the async thread pool.
>
>
> Though your patch probably solves this (crucial) issue something is off.

Have been trying it in loops lasting several hours, without no more
crashes nor memory/fd leaks, for a few weeks now.

>
> We have mechanisms in place to guard against exactly this but apparently the
> guards are unsuccessful in this case, so therein lies a bug.

Which guards? In the allocator for the double gzFile close() call?
For the reads for example, there doesn't seem to be any guard at all.

>
> I, or someone else from the VM team, needs to look closer at this.

Thanks.

>
> // Björn-Egil
>
>
>
>>
>> Thanks.
>>
>> On Thu, Dec 27, 2012 at 1:07 PM, Filipe David Manana <>
>> wrote:
>>>
>>>
>>> https://github.com/fdmanana/otp/compare/master...fix_efile_drv_crash.patch
>>> https://github.com/fdmanana/otp/compare/master...fix_efile_drv_crash
>>>
>>> git  fetch  git://github.com/fdmanana/otp.git  fix_efile_drv_crash
>>>
>>>
>>>
>>> --
>>> Filipe David Manana,
>>>
>>> "Reasonable men adapt themselves to the world.
>>>   Unreasonable men adapt the world to themselves.
>>>   That's why all progress depends on unreasonable men."
>>
>>
>>
>
> _______________________________________________
> erlang-patches mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-patches



-- 
Filipe David Manana,

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."


More information about the erlang-patches mailing list