Re: syslog() thread unsafety

2017-06-14 Thread Eugene Grosbein
15.06.2017 0:09, Konstantin Belousov wrote: > On Wed, Jun 14, 2017 at 11:39:39PM +0700, Eugene Grosbein wrote: >> 14.06.2017 21:12, Konstantin Belousov wrote: >> >>> If the issue is that mpd5 cancels logging thread, and this leaves the >>> mutex in the locked state, the right solution is to

Re: 11.1-BETA1: lsof build failure

2017-06-14 Thread Peter
Larry Rosenman wrote: Current lsof is 4.90M. Ack, that does. Larry Sysutils/lsof maintainer On 6/14/17, 8:13 AM, "Peter" wrote: FYI, please check if reproducible and/or issue: Installed this from SVN

Re: syslog() thread unsafety

2017-06-14 Thread Konstantin Belousov
On Wed, Jun 14, 2017 at 11:39:39PM +0700, Eugene Grosbein wrote: > 14.06.2017 21:12, Konstantin Belousov wrote: > > > If the issue is that mpd5 cancels logging thread, and this leaves the > > mutex in the locked state, the right solution is to establish a cleanup > > handler around the locked

Re: syslog() thread unsafety

2017-06-14 Thread Eugene Grosbein
14.06.2017 21:12, Konstantin Belousov wrote: > If the issue is that mpd5 cancels logging thread, and this leaves the > mutex in the locked state, the right solution is to establish a cleanup > handler around the locked region. Note that this can only work if the > cancellation is in deferred

Re: syslog() thread unsafety

2017-06-14 Thread Konstantin Belousov
On Wed, Jun 14, 2017 at 08:49:36PM +0700, Eugene Grosbein wrote: > Hi! > > Our [v]syslog() implementation in src/lib/libc/gen/syslog.c > tries to be thread-safe and uses "syslog_mutex". > > It may lock this mutex then call blocking system calls like sendto(). > If a thread owning this mutex is

syslog() thread unsafety

2017-06-14 Thread Eugene Grosbein
Hi! Our [v]syslog() implementation in src/lib/libc/gen/syslog.c tries to be thread-safe and uses "syslog_mutex". It may lock this mutex then call blocking system calls like sendto(). If a thread owning this mutex is pthread_cancel()'d in process, the mutex stays UMUTEX_CONTESTED and every other

Re: 11.1-BETA1: lsof build failure

2017-06-14 Thread Larry Rosenman
Current lsof is 4.90M. Larry Sysutils/lsof maintainer On 6/14/17, 8:13 AM, "Peter" wrote: FYI, please check if reproducible and/or issue: Installed this from SVN & local build: 11.1-BETA1

11.1-BETA1: lsof build failure

2017-06-14 Thread Peter
FYI, please check if reproducible and/or issue: Installed this from SVN & local build: 11.1-BETA1 FreeBSD 11.1-BETA1 #0 r319858:319867M ... amd64 Then tried to update lsof-4.90.f,8 and got this error: cc -pipe -DNEEDS_BOOL_TYPEDEF -DHASTASKS -DHAS_PAUSE_SBT -DHASEFFNLINK=i_effnlink