Hello, I have some problems with Xenomai 3.1rc2, the following function will often block after printing "b". This does not happen always and never happens when I run the program through gdb, and I can't attach with gdb if its blocked. Using another port then -1 makes no difference, and there is a single XDDP connection active at the time (on port #0), but this should be the first and only IDDP socket open.
static int s_bindRtIpcEndpoint(int protocol, czstring pLabel, const int *pArgs, int *pErrno) { int ret; int __attribute__((cleanup(auto_closesocket_rt))) fd = __RT(socket)(AF_RTIPC, SOCK_DGRAM, protocol); TEST_LOG_ERRNO_ERROR_M_SCOPE(fd < 0, *pErrno, "socket", -1); printf("a\n"); if (protocol == IPCPROTO_BUFP) { size_t bufsz = 32768; /* bytes */ if (pArgs) bufsz = *pArgs; ret = setsockopt(fd, SOL_BUFP, BUFP_BUFSZ, &bufsz, sizeof(bufsz)); TEST_LOG_ERRNO_ERROR_M_SCOPE(ret != 0, *pErrno, "setsockopt", -1); } if (pLabel) setLabel(fd, protocol, pLabel); printf("b\n"); // bind first endpoint struct sockaddr_ipc saddr = {AF_RTIPC, -1}; ret = __RT(bind)(fd, (struct sockaddr *)&saddr, sizeof(saddr)); printf("c\n"); TEST_LOG_ERRNO_ERROR_M_SCOPE(ret != 0, *pErrno, "bind", -1); ret = fd; fd = -1; // NOLINT(clang-analyzer-deadcode.DeadStores) return ret; } The function is called like this: int tmp; s_bindRtIpcEndpoint(IPCPROTO_IDDP, NULL, NULL, &tmp); I really don't know how to tackle this, any hints? Mit besten Grüßen / Kind regards NORBERT LANGE AT-RD3 ANDRITZ HYDRO GmbH Eibesbrunnergasse 20 1120 Vienna / AUSTRIA p: +43 50805 56684 norbert.la...@andritz.com andritz.com ________________________________ This message and any attachments are solely for the use of the intended recipients. They may contain privileged and/or confidential information or other information protected from disclosure. If you are not an intended recipient, you are hereby notified that you received this email in error and that any review, dissemination, distribution or copying of this email and any attachment is strictly prohibited. If you have received this email in error, please contact the sender and delete the message and any attachment from your system. ANDRITZ HYDRO GmbH Rechtsform/ Legal form: Gesellschaft mit beschränkter Haftung / Corporation Firmensitz/ Registered seat: Wien Firmenbuchgericht/ Court of registry: Handelsgericht Wien Firmenbuchnummer/ Company registration: FN 61833 g DVR: 0605077 UID-Nr.: ATU14756806 Thank You ________________________________