On Fri, Feb 28, 2020 at 7:18 AM Peter Kleiweg <pklei...@xs4all.nl> wrote:
>
> Op vrijdag 28 februari 2020 16:13:50 UTC+1 schreef Robert Engels:
>>
>>
>> Can you clarify that a bit? Did you change the code to look for EINTR errors 
>> and then retry the system call?
>
>
> Yes, I did. But as an option that must be enabled by the user.

I don't understand why you're making it an option.  The README
suggests that you would not want to enable it if you want to handle
^C, but in Go the ^C will be delivered on a channel, presumably to a
separate goroutine.  At that point your program will either exit or do
some other operation.  If the program doesn't exit, then it's not
going to want the interrupted system call to fail.  It's going to want
it to be retried.

(As a minor side note, calls like getsockopt will never return EINTR,
it's not necessary to retry them.  But it doesn't hurt.)

Ian



>> -----Original Message-----
>> From: Peter Kleiweg
>> Sent: Feb 28, 2020 9:04 AM
>> To: golang-nuts
>> Subject: [go-nuts] Re: Lot's of test errors in package zmq4 with Go version 
>> 1.14, no errors with earlier versions
>>
>> Retry after EINTR solved the code lock-up too.
>>
>> Op woensdag 26 februari 2020 12:33:05 UTC+1 schreef Peter Kleiweg:
>>>
>>> With Go version 1.14 I get a lot of errors when I run:
>>>
>>>     go test -v github.com/pebbe/zmq4
>>>
>>> I didn't see this with Go 1.13.8 or any earlier version.
>>>
>>> Is this a problem with Go 1.14, or am I doing something wrong and just got 
>>> lucky until now?
>>>
>>> How do I debug this? The errors are different for each run. Below is a 
>>> sample of some errors.
>>> Line numbers are not always accurate, because I inserted some calls to 
>>> test.Log().
>>>
>>>     === RUN   TestSocketEvent
>>>         TestSocketEvent: socketevent_test.go:73: rep.Bind: interrupted 
>>> system call
>>>
>>>
>>>     === RUN   TestMultipleContexts
>>>         TestMultipleContexts: zmq4_test.go:131: sock1.Connect: interrupted 
>>> system call
>>>
>>>     freeze:
>>>     === RUN   TestMultipleContexts
>>>     ^CFAIL  github.com/pebbe/zmq4   30.226s
>>>
>>>     freeze:
>>>     === RUN   TestMultipleContexts
>>>         TestMultipleContexts: zmq4_test.go:148: sock1.RecvMessage: expected 
>>> <nil> [tcp://127.0.0.1:9997 tcp://127.0.0.1:9997], got interrupted system 
>>> call []
>>>     ^CFAIL  github.com/pebbe/zmq4   21.445s
>>>
>>>
>>>
>>>     freeze:
>>>     === RUN   TestSecurityCurve
>>>     ^CFAIL  github.com/pebbe/zmq4   31.143s
>>>
>>>
>>>
>>>     freeze:
>>>     === RUN   TestSecurityNull
>>>         TestSecurityNull: zmq4_test.go:1753: server.Recv 1: resource 
>>> temporarily unavailable
>>>     ^CFAIL  github.com/pebbe/zmq4   44.828s
>>>
>>>
>>>     === RUN   TestDisconnectInproc
>>>         TestDisconnectInproc: zmq4_test.go:523: Poll: interrupted system 
>>> call
>>>         TestDisconnectInproc: zmq4_test.go:623: isSubscribed
>>>
>>>     === RUN   TestHwm
>>>         TestHwm: zmq4_test.go:823: bind_socket.Bind: interrupted system call
>>>         TestHwm: zmq4_test.go:1044: test_inproc_bind_first(0, 0): expected 
>>> 10000, got -1
>>>
>>>     freeze:
>>>     === RUN   TestSecurityPlain
>>>     ^CFAIL  github.com/pebbe/zmq4   46.395s
>>>
>>>     === RUN   TestPairIpc
>>>         TestPairIpc: zmq4_test.go:1124: client.Send SNDMORE|DONTWAIT: 
>>> interrupted system call
>>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to golan...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/golang-nuts/f7eb247c-f772-4663-9d0b-5cb07c62e427%40googlegroups.com.
>>
>>
>>
>>
> --
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/7659417a-8b56-4a7d-9ae4-91878c7899e1%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcU95DHMD2N40DvcamKR5K%2BWEj%2BdMzh4RSF6ab%3DnMzzS-Q%40mail.gmail.com.

Reply via email to