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

Crash with "Invalid argument (session_base.cpp:538)" #784

Closed
sublee opened this issue Dec 9, 2013 · 8 comments
Closed

Crash with "Invalid argument (session_base.cpp:538)" #784

sublee opened this issue Dec 9, 2013 · 8 comments

Comments

@sublee
Copy link

sublee commented Dec 9, 2013

I'm using libzmq-4.0.3 and "epgm://127.0.0.1;224.0.0.0:11042" as a ØMQ socket address. Yes, I know that localhost is not a good address to use PGM. Anyway, the application runs well for a few minutes but it crashes with the assertion failure soon:

Invalid argument (session_base.cpp:538)
Aborted (core dumped)
@hurtonm
Copy link
Member

hurtonm commented Dec 9, 2013

Thanks for the report. Going to look into this one.

@sublee
Copy link
Author

sublee commented Dec 9, 2013

Thanks!

@a5-pickle
Copy link

Hi. I've written a simple program in go that will produce this fault every time. Here is the code:

package main

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

func main() {
    context, _ := zmq.NewContext()
    socket, err := context.NewSocket(zmq.SUB)
    if err != nil {
        panic(err.Error())
    }   
    defer socket.Close()

    socket.Connect("epgm://10.1.22.101;239.20.20.101:40200")
    socket.SetSubscribe("")
    for {
        msg, _ := socket.Recv(0)
        fmt.Println(msg)
    }   

}

My python scripts that subscribe to the same channel do not produce this error. Not sure where to look... If needed, I can provide core files. Thanks.

@sigiesec
Copy link
Member

sigiesec commented Aug 23, 2017

The line causing the failing assertion is https://github.com/zeromq/zeromq4-x/blob/8b9a82476b196a200b9698c9345ae8ba50cccb1c/src/session_base.cpp#L538, corresponding to

errno_assert (rc == 0);
in the current master

Since pgm_socket_t::init was not changed much in the last 7 years, except for #544, the issue probably still exists.

@bjovke
Copy link
Contributor

bjovke commented Aug 28, 2017

@sigiesec @sublee Hm, how are we going to test this, test program is in "Go"? Can anyone convert this to C++?

@sigiesec
Copy link
Member

@bjovke I already started converting this to a C++ test case.

@bjovke
Copy link
Contributor

bjovke commented Aug 28, 2017

@sigiesec :)

@stale
Copy link

stale bot commented Nov 4, 2018

This issue has been automatically marked as stale because it has not had activity for 365 days. It will be closed if no further activity occurs within 56 days. Thank you for your contributions.

@stale stale bot added the stale label Nov 4, 2018
@stale stale bot closed this as completed Dec 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants