Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test hanging #24

Open
kgasperich opened this issue Nov 7, 2022 · 0 comments
Open

test hanging #24

kgasperich opened this issue Nov 7, 2022 · 0 comments

Comments

@kgasperich
Copy link

kgasperich commented Nov 7, 2022

I've been running into an issue lately where the hw{client,server}_msg called from test_build.sh are hanging.
I can see from the output of netstat that there is already some process listening at localhost:5555.

I'm not very familiar with the details of zmq/f77zmq, so I'm not sure what the best solution would be (or even whether I've diagnosed the problem correctly).

I thought maybe I could check to see whether the requested address is in use and then use another one if it's not available (maybe just increment by 1 until an open one is found, and then dump that address to a text file somewhere to be read by hwclient_msg), but I'm not sure I'm using the f77_zmq/zmq interface correctly.

It looks like zmq_bind should return nonzero if the requested address is already in use, so tried to catch those cases.
I added variables integer errno and character*(64) strerr, and then after each function that should return 0 if things are working,
I added something like:

if (rc /= 0) then
  errno = f77_zmq_errno()
  strerr = f77_zmq_strerror(errno)
  print*,'errno = ',errno
  print*,'strerr - ',strerr
  print*, 'f77_zmq_bind failed'
endif

What I see now is that f77_zmq_recv is returning nonzero, but the strerror is printed as @, so I think I've done something incorrectly there (the errno is 11).
The second f77_zmq_bind is also returning nonzero (with errno = 98 and strerr = @$)

Are you familiar with the zmq_strerror interface? I think if I can figure out how to use that correctly it would help in coming up with a solution.

I'm using v4.3.2 of f77_zmq (from qp2-dependencies), so it's not quite the latest version, but I don't see any changes since then that look like they would affect this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant