[gmx-developers] glibc qsort bug crashing mdrun

Berk Hess hess at cbr.su.se
Mon Jun 21 18:38:31 CEST 2010


At least from up till seven years ago till now.
As I said, the crash is very unlikely.
Two threads have to call qsort at nearly exactly the same time.

Berk

Alexey Shvetsov wrote:
> Hi,
>
> What versions of glibc has this bug?
> I didnt see any crashed with threaded mdrun version with glibc-2.11.x
> on x86_64 (both with gcc-4.4 and gcc-4.5)
>
> 2010/6/21 Berk Hess <hess at cbr.su.se>:
>   
>> Hi,
>>
>> I just discovered that there is a bug in qsort in glibc that makes it
>> non thread safe.
>> So mdrun with the GMX thread library could crash randomly. This occured
>> very seldomly.
>> We have one system that we managed to crash with certain compiler
>> settings in 1% of the runs.
>> This could explain some crashes people have experienced (gcc 4.1 is
>> another danger).
>> I have now replaced qsort by our own qsort in case we use threads.
>>
>> Berk
>>
>> --
>> gmx-developers mailing list
>> gmx-developers at gromacs.org
>> http://lists.gromacs.org/mailman/listinfo/gmx-developers
>> Please don't post (un)subscribe requests to the list. Use the
>> www interface or send it to gmx-developers-request at gromacs.org.
>>
>>     
>
>
>
>   




More information about the gromacs.org_gmx-developers mailing list