Yea I was having the exactly same issue. It has disappeared magically. Maybe the logging code I added, created a little delay and thats why the lock conflicts disappeared. Try adding some delay before wr_lock around line 1500 in usbutils.c
#define DEVLOCK(cgpu, _pth_state) do { \
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &_pth_state); \
// add some delay here \
wr_lock(cgpu->usbinfo.devlock); \
} while (0)
I hardly get any good nonce if I clock it over 279. I have the exact same circuit as provided by BkkCoins. The only difference is that my capacitor is 33pF, instead of his 30pF.
I just changed the 220p capacitor to 30p and the circuit is also exactly the same as BBKCoins drew. Ktest still gives "GOOD" from 128M to 300M with correct return time.
However, cgminer's stuck more frequently. The WU at 128M goes down to 2.5/m, and WU at 256M goes down to 2/m.
It seems that this issue has a lot to do with the clock generation circuit. May be some results cannot be captured. I will test your method.
UPDATE:
Your method works!!!
I added
nmsleep(100); \
and everything works like a charm.
128M ~ 8/m WU
256M ~ 17/m WU
BBKCoins, please be noticed. This might be a common issue.