Open renukamanavalan opened 1 year ago
4.2.5 is 5 years old. You should probably try again with a more recent version.
Thanks gummif. I tried "apt update"; "sudo apt remove libzmq3-dev" and tried install "sudo apt-get install libzmq5-dev" Still I end up with 4.2.5 only.
How could I force upgrade to latest?
localadmin@remanava-dev-1:~/source/fork/Device-Health/first-cut/src/lib$ sudo apt list --installed | grep -i zmq
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libzmq3-dev/bionic-updates,bionic-security,now 4.2.5-1ubuntu0.2 amd64 [installed]
libzmq5/bionic-updates,bionic-security,now 4.2.5-1ubuntu0.2 amd64 [installed]
localadmin@remanava-dev-1:~/source/fork/Device-Health/first-cut/src/lib$ sudo apt remove libzmq3-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-azure-5.4-cloud-tools-5.4.0-1091 linux-azure-5.4-headers-5.4.0-1091 linux-azure-5.4-tools-5.4.0-1091
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
libzmq3-dev
0 upgraded, 0 newly installed, 1 to remove and 60 not upgraded.
After this operation, 2227 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 245924 files and directories currently installed.)
Removing libzmq3-dev:amd64 (4.2.5-1ubuntu0.2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
localadmin@remanava-dev-1:~/source/fork/Device-Health/first-cut/src/lib$ sudo apt-get install libzmq5-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libzmq3-dev' instead of 'libzmq5-dev'
The following packages were automatically installed and are no longer required:
linux-azure-5.4-cloud-tools-5.4.0-1091 linux-azure-5.4-headers-5.4.0-1091 linux-azure-5.4-tools-5.4.0-1091
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
libzmq3-dev
0 upgraded, 1 newly installed, 0 to remove and 60 not upgraded.
Need to get 400 kB of archives.
After this operation, 2227 kB of additional disk space will be used.
Get:1 http://azure.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 libzmq3-dev amd64 4.2.5-1ubuntu0.2 [400 kB]
Fetched 400 kB in 0s (17.8 MB/s)
Selecting previously unselected package libzmq3-dev:amd64.
(Reading database ... 245851 files and directories currently installed.)
Preparing to unpack .../libzmq3-dev_4.2.5-1ubuntu0.2_amd64.deb ...
Unpacking libzmq3-dev:amd64 (4.2.5-1ubuntu0.2) ...
Setting up libzmq3-dev:amd64 (4.2.5-1ubuntu0.2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
localadmin@remanava-dev-1:~/source/fork/Device-Health/first-cut/src/lib$ sudo apt list --installed | grep -i zmq
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libzmq3-dev/bionic-updates,bionic-security,now 4.2.5-1ubuntu0.2 amd64 [installed]
libzmq5/bionic-updates,bionic-security,now 4.2.5-1ubuntu0.2 amd64 [installed]
localadmin@remanava-dev-1:~/source/fork/Device-Health/first-cut/src/lib$
I guess build from source, use a package manager like conan or use docker with a new ubuntu are options.
[ Filed as issue #4487 in github zeromq/libzmq -- Extending to here too]
Issue description
Simple ZMQ model using ZMQ_CLIENT & ZMQ_SERVER fails with following assertion.
Assertion failed: socket_type >= 0 && socket_type < (int) names_count (src/mechanism.cpp:110)
Code is pretty simple. Invoke it in client / server mode. Server: Creates sock, binds and sleep for an hour before exiting Client: Creates sock, connect & sleep
The assertion happens while the main thread is sleeping.
BTW, I saw it working for a while, before failing consistently.
Environment
libzmq3-dev is already the newest version (4.2.5-1ubuntu0.2).
include
include
include
include
include
include
const char *zmq_path = "tcp://127.0.0.1:5555";
int main(int argc, char *argv) { int opt; int run_server = 0; void zmq_ctx = NULL; void *zmq_sck = NULL; char buf[10];
}
localadmin@remanava-dev-1:~/tools/zmq/c/client_server$ ./t -s Binding to server tcp://127.0.0.1:5555 Bound to server tcp://127.0.0.1:5555 Sleeping Assertion failed: socket_type >= 0 && socket_type < (int) names_count (src/mechanism.cpp:110) Aborted (core dumped) localadmin@remanava-dev-1:~/tools/zmq/c/client_server$
localadmin@remanava-dev-1:~/tools/zmq/c/client_server$ ./t connecting server tcp://127.0.0.1:5555 Connected to server tcp://127.0.0.1:5555 Sleeping Assertion failed: socket_type >= 0 && socket_type < (int) names_count (src/mechanism.cpp:110) Aborted (core dumped) localadmin@remanava-dev-1:~/tools/zmq/c/client_server$