Date: Wed, 28 Jun 2017 12:35:47 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 186114] net/mpd5 hangs after a certain number of users connect Message-ID: <bug-186114-2472-xUe1aKVqAm@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-186114-2472@https.bugs.freebsd.org/bugzilla/> References: <bug-186114-2472@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D186114 --- Comment #85 from Cassiano Peixoto <peixoto.cassiano@gmail.com> --- (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.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-186114-2472-xUe1aKVqAm>