On Wednesday, February 26, 2020 at 3:51:54 PM UTC+1, Peter Kleiweg wrote:
>
> Op woensdag 26 februari 2020 13:05:40 UTC+1 schreef Manlio Perillo:
>>
>> On Wednesday, February 26, 2020 at 12:33:05 PM UTC+1, Peter Kleiweg wrote:
>>>
>>> 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().
>>>
>>
>> The errors are probably caused by https://golang.org/doc/go1.14#runtime.
>>
>> The solution is to update zmq4  to explicitly handle interrupted system 
>> calls.
>>
>
> Often the program freezes before I get an interrupted system call. It 
> hangs inside a ZeroMQ C++ library function.
> zmq4 is just a wrapper for ZeroMQ. I can't "fix" ZeroMQ to make it work 
> with Go.
>
> Is there a way to stop Go from interrupting my system calls? It happens 
> rather randomly all over the place.
>

https://stackoverflow.com/questions/36040547/zeromq-how-to-react-on-different-signal-types-on-eintr

ZeroMQ may return an EINTR error , but zmq4 does not list it in errors.go.
ZeroMQ asks the caller to handle EINTR, so zmq4 should handle it internally 
or return it to the caller.

https://golang.org/doc/go1.14#runtime should have mentioned that not only 
programs that use packages like syscall <https://golang.org/pkg/syscall/> 
or golang.org/x/sys/unix <https://godoc.org/golang.org/x/sys/unix> will see 
more slow system calls fail with EINTR errors, but also programs that use 
Cgo.


Manlio

-- 
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/e876fe34-651a-46f8-b891-9f84c340bf30%40googlegroups.com.

Reply via email to