OoO En ce début d'après-midi nuageux du samedi 20 octobre 2007, vers
14:51, Jens Thiele <[EMAIL PROTECTED]> disait:
> Package: xrdp
> Version: 0.4.0~dfsg-3
> Severity: wishlist
> xrdp wakes up every 100000 usec. (10 times/s) if there is nothing to do.
> This is annoying if you run xrdp in a virtual machine.
> ltrace:
> usleep(100000)
> = <void>
> pthread_mutex_lock(0x805b1d0, 0xb7ea0a4c, 0xbf83fe48, 0x804b603, 0x805b1d0)
> = 0
> pthread_mutex_unlock(0x805b1d0, 0xb7ea0a4c, 0xbf83fe48, 0x804b632, 0x805b1d0)
> = 0
> pthread_mutex_lock(0x805b1b0, 0xb7ea0a4c, 0xbf83fe48, 0x804b694, 0x805b1b0)
> = 0
> pthread_mutex_unlock(0x805b1b0, 0xb7ea0a4c, 0xbf83fe48, 0x804b6a7, 0x805b1b0)
> = 0
> accept(3, 0xbf83fe34, 0xbf83fe44, 0, 0x805b008)
> = -1
> __errno_location()
> = 0xb7c7368c
> usleep(100000)
> = <void>
> pthread_mutex_lock(0x805b1d0, 0xb7ea0a4c, 0xbf83fe48, 0x804b603, 0x805b1d0)
> = 0
> pthread_mutex_unlock(0x805b1d0, 0xb7ea0a4c, 0xbf83fe48, 0x804b632, 0x805b1d0)
> = 0
> pthread_mutex_lock(0x805b1b0, 0xb7ea0a4c, 0xbf83fe48, 0x804b694, 0x805b1b0)
> = 0
> pthread_mutex_unlock(0x805b1b0, 0xb7ea0a4c, 0xbf83fe48, 0x804b6a7, 0x805b1b0)
> = 0
> accept(3, 0xbf83fe34, 0xbf83fe44, 0, 0x805b008)
> = -1
> __errno_location()
> = 0xb7c7368c
>> lsof -p 7875|grep 3u
> xrdp 7875 xrdp 3u IPv4 16827 TCP *:3389 (LISTEN)
> quick look at the code:
> maybe at xrdp_listen.c:211:
> error = g_tcp_accept(self->sck);
> if ((error == -1) && g_tcp_last_error_would_block(self->sck))
> {
> g_sleep(100);
> g_loop();
> }
I have changed 100 to 200 and ltrace shows that the value is doubled. So
you seem to have spotted the right point of wake-up. A bit of
investigation shows that g_loop() is used to dynamically load modules in
the main thread.
Jay, do you see a simple fix for this problem?
Thanks.
--
# Okay, what on Earth is this one supposed to be used for?
2.4.0 linux/drivers/char/cp437.uni