From owner-freebsd-net@freebsd.org Wed Jun 28 12:35:48 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3684FDA182D for ; Wed, 28 Jun 2017 12:35:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CE0C779EE for ; Wed, 28 Jun 2017 12:35:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v5SCZljn084514 for ; Wed, 28 Jun 2017 12:35:47 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 186114] net/mpd5 hangs after a certain number of users connect Date: Wed, 28 Jun 2017 12:35:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: crash, needs-qa X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: peixoto.cassiano@gmail.com X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: eugen@freebsd.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 12:35:48 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D186114 --- Comment #85 from Cassiano Peixoto --- (In reply to Eugene Grosbein from comment #84) Hi Eugene, Don't worry, no problem. I tried to apply Konstantin patch but i had some rejects: # cat lib/libc/stdio/fgets.c.rej @@ -53,17 +53,17 @@ fgets(char * __restrict buf, int n, FILE * __restrict fp) { size_t len; - char *s; + char *s, *ret; unsigned char *p, *t; - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, -1); if (n <=3D 0) { /* sanity check */ fp->_flags |=3D __SERR; errno =3D EINVAL; - FUNLOCKFILE(fp); - return (NULL); + ret =3D NULL; + goto end; } s =3D buf; @@ -76,8 +76,8 @@ if (__srefill(fp)) { /* EOF/error: stop with partial or no line = */ if (!__sfeof(fp) || s =3D=3D buf) { - FUNLOCKFILE(fp); - return (NULL); + ret =3D NULL; + goto end; } break; } # cat lib/libc/stdio/fgetwln.c.rej @@ -45,13 +45,14 @@ wchar_t * fgetwln_l(FILE * __restrict fp, size_t *lenp, locale_t locale) { + wchar_t *ret; wint_t wc; size_t len; int savserr; FIX_LOCALE(locale); - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, 1); savserr =3D fp->_flags & __SERR; # cat lib/libc/stdio/fgetws.c.rej @@ -46,14 +46,14 @@ fgetws_l(wchar_t * __restrict ws, int n, FILE * __restrict fp, locale_t locale) { int sret; - wchar_t *wsp; + wchar_t *wsp, *ret; size_t nconv; const char *src; unsigned char *nl; FIX_LOCALE(locale); struct xlocale_ctype *l =3D XLOCALE_CTYPE(locale); - FLOCKFILE(fp); + FLOCKFILE_CANCELSAFE(fp); ORIENT(fp, 1); if (n <=3D 0) { @@ -113,12 +113,14 @@ goto error; ok: *wsp =3D L'\0'; - FUNLOCKFILE(fp); + ret =3D ws; +end: + FUNLOCKFILE_CANCELSAFE(); return (ws); error: - FUNLOCKFILE(fp); - return (NULL); + ret =3D NULL; + goto end; } wchar_t * Should i update to latest FreeBSD-11 STABLE? I'm using 11.0-p0. Thanks --=20 You are receiving this mail because: You are on the CC list for the bug.=