Solved System Freezes Every 6+ Hours

This problem is bothering me for since the fresh install of my FreeBSD, my system freezes every 6 hour and some minutes (the problem always occur on uptime 6hr+). I though my Gnome3 who is acting up, I clean up Gnome3 packages and install KDE5 instead. And yet the problem still persist till today. to simplify my problem:
  • My system freezes xorg, desktop environment, mouse (no HDD Led activity)
  • My system still responds CTRL+ALT+F2. But when logging to certain user, it stuck in password input.
  • I can do manual shutdown through power button, and the written uptime is always 6h+ (maybe coincidence?)
  • I am running FreeBSD 12.0-RELEASE-p4 GENERIC amd64 (uname -a) on my laptop (old model)
  • My laptop runs on Core2Duo, with RAM 4GB, Swap 8GB..
  • I boot FreeBSD via Grub2 (I have 3 OSes installed)
My current configurations:

loader.conf
Code:
autoboot_delay="3"
kern.vty=vt

#Microcode
cpu_microcode_load="YES"
cpu_microcode_name="/boot/firmware/intel-ucode.bin"

#WIFI
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"

#NTFS
fuse_load="YES"

#EXT4
ext2fs_load="YES"

#WIFI
bwn_v4_lp_ucode_load="YES"
#bwn_v4_ucode_load="YES"
if_bwn_load="YES"

#CPU Temp
coretemp_load="YES"

#USB
cfumass_load="YES"

rc.conf
Code:
clear_tmp_enable="YES"
hostname="FreeBSD"
ifconfig_re0="DHCP"
#sshd_enable="YES"
#moused_enable="YES"
#ntpdate_enable="YES"
#ntpd_enable="YES"
powerd_enable="YES"
powerd_flags="-a maximum -b adaptive -i 85 -r 60 -p 100"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
kld_list="/boot/modules/i915kms.ko"

#KDE5
dbus_enable="YES"
hald_enable="YES"
sddm_enable="YES"

#WIFI
wlans_bwn0="wlan0"
ifconfig_wlan0="WPA DHCP"

#NTFS
fusefs_enable="YES"
fusefs_safe="YES"
fusefs_safe_evil="YES"

#HTTP
apache24_enable="YES"
mysql_enable="YES"

#Microcode
microcode_update_enable="YES"

#Tor
tor_enable="YES"

#Samba
samba_server_enable="YES"

# USB
cfumass_enable="YES"

sysctl.conf
Code:
kern.randompid=1
net.inet.ip.random_id=1
hw.snd.default_unit=1
kern.sched.preempt_thresh=224
kern.coredump=0

Is there anyway to fix this freezes problem? Thank you
 
But when logging to certain user, it stuck in password input.
This is often caused by memory and/or I/O starvation.

Are you using UFS or ZFS? I found the combination of MySQL and ZFS can sometimes result in this kind of behavior. The trick is to tune MySQL and limit ARC.
 
This is often caused by memory and/or I/O starvation.

Are you using UFS or ZFS? I found the combination of MySQL and ZFS can sometimes result in this kind of behavior. The trick is to tune MySQL and limit ARC.

I am using UFS since I don't know how to do manual partitioning with ZFS.
How to tune MySQL and limit ARC?
My dmesg flooded with:
bwn0: ucode fw: ucode15
bwn0: firmware version (rev 478 patch 104 date 0x8701 time 0x657)

will these messages affect the system?

It could be from overheating due to a dirty fan.

If that's really the case, why it is fixed at 6hrs? I am using extra cooler to pull the heat out
 
I am using UFS since I don't know how to do manual partitioning with ZFS.
I don't see much of a point there, at least for me, ZFS datasets give me anything I would want to do with partitions plus much more flexibility. But in case you have some special requirements, you might want to discuss this in another thread :) 4GB is little RAM for ZFS and for a desktop requires you to limit ARC in order to have a responsive system, but it DOES work :)
 
I don't see much of a point there, at least for me, ZFS datasets give me anything I would want to do with partitions plus much more flexibility. But in case you have some special requirements, you might want to discuss this in another thread :) 4GB is little RAM for ZFS and for a desktop requires you to limit ARC in order to have a responsive system, but it DOES work :)

