From owner-freebsd-current@FreeBSD.ORG Tue May 13 08:42:51 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F3D5737B401 for ; Tue, 13 May 2003 08:42:50 -0700 (PDT) Received: from smtp.wp.pl (smtp.wp.pl [212.77.101.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id A273C43FBD for ; Tue, 13 May 2003 08:42:23 -0700 (PDT) (envelope-from creep2217@wp.pl) Received: (WP-SMTPD 20958 invoked from network); 13 May 2003 15:42:21 -0000 Received: from 183-mo3-1.acn.waw.pl ([62.121.104.183]) (envelope-sender ) by smtp.wp.pl (wp-smtpd) with SMTP for ; 13 May 2003 15:42:20 -0000 Received: by 183-mo3-1.acn.waw.pl (FreeLSD); Tue, 13 May 2003 17:42:25 +0200 Date: Tue, 13 May 2003 17:42:25 +0200 From: Creep To: freebsd-current@freebsd.org Message-ID: <20030513154225.GA684@mistress.home.astercity.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline User-Agent: Mutt/1.4.1i X-A-moze-by-tak-w-tym-roku-skoczyc-na-urlop-do-Szwecji: :) X-OS: FreeBSD X-AntiVirus: skaner antywirusowy poczty Wirtualnej Polski S. A. X-WP-ChangeAV: 0 Subject: 5.0-RELEASE-p7 boot's while debugging asm (!?!?) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: creep2217@wp.pl List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 15:42:51 -0000 Hello. I came upon a weird reboot in FreeBSD 5.0-RELEASE-p7 #0: Sun Apr 27 12:00:07 CEST 2003 i386 i have a small program: .text .global main main: movb $2, %al int $0x80 i do a gcc -o prog prog.S gcc (GCC) 3.2.1 [FreeBSD] 20021119 (release) GNU assembler 2.13.2 [FreeBSD] 2002-11-27 [both from FreeBSD] when i debug it with ald [ /usr/ports/devel/ald ] ... creep[/usr/ports/devel/ald]$ cat pkg-descr This is a port of ALD - the Assembly Language Debugger. It provides breakpoint debugging capabilities to those wishing to debug their assembly language programs. Currently, x86 platforms are supported. It was compiled on this release. .. as a normal user, I do ald ./prog break main run step step [here is the int $0x80 for a syscall] and poof. A reboot. when i compiled an almost GENERIC kernel ... creep[/sys/i386/conf]$ diff GENERIC OHBUGGER 25c25 < ident GENERIC --- > ident OHBUGGER 62,63c62,63 < #options DDB #Enable the kernel debugger < #options INVARIANTS #Enable calls of extra sanity checking --- > options DDB #Enable the kernel debugger > options INVARIANTS #Enable calls of extra sanity checking 65c65 < #options WITNESS #Enable checks to detect deadlocks and c ycles --- > options WITNESS #Enable checks to detect deadlocks and c ycles 142a143,146 > options SC_NORM_ATTR=(FG_WHITE|BG_BLACK) > options SC_NORM_REV_ATTR=(FG_BLACK|BG_LIGHTGREY) > options SC_KERNEL_CONS_ATTR=(FG_LIGHTRED|BG_BLACK) > options SC_HISTORY_SIZE=800 235a240,241 > device pcm ...and reproduce the event, it drops me to the DDB with this message: Stopped at sw1b+0xa9: movl %ecx,%fs:0 db> trace sw1b(2f,2f,2f,bfbffa54,bfbffa5c) at sw1b+0xa9 fork_trampoline() at fork_trampoline --- trap 0xa, eip = 0x80484a0, esp = 0xbfbffa2c, ebp = 0xbfbffa2c --- when i issue a 'cont' i the debugger continues and everything seems going normal, but on a system with debugging turned off This is my custom kernel: ---------------------------------------- machine i386 cpu I686_CPU ident NIGDY maxusers 0 options INET #InterNETworking options INET6 #IPv6 communications protocols options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support options UFS_ACL #Support for access control lists options UFS_DIRHASH #Improve performance on big directories options MD_ROOT #MD is a potential root device options NFSCLIENT #Network Filesystem Client options NFSSERVER #Network Filesystem Server options EXT2FS options MSDOSFS #MSDOS Filesystem options CD9660 #ISO 9660 Filesystem options PROCFS #Process filesystem (requires PSEUDOFS) options PSEUDOFS #Pseudo-filesystem framework options NULLFS options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] options COMPAT_FREEBSD4 #Compatible with FreeBSD4 options SCSI_DELAY=0 #Delay (in ms) before probing SCSI options KTRACE #ktrace(1) support options SYSVSHM #SYSV-style shared memory options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev options IPFIREWALL options IPFIREWALL_DEFAULT_TO_ACCEPT options IPV6FIREWALL #firewall for IPv6 options IPV6FIREWALL_DEFAULT_TO_ACCEPT device isa device pci device smbus # Bus support, required for smb below. device intpm # power menage device iicbus device iicbb device smb device fdc device ata device atadisk # ATA disk drives device atapicd # ATAPI CDROM drives device atapifd # ATAPI floppy drives device atapist # ATAPI tape drives options ATA_STATIC_ID #Static device numbering device atkbdc # AT keyboard controller device atkbd # AT keyboard device psm # PS/2 mouse device vga # VGA video card driver device splash # Splash screen and screen saver support device sc options SC_NORM_ATTR=(FG_WHITE|BG_BLACK) options SC_NORM_REV_ATTR=(FG_BLACK|BG_LIGHTGREY) options SC_KERNEL_CONS_ATTR=(FG_LIGHTRED|BG_BLACK) options SC_HISTORY_SIZE=800 device agp # support several AGP chipsets device npx device apm hint.apm.0.flags="0x20" device pmtimer device sio # 8250, 16[45]50 based serial ports device ppc device ppbus # Parallel port bus (required) device lpt # Printer device plip # TCP/IP over parallel device ppi # Parallel port interface device device miibus # MII bus support device rl # RealTek 8129/8139 device random # Entropy device device loop # Network loopback device ether # Ethernet support device sl # Kernel SLIP device ppp # Kernel PPP device tun # Packet tunnel. device pty # Pseudo-ttys (telnet etc) device md # Memory "disks" device gif # IPv6 and IPv4 tunneling device faith # IPv6-to-IPv4 relaying (translation) device snp device bpf # Berkeley packet filter device pcm device uhci # UHCI PCI->USB interface device ohci # OHCI PCI->USB interface device usb # USB Bus (required) device ugen # Generic device uhid # "Human Interface Devices" device ukbd # Keyboard device ulpt # Printer ------------------------------------- The dmesg output is as follows: Copyright (c) 1992-2003 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.0-RELEASE-p7 #0: Sun Apr 27 12:00:07 CEST 2003 root@mistress:/usr/src/sys/i386/compile/NIGDY Preloaded elf kernel "/boot/kernel/kernel" at 0xc0611000. Preloaded elf module "/boot/kernel/linux.ko" at 0xc06110a8. Preloaded elf module "/boot/kernel/nvidia.ko" at 0xc0611154. Timecounter "i8254" frequency 1193182 Hz CPU: Pentium III/Pentium III Xeon/Celeron (601.37-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x683 Stepping = 3 Features=0x383f9ff real memory = 134217728 (128 MB) avail memory = 123813888 (118 MB) Initializing GEOMetry subsystem Pentium Pro MTRR support enabled npx0: on motherboard npx0: INT 16 interface Using $PIR table, 9 entries at 0xc00fde70 apm0: on motherboard apm0: found APM BIOS v1.2, connected at v1.2 pcib0: at pcibus 0 on motherboard pci0: on pcib0 agp0: mem 0xd8000000-0xdbffffff at device 0.0 on pci0 pcib1: at device 1.0 on pci0 pci1: on pcib1 nvidia0: mem 0xd0000000-0xd7ffffff,0xdc000000-0xdcffffff irq 10 at device 0.0 on pci1 isab0: at device 7.0 on pci0 isa0: on isab0 atapci0: port 0xf000-0xf00f at device 7.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata1: at 0x170 irq 15 on atapci0 uhci0: port 0xc000-0xc01f irq 9 at device 7.2 on pci0 usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered ugen0: OmniVision OV511+ Camera, rev 1.00/1.00, addr 2 ulpt0: Hewlett-Packard DeskJet 840C, rev 1.00/1.00, addr 3, iclass 7/1 ulpt0: using bi-directional mode intpm0: port 0x5000-0x500f irq 9 at device 7.3 on pci0 intpm0: I/O mapped 5000 intpm0: intr IRQ 9 enabled revision 0 smbus0: on intsmb0 smb0: on smbus0 intpm0: PM I/O mapped 4000 pci0: at device 11.0 (no driver attached) rl0: port 0xc400-0xc4ff mem 0xdf010000-0xdf0100ff irq 11 at device 13.0 on pci0 rl0: Realtek 8139B detected. Warning, this may be unstable in autoselect mode rl0: Ethernet address: 00:02:44:29:5e:d3 miibus0: on rl0 rlphy0: on miibus0 rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto pcm0: port 0xc800-0xc81f irq 5 at device 15.0 on pci0 atapci1: port 0xe000-0xe0ff,0xdc00-0xdc03,0xd800-0xd807,0xd400-0xd403,0xd000-0xd007 irq 11 at device 19.0 on pci0 ata2: at 0xd000 on atapci1 ata3: at 0xd800 on atapci1 orm0: