Re: [tor-bugs] #20988 [Core Tor/Tor]: Test fgets_eagain fails on FreeBSD-amd64

2017-03-06 Thread Tor Bug Tracker & Wiki
#20988: Test fgets_eagain fails on FreeBSD-amd64
+--
 Reporter:  cypherpunks |  Owner:
 Type:  defect  | Status:  closed
 Priority:  Medium  |  Milestone:  Tor:
|  0.3.1.x-final
Component:  Core Tor/Tor|Version:
 Severity:  Normal  | Resolution:  fixed
 Keywords:  freebsd, tor-03-unspecified-201612  |  Actual Points:
Parent ID:  | Points:
 Reviewer:  |Sponsor:
+--
Changes (by nickm):

 * status:  needs_review => closed
 * resolution:   => fixed


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #20988 [Core Tor/Tor]: Test fgets_eagain fails on FreeBSD-amd64

2017-03-06 Thread Tor Bug Tracker & Wiki
#20988: Test fgets_eagain fails on FreeBSD-amd64
+--
 Reporter:  cypherpunks |  Owner:
 Type:  defect  | Status:
|  needs_review
 Priority:  Medium  |  Milestone:  Tor:
|  0.3.1.x-final
Component:  Core Tor/Tor|Version:
 Severity:  Normal  | Resolution:
 Keywords:  freebsd, tor-03-unspecified-201612  |  Actual Points:
Parent ID:  | Points:
 Reviewer:  |Sponsor:
+--

Comment (by nickm):

 Merged this.  Added #21654 for a more elegant solution.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #20988 [Core Tor/Tor]: Test fgets_eagain fails on FreeBSD-amd64

2017-03-01 Thread Tor Bug Tracker & Wiki
#20988: Test fgets_eagain fails on FreeBSD-amd64
+--
 Reporter:  cypherpunks |  Owner:
 Type:  defect  | Status:
|  needs_review
 Priority:  Medium  |  Milestone:  Tor:
|  0.3.1.x-final
Component:  Core Tor/Tor|Version:
 Severity:  Normal  | Resolution:
 Keywords:  freebsd, tor-03-unspecified-201612  |  Actual Points:
Parent ID:  | Points:
 Reviewer:  |Sponsor:
+--
Changes (by ahf):

 * status:  needs_revision => needs_review


Comment:

 Ignore the third bullet in comment 8: Instead of clearing the error flag
 of the file handle we now reset the `errno` variable before we call
 `fgets(3)`.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #20988 [Core Tor/Tor]: Test fgets_eagain fails on FreeBSD-amd64

2017-03-01 Thread Tor Bug Tracker & Wiki
#20988: Test fgets_eagain fails on FreeBSD-amd64
+--
 Reporter:  cypherpunks |  Owner:
 Type:  defect  | Status:
|  needs_revision
 Priority:  Medium  |  Milestone:  Tor:
|  0.3.1.x-final
Component:  Core Tor/Tor|Version:
 Severity:  Normal  | Resolution:
 Keywords:  freebsd, tor-03-unspecified-201612  |  Actual Points:
Parent ID:  | Points:
 Reviewer:  |Sponsor:
+--
Changes (by ahf):

 * status:  needs_review => needs_revision


Comment:

 The `clearerr()` call is incorrect. Let me upload a revised version.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #20988 [Core Tor/Tor]: Test fgets_eagain fails on FreeBSD-amd64

2017-03-01 Thread Tor Bug Tracker & Wiki
#20988: Test fgets_eagain fails on FreeBSD-amd64
+--
 Reporter:  cypherpunks |  Owner:
 Type:  defect  | Status:
|  needs_review
 Priority:  Medium  |  Milestone:  Tor:
|  0.3.1.x-final
Component:  Core Tor/Tor|Version:
 Severity:  Normal  | Resolution:
 Keywords:  freebsd, tor-03-unspecified-201612  |  Actual Points:
Parent ID:  | Points:
 Reviewer:  |Sponsor:
+--
Changes (by ahf):

 * cc: ahf (added)
 * status:  needs_revision => needs_review