thank you for the reply, I am not planning to use ZFS for now :)
I am going to try to switch off certain module from loader.conf and check whether it is working or not
 
That 6 plus a little sounds like a cron job running into problems. It might pay off to check that avenue.
You may also check the file systems, maybe there is the trouble...
 
This problem is bothering me for since the fresh install of my FreeBSD, my system freezes every 6 hour and some minutes (the problem always occur on uptime 6hr+). I though my Gnome3 who is acting up, I clean up Gnome3 packages and install KDE5 instead. And yet the problem still persist till today. to simplify my problem:
  • My system freezes xorg, desktop environment, mouse (no HDD Led activity)
  • My system still responds CTRL+ALT+F2. But when logging to certain user, it stuck in password input.
  • I can do manual shutdown through power button, and the written uptime is always 6h+ (maybe coincidence?)
  • I am running FreeBSD 12.0-RELEASE-p4 GENERIC amd64 (uname -a) on my laptop (old model)
  • My laptop runs on Core2Duo, with RAM 4GB, Swap 8GB..
  • I boot FreeBSD via Grub2 (I have 3 OSes installed)
My current configurations:

loader.conf
Code:
autoboot_delay="3"
kern.vty=vt

#Microcode
cpu_microcode_load="YES"
cpu_microcode_name="/boot/firmware/intel-ucode.bin"

#WIFI
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"

#NTFS
fuse_load="YES"

#EXT4
ext2fs_load="YES"

#WIFI
bwn_v4_lp_ucode_load="YES"
#bwn_v4_ucode_load="YES"
if_bwn_load="YES"

#CPU Temp
coretemp_load="YES"

#USB
cfumass_load="YES"

rc.conf
Code:
clear_tmp_enable="YES"
hostname="FreeBSD"
ifconfig_re0="DHCP"
#sshd_enable="YES"
#moused_enable="YES"
#ntpdate_enable="YES"
#ntpd_enable="YES"
powerd_enable="YES"
powerd_flags="-a maximum -b adaptive -i 85 -r 60 -p 100"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
kld_list="/boot/modules/i915kms.ko"

#KDE5
dbus_enable="YES"
hald_enable="YES"
sddm_enable="YES"

#WIFI
wlans_bwn0="wlan0"
ifconfig_wlan0="WPA DHCP"

#NTFS
fusefs_enable="YES"
fusefs_safe="YES"
fusefs_safe_evil="YES"

#HTTP
apache24_enable="YES"
mysql_enable="YES"

#Microcode
microcode_update_enable="YES"

#Tor
tor_enable="YES"

#Samba
samba_server_enable="YES"

# USB
cfumass_enable="YES"

sysctl.conf
Code:
kern.randompid=1
net.inet.ip.random_id=1
hw.snd.default_unit=1
kern.sched.preempt_thresh=224
kern.coredump=0

Is there anyway to fix this freezes problem? Thank you
pretty interesting... how could this happen.

I have not much idea. That's kinda weird, ... could it be that you reinstall and test your hardware, without pkg single usage. So that you can detect if base installation has no issue or hardware.
 
That 6 plus a little sounds like a cron job running into problems. It might pay off to check that avenue.
You may also check the file systems, maybe there is the trouble...
pretty interesting... how could this happen.

I have not much idea. That's kinda weird, ... could it be that you reinstall and test your hardware, without pkg single usage. So that you can detect if base installation has no issue or hardware.

So yesterday I put a test to my system by removing recent module from startup and voila:

6541


After commenting some lines in loader.conf and rc.conf, there are two possibilities come to my mind:
  • bwn_v4_lp_ucode cause the problem
  • bwn_v4_lp_ucode's kernel message cause the problem
Why kernel message? These lines keep spamming and might causing system to freeze (my opinion).
bwn0: ucode fw: ucode15
bwn0: firmware version (rev 478 patch 104 date 0x8701 time 0x657)


I need to do one more test by suppressing these messages only when the module enabled on startup. Is it possible to disable bwn module's message?
 
I had freezes at a few hours uptime on a OS X HackMac. Fixed it by adding a TSC synchronization kext. Related or not I dunno just noting that not all Intel CPUs have hardware TSC sync and the OS must synchronize them so as not for them to go out of whack completely
 
Back
Top