Help troubleshooting openbsd 6.2 hang reddit / BSD ---------------------------------------------------------------------- 5ilver · 2018-01-18 18:48 I built a home router with an intel e1000 PCI ethernet card in a powermac g4 (quicksilver) running the macppc port of openbsd. Every few hours to few days the machine hangs with no errors on the console. It becomes completely unresponsive to active ssh sessions and keyboard input. I've tried removing some memory incase a stick was bad, a different ethernet card in the pci slot, removing the video card and a usb card that was installed, and I'm now relatively sure it's not a hardware issue as nothing has made a difference so far. Can anyone advise how I could catch the cause of a hang? ---------------------------------------------------------------------- piglit3 · 2018-01-18 19:45 Do you know how to enter ddb? When you get hangs, enter ddb, and print 'ps' (maybe with some argument) to see all processes. there is likely one in a different state than normal. being new you probably won't recognise which ones are unusual, but comparing to a non-hanging state should clarify things. Now that you know which ones are weird, get the backtrace of this problematic process. Very likely it's stuck in some kernel process. normally the state names are also written in the code so you can pinpoint the code that is hanging. You will likely need the help of someone who has kernel hacking experience with OpenBSD, or a lot of effort. If you want a better way to reproduce it, there's a good chance something like "cache a big file" or "use a lot of memory" will help. ---------------------------------------------------------------------- 5ilver · 2018-01-18 20:07 I don't have a way to enter ddb as the keyboard is unresponsive. I added ddb.panic=0 to /etc/sysctl.conf to cause the machine to reboot when it crashes, but that's not working. I don't think this is a kernel panic because of that. ---------------------------------------------------------------------- 5ilver · 2018-01-18 22:22 I set up a cronjob to dump uptime and a ping to an internal and external host into a file every minute and there is a gap in the file where a hang and reboot happened. Whatever is hanging is also killing cron. The gap is from 12:33 to 12:39 assumed from an uptime of 6 minutes reported at 12:45. 2:33AM up 2:11, 1 user, load averages: 0.06, 0.02, 0.00 PING 192.168.10.57 (192.168.10.57): 56 data bytes 64 bytes from 192.168.10.57: icmp_seq=0 ttl=64 time=1.009 ms --- 192.168.10.57 ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/std-dev = 1.009/1.009/1.009/0.000 ms PING 4.2.2.2 (4.2.2.2): 56 data bytes 64 bytes from 4.2.2.2: icmp_seq=0 ttl=55 time=20.842 ms --- 4.2.2.2 ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/std-dev = 20.842/20.842/20.842/0.000 ms 12:45AM up 6 mins, 0 users, load averages: 0.13, 0.11, 0.05 PING 192.168.10.57 (192.168.10.57): 56 data bytes 64 bytes from 192.168.10.57: icmp_seq=0 ttl=64 time=0.631 ms ---------------------------------------------------------------------- Nanosleep · 2018-01-19 04:50 You didn't mention this, so I figured I'd ask. Have you tried running Linux or OSX on the machine to confirm that the box will run for an extended period of time without hanging? To me, that seems like first troubleshooting step to eliminate the machine as a suspect and point the finger more at the platform. Also, I'm not a mac guy, but [AppleHardwareTest](https://github.com/upekkha/AppleHardwareTest) looks like it might be a good secondary option for testing hardware. ---------------------------------------------------------------------- 5ilver · 2018-01-19 06:45 It was running osx tiger and seemed stable enough for the years I've been using it. It was in storage off and on but always warm and dry. ---------------------------------------------------------------------- calrogman · 2018-01-20 02:55 I'd suggest setting ddb.console=1 and sending BREAK over a serial line but there's no guarantee it would work in this case, and it's a major pain in the ass if you don't already have all the necessary hardware. ---------------------------------------------------------------------- UninsuredGibran · 2018-01-20 04:40 As a stress test you can try to build the ports. But I suspect it's hanging when there is low activity. You could write a script to log as much information as possible every few seconds (vmstat, iostat, ps aux, etc.) and see if there is a pattern before hanging. Might not find anything, but a interesting hacking project anyway ;) ---------------------------------------------------------------------- Testnewbie · 2018-02-14 08:30 Pretty much what Nanosleep suggested. Install another OS and see how it goes. If you want to nail it down to OpenBSD 6.2 this would be an easy way to get a first impression. After all it´s a home router and no sensitive server environment. :)