我正在尝试帮助我想使用的应用程序的开发人员解决在 Linux 上使用 Corba Server 的问题。我将问题缩小到tnameserv
在调用后需要 3 多分钟才能准备好。
在这 3 分钟内到底tnameserv
想做什么,无论如何我可以加快速度吗?该应用程序失败,因为它尝试进行 5 次连接尝试,重试间隔为 1 秒;这显然没有给 tnameserv 足够的时间准备好。我在 Slackware 13.0 上使用 Java 6u17
以防万一。的实际调用tnameserv
如下:
tnameserv -ORBInitialPort 23423
在 shell 中运行该命令后,它似乎一直挂起,直到我终于看到它显示“就绪”时大约 3 分钟。
更新
我做了一个strace -f tnameserv -ORBInitialPort 23423
,我看到对 gettimeofday()、clock_gettime() 和 futex() 的调用很有效,后者总是返回 '-1 ETIMEDOUT(连接超时)。我觉得这与我的问题有关,但我不知道如何或为什么。
这是我从 strace 看到的一小部分。有人可以复制和/或理解这一点吗?
[pid 30950] futex(0x8128e14, FUTEX_WAIT_PRIVATE, 1, {0, 49903084}) = -1 ETIMEDOUT(连接超时) [pid 30950] futex(0x8098a28, FUTEX_WAKE_PRIVATE, 1) = 0 [pid 30950]clock_gettime(CLOCK_MONOTONIC, {329619, 995857482}) = 0 [pid 30950] gettimeofday({1260930158, 92108}, NULL) = 0 [pid 30950]clock_gettime(CLOCK_MONOTONIC, {329619, 995996617}) = 0 [pid 30950]clock_gettime(CLOCK_MONOTONIC, {329619, 996088536}) = 0 [pid 30950] gettimeofday({1260930158, 92328}, NULL) = 0 [pid 30950]clock_gettime(CLOCK_REALTIME, {1260930158, 92424295}) = 0 [pid 30950] futex(0x8128e14, FUTEX_WAIT_PRIVATE, 1, {0, 49903705}) = -1 ETIMEDOUT(连接超时) [pid 30950] futex(0x8098a28, FUTEX_WAKE_PRIVATE, 1) = 0 [pid 30950]clock_gettime(CLOCK_MONOTONIC, {329620, 46761098}) = 0 [pid 30950] gettimeofday({1260930158, 143084}, NULL) = 0 [pid 30950]clock_gettime(CLOCK_MONOTONIC, {329620, 46913924}) = 0 [pid 30950]clock_gettime(CLOCK_MONOTONIC, {329620, 47006961}) = 0 [pid 30950] gettimeofday({1260930158, 143303}, NULL) = 0 [pid 30950]clock_gettime(CLOCK_REALTIME, {1260930158, 143398317}) = 0 [pid 30950] futex(0x8128e14, FUTEX_WAIT_PRIVATE, 1, {0, 49904683}) = -1 ETIMEDOUT(连接超时) [pid 30950] futex(0x8098a28, FUTEX_WAKE_PRIVATE, 1) = 0 [pid 30950]clock_gettime(CLOCK_MONOTONIC, {329620, 97818379}) = 0 [pid 30950] gettimeofday({1260930158, 194127}, NULL) = 0 [pid 30950]clock_gettime(CLOCK_MONOTONIC, {329620, 97957235}) = 0 [pid 30950]clock_gettime(CLOCK_MONOTONIC, {329620, 98049154}) = 0 [pid 30950] gettimeofday({1260930158, 194346}, NULL) = 0 [pid 30950]clock_gettime(CLOCK_REALTIME, {1260930158, 194441349}) = 0 [pid 30950] futex(0x8128e14, FUTEX_WAIT_PRIVATE, 1, {0, 49904651}) = -1 ETIMEDOUT(连接超时) [pid 30950] futex(0x8098a28, FUTEX_WAKE_PRIVATE, 1) = 0 [pid 30950]clock_gettime(CLOCK_MONOTONIC, {329620, 148806370}) = 0 [pid 30950] gettimeofday({1260930158, 245055}, NULL) = 0 [pid 30950]clock_gettime(CLOCK_MONOTONIC, {329620, 148947182}) = 0 [pid 30950]clock_gettime(CLOCK_MONOTONIC, {329620, 148981547}) = 0 [pid 30950] gettimeofday({1260930158, 245280}, NULL) = 0 [pid 30950]clock_gettime(CLOCK_REALTIME, {1260930158, 245374859}) = 0 [pid 30950] futex(0x8128e14, FUTEX_WAIT_PRIVATE, 1, {0, 49905141}) = -1 ETIMEDOUT(连接超时)