On Tuesday, September 18, 2012, Otto Moerbeek wrote: > On Tue, Sep 18, 2012 at 03:32:04PM -0400, Ted Unangst wrote: > > > On Tue, Sep 18, 2012 at 19:40, Alexey Suslikov wrote: > > > > > This one being discovered by Roman Kravchuk using Kannel port (see > > > https://github.com/jasperla/openbsd-wip/tree/master/net/kannel). > > > > > > While stress testing, Kannel components die with > > > > > > Program received signal SIGSEGV, Segmentation fault. > > > [Switching to thread 1006387] > > > 0x00000cb33345cf6e in random () at > /usr/src/lib/libc/stdlib/random.c:387 > > > 387 *fptr += *rptr; > > > > > > We suspect threading issue because of the following trace: > > > > > Is it normal to not have a mutex protected *random in OpenBSD? > > > > No, according to posix it should be thread safe. I don't know why, > > since rand() is one of the exempted functions, but random() is not. > > Standards gods are capricious gods. > > I think you should stress *should* here. Looking at the > implementation, I cannot believe it's actually thread-safe. > > How about rand, srand, srand48 etc?
- Re: Threads related SIGSEGV in random.c Ted Unangst
- Re: Threads related SIGSEGV in random.c Theo de Raadt
- Re: Threads related SIGSEGV in random.c Marc Espie
- Re: Threads related SIGSEGV in random.c Philip Guenther
- Re: Threads related SIGSEGV in random.c Paul Irofti
- Re: Threads related SIGSEGV in rand... Stuart Henderson
- Re: Threads related SIGSEGV in rand... Marco S Hyman
- Re: Threads related SIGSEGV in ... Paul Irofti
- Re: Threads related SIGSEGV in ... Alexander Hall
- Re: Threads related SIGSEGV in random.c Otto Moerbeek
- Re: Threads related SIGSEGV in random.c Alexey Suslikov
- Re: Threads related SIGSEGV in random.c Ted Unangst
- Re: Threads related SIGSEGV in random.c Otto Moerbeek
- Re: Threads related SIGSEGV in random.c Theo de Raadt
- Re: Threads related SIGSEGV in random.c Alexey Suslikov
- Re: Threads related SIGSEGV in random.c Otto Moerbeek
- Re: Threads related SIGSEGV in random.c Ted Unangst
- Re: Threads related SIGSEGV in random.c Alexey Suslikov
- Re: Threads related SIGSEGV in rand... Stefan Sperling
- Re: Threads related SIGSEGV in ... Remco
- Re: Threads related SIGSEGV in ... Stefan Sperling