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

Invalid argument (session_base.cpp:490) #16

Closed
a5-pickle opened this issue Jul 16, 2014 · 6 comments
Closed

Invalid argument (session_base.cpp:490) #16

a5-pickle opened this issue Jul 16, 2014 · 6 comments

Comments

@a5-pickle
Copy link

Hi. I'm trying to write a simple client listening to an epgm channel. But when I execute the code, I get the following error:

Invalid argument (session_base.cpp:490)
signal: aborted (core dumped)

When I add the line:

msg, _ := socket.Recv(0)

Am I establishing the context and socket correctly? Any ideas on how I can begin debugging this?

Here is my code:

package main

import (
    "fmt"
    zmq "github.com/pebbe/zmq3"
)

func main() {
    context, _ := zmq.NewContext()
    socket, _ := context.NewSocket(zmq.SUB)

    err := socket.Connect("epgm://address")
    if err != nil {
        panic(err.Error())
    }
    socket.SetSubscribe("")

    msg, _ := socket.Recv(0)

    fmt.Println(msg)

    socket.Close()
    context.Term()
}

Thanks for reading.
Karl

@pebbe
Copy link
Owner

pebbe commented Jul 16, 2014

I can't reproduce this. I get "protocol not supported". What version of ZeroMQ are you using?

@a5-pickle
Copy link
Author

I'm using 3.2.4. But to resolve the protocol not supported error, you need to install zeromq after running:

./configure --with-pgm=libpgm-5.1.118~dfsg

What that does is point the install script to a tar file in foreign/openpgm in your source folder (5.1.118 is what is included with the 3.2.4 distribution).

When I have time today I'm going to try to reproduce this error with zeromq version 4.0.4 using your zmq4 library.

@pebbe
Copy link
Owner

pebbe commented Jul 16, 2014

I compiled with --with-pgm, and now I get panic: invalid argument

@a5-pickle
Copy link
Author

Ah, that's because you need to put in a valid address (for example: epgm://eth0;224.0.0.1:5555)

@pebbe
Copy link
Owner

pebbe commented Jul 16, 2014

Now the program just hangs

@a5-pickle
Copy link
Author

Hey. So I tried to do some research on the issue... it seems like a libzmq bug for epgm channels. I installed zeromq version 4.0.4 and I got the following fault:

Invalid argument (session_base.cpp:538)
signal: aborted (core dumped)

Searching for this error online led me to this: zeromq/libzmq#784

It's been an issue since end of 2013... not sure if it's actually being looked into. I think it's fine to close this issue as it's not related to any of the stuff you built. Thanks for looking into it.

@pebbe pebbe closed this as completed Jul 18, 2014
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

2 participants