odd problem(s) with libthr and libkse
Christopher M. Sedore
cmsedore at maxwell.syr.edu
Sat Oct 11 06:45:19 PDT 2003
I have a multithreaded program that I've built to run under libc_r, libthr, and libkse. I use the libc_r build for debugging and the others for actual work (the program is disk/network io intensive and I want the disk io concurrency from thr or kse).
Anyway, here is the issue I'm seeing. It may be the same or a related problem for both, or may not be.
When running under libthr, everything works fine for an indeterminate period, usually between 10 seconds and 30 minutes. Eventually, all program function stops. If I watch in top, threads get stuck in "sigwai". First one, then a couple, then all.
When running under kse, the program pauses periodically. I have one thread that prints out a heartbeat once per second, and prints debug info. I get pauses of up to 5 seconds between my heartbeat:
8 per sec (40/5) - 3739 total, 6047 pce active
6 per sec (32/5) - 3722 total
7 per sec (38/5) - 3777 total, 6034 pce active
7 per sec (39/5) - 3761 total
accepted on 14
accepted on 15
4 per sec (20/5) - 3797 total, 6058 pce active
6 per sec (30/5) - 3791 total
(note skips from 1065864348 to 350, 351 to 353, 355 to 357)
When the pauses occur, network traffic dips to nearly nothing: Overall program performance with libkse is about 25-50% of what it is under libthr (when working) or ~30-60% of libc_r.
I have no problems when running under libc_r. Any suggestions to debug this?
I'm running 5.1-CURRENT-20030917-JPSNAP.
More information about the freebsd-threads