Monday, August 31, 2015

FreeBSD panic ffs_valloc dup alloc for samba4

After setup samba4 on FreeBSD10, starting samba cause panic.

 panic: ffs_valloc: dup alloc

UFS journaling and soft updates seemed to crash at  some duplication found.
Setting disable the journaling option works.

Boot at single user mode.

# tunefs -p /
# tunefs -n disable /
# tunefs -j disable /
# mount -u -o rw,noacls /
# rm /.sujournal
# reboot -n

After repaired, system works well and then set journaling again with no errors.

Sunday, August 30, 2015

DansGuardian has 40 processes but small amount of ram rss

Squid3 and DansGuardian works now, and they run 

    PID   RSS COMMAND
  950 82936 /usr/sbin/dansguardian
  953 83120  \_ /usr/sbin/dansguardian
  961 82764  \_ /usr/sbin/dansguardian

... there runs more than 40 processes of dansguardian!
They have all 80MB resident size at each process, but free says only it uses 300MB. Why?

At first, check the parent process. It uses only heap.

# cat /proc/950/maps | cut -d' ' -f1 | awk -F\- '{p1="0x"$1;p2="0x"$2;printf ("%s %f\n", $1, 0.000001*(p2-p1) ) }' | sort -k+2 -n
...
7f91892c9000 2.097152
7f918982c000 2.097152
7f918ae81000 10.436608
7f9187a3a000 11.141120
00f36000 21.958656
7f91860f6000 26.492928
7f918403a000 34.320384

It surely gets 80MB and more ram size. Now check other process and it found they use same regions.

# grep 7f918403a000 /proc/*/maps
# grep 7f918403a000 /proc/*/maps

They share the parent's ram area with each other. Is it design?


Saturday, August 29, 2015

What's hostname in dhcpd.conf on NetBSD?

Hmm, I seem to misunderstand  about dhcpd.conf for dhcpcd.conf. There has no hostname configuration in dhpcd.conf.
NetBSD 6.1 has no dhcpd.conf at default.

Wednesday, August 26, 2015

Tuesday, August 25, 2015

[WiFi] CRDA regualatory domain problem

Wiki says, the bandwidth of WiFi has to be set to 20Mhz for world-regulatory domain. You can confirm,

 iw reg get 

if it returns 00, your system is set to world-regulatory domain.
My Lubuntu frequently transited to the scanning state and failed to reconnect. I tried to fix it in many different ways, but the problem wasn't fixed.
Finally, I set my wireless-router for the bandwidth from 40MHz to 20MHz, and the problem seems to be fixed. Now it works perfectly.

Syslog messages were like that,
 'regulatory not found .. and they can't be persist the connection and scanning network ... '
After half a day  struggling, I made it.