Comment:

 I've updated my branch with the following changes:

 - Fixed typos reported by OP. Thanks!
 - Added a changes file.
 - We now clear the error flag on the file handler in the case where
 `ferror(stream) && errno == EAGAIN` to prevent the situation where the
 caller receives an error return value and retries because of `errno` being
 `EAGAIN`, but continues to have the error flag set.

 I ran `make check` and tested it with "normal" browsing usage on OS X,
 HardenedBSD, and Linux.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #20988 [Core Tor/Tor]: Test fgets_eagain fails on FreeBSD-amd64

2017-02-28 Thread Tor Bug Tracker & Wiki
#20988: Test fgets_eagain fails on FreeBSD-amd64
+--
 Reporter:  cypherpunks |  Owner:
 Type:  defect  | Status:
|  needs_revision
 Priority:  Medium  |  Milestone:  Tor:
|  0.3.1.x-final
Component:  Core Tor/Tor|Version:
 Severity:  Normal  | Resolution:
 Keywords:  freebsd, tor-03-unspecified-201612  |  Actual Points:
Parent ID:  | Points:
 Reviewer:  |Sponsor:
+--
Changes (by nickm):

 * status:  needs_review => needs_revision


Comment:

 Looks good -- needs a changes file though?  Also, is this tested?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #20988 [Core Tor/Tor]: Test fgets_eagain fails on FreeBSD-amd64

2017-02-27 Thread Tor Bug Tracker & Wiki
#20988: Test fgets_eagain fails on FreeBSD-amd64
+--
 Reporter:  cypherpunks |  Owner:
 Type:  defect  | Status:
|  needs_review
 Priority:  Medium  |  Milestone:  Tor:
|  0.3.1.x-final
Component:  Core Tor/Tor|Version:
 Severity:  Normal  | Resolution:
 Keywords:  freebsd, tor-03-unspecified-201612  |  Actual Points:
Parent ID:  | Points:
 Reviewer:  |Sponsor:
+--

Comment (by cypherpunks):

 Replying to [comment:4 ahf]:
 > I've added a patch for this in
 https://gitlab.com/ahf/tor/commits/bugs/20988
 OP here. The changes look good but i haven't tested them. The inline patch
 fixes some small grammar nitpicks on commit
 [https://gitlab.com/ahf/tor/commit/49a4069d19877b24f00220fb41410445c804b463
 49a4069d19877b24f00220fb41410445c804b463].

 {{{
 diff --git a/src/common/compat.c b/src/common/compat.c
 index 771cc085d..753ad3f8f 100644
 --- a/src/common/compat.c
 +++ b/src/common/compat.c
 @@ -3480,7 +3480,7 @@ tor_getpass(const char *prompt, char *output, size_t
 buflen)
   * Upon successful completion, this function returns a pointer to the
 string
   * str. If EOF occurs before any characters are read the function
 will
   * return NULL and the content of str is unchanged. Upon error,
 the
 - * function return NULL and the caller must check for error using foef(3)
 and
 + * function returns NULL and the caller must check for error using
 foef(3) and
   * ferror(3).
   */
  char *
 @@ -3490,10 +3490,10 @@ tor_fgets(char *str, int size, FILE *stream)

ret = fgets(str, size, stream);

 -  /* FreeBSD, OpenBSD, Linux (glibc), and Linux (musl) seems to disagree
 about
 +  /* FreeBSD, OpenBSD, Linux (glibc), and Linux (musl) seem to disagree
 about
 * what to do in the given situation. We check if the stream has been
 flagged
 -   * with an error-bit and retur NULL in that situation if errno is also
 set to
 -   * EAGAIN.
 +   * with an error-bit and return NULL in that situation if errno is also
 set
 +   * to EAGAIN.
 */
if (ferror(stream) && errno == EAGAIN)
  return NULL;
 }}}

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #20988 [Core Tor/Tor]: Test fgets_eagain fails on FreeBSD-amd64

2017-02-27 Thread Tor Bug Tracker & Wiki
#20988: Test fgets_eagain fails on FreeBSD-amd64
+--
 Reporter:  cypherpunks |  Owner:
 Type:  defect  | Status:
