Date: Mon, 14 Feb 2005 12:12:18 +1030 From: Greg 'groggy' Lehey <grog@FreeBSD.org> To: FreeBSD current users <FreeBSD-current@FreeBSD.ORG> Subject: Race condition in debugger? Message-ID: <20050214014217.GB85932@wantadilla.lemis.com>
next in thread | raw e-mail | index | archive | help
--dTy3Mrz/UPE2dbVg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I'm having some problems with userland gdb on recent -CURRENT builds: at some point it hangs. Specifically, I'm setting a conditional breakpoint like this: b Minsert_blockletpointer if I->inode_num == 0x1f0bb inode_num increments for 1, so I hit this breakpoint about 100,000 times. Or I should. What happens is that the debugger hangs at some point on the way. ktrace shows multiple copies of: 12325 gdb CALL ptrace(12,0x3026,0xbfbfd5e0,0) 12325 gdb RET ptrace 0 12325 gdb CALL ptrace(PT_STEP,0x3026,0x1,0) 12325 gdb RET ptrace 0 12325 gdb CALL wait4(0xffffffff,0xbfbfd808,0,0) <-- stops here 12325 gdb RET wait4 12326/0x3026 12325 gdb CALL kill(0x3026,0) 12325 gdb RET kill 0 12325 gdb CALL ptrace(PT_GETREGS,0x3026,0xbfbfd5c0,0) When it hangs, it's at the call to wait4, as shown. It looks like the completion of the ptrace request isn't being reported back. This is a 4 way SMP box (Pentium II, FWIW). I've tried disabling SMP: # sysctl -w machdep.hlt_cpus=14 machdep.hlt_cpus: 0 -> 14 After that, it seems to work, but it's taking a while on this slow old box. Does anybody have any ideas or suggestions? I can't swear that things like this have ever worked for me, but they certainly don't on this morning's kernel, and they didn't on the previous one, done in mid-December last year. Greg -- See complete headers for address and phone numbers. --dTy3Mrz/UPE2dbVg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFCEAH5IubykFB6QiMRAo3uAJ48DX6nr0BY2C2LV7VNPp/3XK1I1QCgjzMd DPwG1rinTNqCCXaoKoWNVu0= =A6Gn -----END PGP SIGNATURE----- --dTy3Mrz/UPE2dbVg--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050214014217.GB85932>