RE: Using serial console to debug system hangs ...
On 04-Mar-01 The Hermit Hacker wrote: On Sat, 3 Mar 2001, John Baldwin wrote: On 04-Mar-01 The Hermit Hacker wrote: Wow, that was painful ... after 2 hrs, I got as far as: Yeah, it spews out a lot of crap. :-/ You prolly want to use a 115200 serial console if at all possible. Should've mentioned that earlier.. Okay, reading NOTES, it says that 9600 is the default ... does that mean I should be able to attach at 115200 and it should auto-upgrade, or do I have to recompile kernel iwth CONSPEED=115200 for this? Either recompile or use the loader tunable 'machdep.conspeed' I think. However, you'll probably want the bootstrap to work on teh serial console as well, in which case you need to set the speed in make.conf (see /etc/defaults/make.conf) and recompile and reinstall boot2 and the loader. -- John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
RE: Using serial console to debug system hangs ...
On Sun, 4 Mar 2001, John Baldwin wrote: On 04-Mar-01 The Hermit Hacker wrote: On Sat, 3 Mar 2001, John Baldwin wrote: On 04-Mar-01 The Hermit Hacker wrote: Wow, that was painful ... after 2 hrs, I got as far as: Yeah, it spews out a lot of crap. :-/ You prolly want to use a 115200 serial console if at all possible. Should've mentioned that earlier.. Okay, reading NOTES, it says that 9600 is the default ... does that mean I should be able to attach at 115200 and it should auto-upgrade, or do I have to recompile kernel iwth CONSPEED=115200 for this? Either recompile or use the loader tunable 'machdep.conspeed' I think. However, you'll probably want the bootstrap to work on teh serial console as well, in which case you need to set the speed in make.conf (see /etc/defaults/make.conf) and recompile and reinstall boot2 and the loader. Okay, now you are going beyond my experiences :( First, I changed CONSPEED to 115200, but sysctl is still registering 9600: thelab# sysctl machdep.conspeed machdep.conspeed: 9600 manually doing 'sysctl -w machdep.conspeed=115200' appears to work though ... But, after modifying my make.conf, what do I have to recompile? Are we just talking a rebuild and install of the kernel itself? I'm going to try that ... To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
RE: Using serial console to debug system hangs ...
At 01:48 PM 3/4/2001 -0400, The Hermit Hacker wrote: On Sun, 4 Mar 2001, John Baldwin wrote: On 04-Mar-01 The Hermit Hacker wrote: On Sat, 3 Mar 2001, John Baldwin wrote: On 04-Mar-01 The Hermit Hacker wrote: Wow, that was painful ... after 2 hrs, I got as far as: Yeah, it spews out a lot of crap. :-/ You prolly want to use a 115200 serial console if at all possible. Should've mentioned that earlier.. Okay, reading NOTES, it says that 9600 is the default ... does that mean I should be able to attach at 115200 and it should auto-upgrade, or do I have to recompile kernel iwth CONSPEED=115200 for this? Either recompile or use the loader tunable 'machdep.conspeed' I think. However, you'll probably want the bootstrap to work on teh serial console as well, in which case you need to set the speed in make.conf (see /etc/defaults/make.conf) and recompile and reinstall boot2 and the loader. Okay, now you are going beyond my experiences :( First, I changed CONSPEED to 115200, but sysctl is still registering 9600: thelab# sysctl machdep.conspeed machdep.conspeed: 9600 manually doing 'sysctl -w machdep.conspeed=115200' appears to work though ... But, after modifying my make.conf, what do I have to recompile? Are we just talking a rebuild and install of the kernel itself? I'm going to try that ... To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message You have to recompile the boot stuff also, after changing the line in make.conf: # The default serial console speed is 9600. Set the speed to a larger value # for better interactive response. # BOOT_COMCONSOLE_SPEED= 57600 Then cd /sys/boot ; make depend all install. I forget if you then need to relabel the disk or not. ie : disklabel -B da0 == || [EMAIL PROTECTED] || || Ph. (415) 681-6235 || == To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
RE: Using serial console to debug system hangs ...
On Sun, 4 Mar 2001, Manfred Antar wrote: You have to recompile the boot stuff also, after changing the line in make.conf: # The default serial console speed is 9600. Set the speed to a larger value # for better interactive response. # BOOT_COMCONSOLE_SPEED= 57600 Then cd /sys/boot ; make depend all install. I forget if you then need to relabel the disk or not. ie : disklabel -B da0 this worked great, thanks ...disklabel wasn't required, it appears ... To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
RE: Using serial console to debug system hangs ...
On Sat, 3 Mar 2001, John Baldwin wrote: On 04-Mar-01 The Hermit Hacker wrote: Wow, that was painful ... after 2 hrs, I got as far as: Yeah, it spews out a lot of crap. :-/ You prolly want to use a 115200 serial console if at all possible. Should've mentioned that earlier.. Okay, I'm up to 115200, still a lot of crap ;) Any lower mask I can set things at to get enough info, without so much flowing up the screen? I can understand why she's so unresponsive, just wondering if there is a way of reducing the amount of debugging without losing too much ... To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
RE: Using serial console to debug system hangs ...
On 04-Mar-01 The Hermit Hacker wrote: On Sun, 4 Mar 2001, Manfred Antar wrote: You have to recompile the boot stuff also, after changing the line in make.conf: # The default serial console speed is 9600. Set the speed to a larger value # for better interactive response. # BOOT_COMCONSOLE_SPEED= 57600 Then cd /sys/boot ; make depend all install. I forget if you then need to relabel the disk or not. ie : disklabel -B da0 this worked great, thanks ...disklabel wasn't required, it appears ... It is to update boot2. However, you don't have to do that if you don't want. You can just boot on a normal console then break into the loader and type 'set console=comconsole' to switch over to the serial console. -- John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
RE: Using serial console to debug system hangs ...
On 04-Mar-01 The Hermit Hacker wrote: On Sat, 3 Mar 2001, John Baldwin wrote: On 04-Mar-01 The Hermit Hacker wrote: Wow, that was painful ... after 2 hrs, I got as far as: Yeah, it spews out a lot of crap. :-/ You prolly want to use a 115200 serial console if at all possible. Should've mentioned that earlier.. Okay, I'm up to 115200, still a lot of crap ;) Any lower mask I can set things at to get enough info, without so much flowing up the screen? I can understand why she's so unresponsive, just wondering if there is a way of reducing the amount of debugging without losing too much ... Well. Currnetly what 0x1200 logs is KTR_PROC and KTR_INTR, so it logs all incoming threaded interrupts as well as context switches, etc. If the machine hagns, it is very helpful to know if a) we are still getting interrupts at all (such as clock interrupts, which I can tell beecause the softclock swi thread get scheduled to execute.) and b) what processes were doing what when the machien hung. -- John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Using serial console to debug system hangs ...
In message [EMAIL PROTECTED] Manfred Antar writes: : Then cd /sys/boot ; make depend all install. : I forget if you then need to relabel the disk or not. : ie : : disklabel -B da0 I've noticed in the past that FreeBSD uss the com speed of the boot blocks. Warner To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: Using serial console to debug system hangs ...
At 05:49 PM 3/4/2001 -0700, Warner Losh wrote: In message [EMAIL PROTECTED] Manfred Antar writes: : Then cd /sys/boot ; make depend all install. : I forget if you then need to relabel the disk or not. : ie : : disklabel -B da0 I've noticed in the past that FreeBSD uss the com speed of the boot blocks. Warner Yes I thought so. There is a web page some where that tell's exactly how to set this up. I just found it: http://www.freebsd.org:80/handbook/serialconsole-setup.html Manfred == || [EMAIL PROTECTED] || || Ph. (415) 681-6235 || == To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
RE: Using serial console to debug system hangs ...
On 04-Mar-01 The Hermit Hacker wrote: Well, after some hurdles with getting the serial console to work, I've now go it to work ... I put the two sysctl commands into a file so that I could run it as a script: #!/bin/sh sysctl -w debug.ktr.mask=0x1208 sysctl -w debug.ktr.verbose=2 When I 'try' to run it, I get all the 'KTR'(?) messages on my serial console, something is changing/happening so fast that my ssh connection into the machine hangs before I finish typing in the shell script: enable_kernel_debug: 3 lines, 72 characters. thelab# !./ Put the sysctl's and the command that hangs the machine into one script and run that one shell script.. needless to say, running the command to hang the computer is proving difficult :) Then again, if I do a cold boot of the machine, the messages stop scrolling up the console, but a cut-n-paste of them is sort of illegible: k0clo.c/k...c/.k4e3r8n /RkEeLr n(_scplionc)k .scch2e0d9 lRoEcLk (s[p0xicn0) 32c1al1l8o0]ut r[=00x ca0t 31.d./8.2.0/] ker=r0n/ akte r.n._c/l.o./ckk.ecrn:4/k3e8r e_cpluo1c k..c/:.2.0/9k rcnp/uk0e r.n./.l.o/ckke.rcn./3k5e0r nG_OcTl o(cskp.icn.)2 0s3c hGeOdT l(oscpki n[)0 xccall2o1u1t8 0[]0 xrc=003 1adt8 2.0.]/ ..0/k aertn ./.k/er..n_/ckllorcnk/.kecr:n35_0c .ok.uc1: 2.0.3/ .c/pkue0r.n/.k/.er./n_kcelrnoc/kke.crn.4_c38l ocRkEL. c(.s2p09in )R ELs ch(sepd iln)oc kc al[0loxuct03 [210x18c003] 1rd=802 0a] t r=..0/ a..t /.k.er/.n./.ckerenrn_c/lkoerckn_.ccl:4oc3k8 :20u91 .c.p/u.0. /.k.e/r.n.//kkeerrnn_/ckleorcnk_.ccl.o3c5k0. cG.O2T0 3( sGpOiTn )( sspcihne)d claolclko u[t0 x[c00x3213118d08]2 0r]= 0r =a0t a.t. ///.k.e/0ke/rkne/rkne_rcnl_occlko.cck:.3c5:02 p3c uc1p u.0. ///.k.e/rkne/rkne/rkne_rcnl_occlko.cck..4c3.82 RE LR E(Ls p(isnp)i ns)c hceadl lloouctk [[00xxcc003312d1812800]] rr==00 aatt ////kkeerrnn//kkeerrnn__cclloocckk..cc::24398 ccppuu01 ////kkeerrnn//kkeerrnn__cclloocckk..cc..230530 GGOOTT ((ssppiinn)) csaclhleodu tl o[c0kx c[003x1cd0832201]1 8r0=]0 ra=t0 .a.t Hmm, it's colliding with itself a lot. Unfortunately, to make this useful over the serial console, you need to shut up all the sio lock messages. Hmmm, well for now try just using a 'debug.ktr.mask' of 0x1200 to skip all the mutex operations. If we need them later on, then I will try and get some other work done to make it easier to shut up certain mutexes in the log output without having to change each individual mutex operation. -- John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
RE: Using serial console to debug system hangs ...
Wow, that was painful ... after 2 hrs, I got as far as: thelab# ./enable_debug debug.ktr.mask: 1 - 4608 debug.ktr.verbose: 0 - 2 waiting for X server to begin accepting connections . XFree86 Version 4.0.2 / X Window System (protocol Version 11, revision 0, vendor release 6400) Release Date: 18 December 2000 If the server is older than 6-12 months, or if your card is newer than the above date, look for a newer version before reporting problems. (See http://www.XFree86.Org/FAQ) Operating System: FreeBSD 5.0-CURRENT i386 [ELF] Module Loader present (==) Log file: "/var/log/XFree86.0.log", Time: Sat Mar 3 22:08:37 2001 (==) Using config file: "/root/XF86Config" Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (??) unknown. (==) ServerLayout "Simple Layout" (**) |--Screen "Screen 1" (0) (**) | |--Monitor "Samtron 95P" (**) | |--Device "TNT" (**) |--Input Device "Mouse1" (**) |--Input Device "Keyboard1" (**) XKB: rules: "xfree86" (**) XKB: model: "microsoft" (**) XKB: layout: "us" (**) FontPath set to "/usr/X11R6/lib/X11/fonts/local/,/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/:unscaled,/usr/X11R6/lib/X11/fonts/100dpi/:unscaled,/usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dpi/" (**) RgbPath set to "/usr/X11R6/lib/X11/rgb" (==) ModulePath set to "/usr/X11R6/lib/modules" (--) Using syscons driver with X support (version 2.0) and gave up ... am going to try again just before I go to bed tonight, hopefully its running (and hung) by the time I get up in the morning ;) On Sat, 3 Mar 2001, John Baldwin wrote: On 04-Mar-01 The Hermit Hacker wrote: Well, after some hurdles with getting the serial console to work, I've now go it to work ... I put the two sysctl commands into a file so that I could run it as a script: #!/bin/sh sysctl -w debug.ktr.mask=0x1208 sysctl -w debug.ktr.verbose=2 When I 'try' to run it, I get all the 'KTR'(?) messages on my serial console, something is changing/happening so fast that my ssh connection into the machine hangs before I finish typing in the shell script: enable_kernel_debug: 3 lines, 72 characters. thelab# !./ Put the sysctl's and the command that hangs the machine into one script and run that one shell script.. needless to say, running the command to hang the computer is proving difficult :) Then again, if I do a cold boot of the machine, the messages stop scrolling up the console, but a cut-n-paste of them is sort of illegible: k0clo.c/k...c/.k4e3r8n /RkEeLr n(_scplionc)k .scch2e0d9 lRoEcLk (s[p0xicn0) 32c1al1l8o0]ut r[=00x ca0t 31.d./8.2.0/] ker=r0n/ akte r.n._c/l.o./ckk.ecrn:4/k3e8r e_cpluo1c k..c/:.2.0/9k rcnp/uk0e r.n./.l.o/ckke.rcn./3k5e0r nG_OcTl o(cskp.icn.)2 0s3c hGeOdT l(oscpki n[)0 xccall2o1u1t8 0[]0 xrc=003 1adt8 2.0.]/ ..0/k aertn ./.k/er..n_/ckllorcnk/.kecr:n35_0c .ok.uc1: 2.0.3/ .c/pkue0r.n/.k/.er./n_kcelrnoc/kke.crn.4_c38l ocRkEL. c(.s2p09in )R ELs ch(sepd iln)oc kc al[0loxuct03 [210x18c003] 1rd=802 0a] t r=..0/ a..t /.k.er/.n./.ckerenrn_c/lkoerckn_.ccl:4oc3k8 :20u91 .c.p/u.0. /.k.e/r.n.//kkeerrnn_/ckleorcnk_.ccl.o3c5k0. cG.O2T0 3( sGpOiTn )( sspcihne)d claolclko u[t0 x[c00x3213118d08]2 0r]= 0r =a0t a.t. ///.k.e/0ke/rkne/rkne_rcnl_occlko.cck:.3c5:02 p3c uc1p u.0. ///.k.e/rkne/rkne/rkne_rcnl_occlko.cck..4c3.82 RE LR E(Ls p(isnp)i ns)c hceadl lloouctk [[00xxcc003312d1812800]] rr==00 aatt ////kkeerrnn//kkeerrnn__cclloocckk..cc::24398 ccppuu01 ////kkeerrnn//kkeerrnn__cclloocckk..cc..230530 GGOOTT ((ssppiinn)) csaclhleodu tl o[c0kx c[003x1cd0832201]1 8r0=]0 ra=t0 .a.t Hmm, it's colliding with itself a lot. Unfortunately, to make this useful over the serial console, you need to shut up all the sio lock messages. Hmmm, well for now try just using a 'debug.ktr.mask' of 0x1200 to skip all the mutex operations. If we need them later on, then I will try and get some other work done to make it easier to shut up certain mutexes in the log output without having to change each individual mutex operation. -- John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy Systems Administrator @ hub.org primary: [EMAIL PROTECTED] secondary: scrappy@{freebsd|postgresql}.org To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message