|  needs_review
 Priority:  Medium  |  Milestone:  Tor:
|  0.3.1.x-final
Component:  Core Tor/Tor|Version:
 Severity:  Normal  | Resolution:
 Keywords:  freebsd, tor-03-unspecified-201612  |  Actual Points:
Parent ID:  | Points:
 Reviewer:  |Sponsor:
+--
Changes (by nickm):

 * keywords:  freebsd, tor-03-unspecified-201612, review-group-16 =>
 freebsd, tor-03-unspecified-201612
 * status:  new => needs_review
 * milestone:  Tor: unspecified => Tor: 0.3.1.x-final


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #20988 [Core Tor/Tor]: Test fgets_eagain fails on FreeBSD-amd64

2017-02-27 Thread Tor Bug Tracker & Wiki
#20988: Test fgets_eagain fails on FreeBSD-amd64
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  defect   | Status:  new
 Priority:  Medium   |  Milestone:  Tor:
 |  unspecified
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  freebsd, tor-03-unspecified-201612,  |  Actual Points:
  review-group-16|
Parent ID:   | Points:
 Reviewer:   |Sponsor:
-+-
Changes (by ahf):

 * keywords:  freebsd, tor-03-unspecified-201612 => freebsd,
 tor-03-unspecified-201612, review-group-16


Comment:

 I've added a patch for this in
 https://gitlab.com/ahf/tor/commits/bugs/20988

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #20988 [Core Tor/Tor]: Test fgets_eagain fails on FreeBSD-amd64

2017-02-08 Thread Tor Bug Tracker & Wiki
#20988: Test fgets_eagain fails on FreeBSD-amd64
+--
 Reporter:  cypherpunks |  Owner:
 Type:  defect  | Status:  new
 Priority:  Medium  |  Milestone:  Tor:
|  unspecified
Component:  Core Tor/Tor|Version:
 Severity:  Normal  | Resolution:
 Keywords:  freebsd, tor-03-unspecified-201612  |  Actual Points:
Parent ID:  | Points:
 Reviewer:  |Sponsor:
+--

Comment (by cypherpunks):

 Closed #21416 as a duplicate.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #20988 [Core Tor/Tor]: Test fgets_eagain fails on FreeBSD-amd64

2016-12-15 Thread Tor Bug Tracker & Wiki
#20988: Test fgets_eagain fails on FreeBSD-amd64
--+--
 Reporter:  cypherpunks   |  Owner:
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:  Tor: 0.3.???
Component:  Core Tor/Tor  |Version:
 Severity:  Normal| Resolution:
 Keywords:  freebsd   |  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+--
Changes (by nickm):

 * keywords:   => freebsd
 * milestone:   => Tor: 0.3.???


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

[tor-bugs] #20988 [Core Tor/Tor]: Test fgets_eagain fails on FreeBSD-amd64

2016-12-15 Thread Tor Bug Tracker & Wiki
#20988: Test fgets_eagain fails on FreeBSD-amd64
--+-
 Reporter:  cypherpunks   |  Owner:
 Type:  defect| Status:  new
 Priority:  Medium|  Milestone:
Component:  Core Tor/Tor  |Version:
 Severity:  Normal|   Keywords:
Actual Points:|  Parent ID:
   Points:|   Reviewer:
  Sponsor:|
--+-
 According to the [https://buildbot.pixelminers.net/builders BSD Buildbot]
 {{{
 util/fgets_eagain:
   FAIL src/test/test_util.c:3952: assert(retptr OP_EQ buf): 0x0 vs
 0x7fffe944
   [fgets_eagain FAILED]
 }}}

 This means that fgets returns a null pointer on partial lines instead of
 the buffer as expected.

 Previously this test was passing but started failing with
 [https://buildbot.pixelminers.net/builders/FreeBSD-amd64/builds/105 build
 #105]. Looking at the changes to libc it looks like this is caused by
 
[https://svnweb.freebsd.org/base/head/lib/libc/stdio/fgets.c?r1=305413=305412=305413
 revision 305413] (which was added earlier in the same month the test
 started failing).

 I'm unsure whether FreeBSD is right and other libc implementations are
 wrong or the other way around.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs