Re: [squid-users] Re: FreeBSD 6.x server with Squid/diskd

From: Anders Nordby <[email protected]>
Date: Sun, 10 Sep 2006 22:09:08 +0200

Hi,

On Thu, Sep 07, 2006 at 09:49:57PM +0800, Adrian Chadd wrote:
> Hm. libpthreads and ufs seem to have the same CPU use profile. Using
> libthr does drop the CPU quite a bit but I don't have polygraph setup
> to see how much further I can push it.
>
> I just added this to /etc/libmap.conf :
>
> > cat /etc/libmap.conf
> squid
> libpthread.so.2 libthr.so.2
> libpthread.so libthr.so
>
> I'll retool my linux box to handle polygraph better and try it out
> over the weekend.
>
> Is anyone here running Squid 2.5 or squid-2.6 + FreeBSD-6.x ?

I recently changed to aufs (on my servers running FreeBSD 6.1, after
getting tired of diskd troubles that I reported to this list earlier
on), and now I am seeing some kernel crashes now and then:

Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 06
fault virtual address = 0x0
fault code = supervisor read, page not present
instruction pointer = 0x20:0x0
stack pointer = 0x28:0xeb9a7b98
frame pointer = 0x28:0xeb9a7bcc
code segment = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 542 (squid)
trap number = 12
panic: page fault
cpuid = 0
Uptime: 2d4h20m9s
Dumping 3839 MB (2 chunks)
  chunk 0: 1MB (159 pages) ... ok
  chunk 1: 3839MB (982778 pages) 3824 3808 3792 3776 3760 3744 3728 3712
3696 3680 3664 3648 3632 3616 3600 3584 3568 3552 3536 3520 3504 3488
3472 3456 3440 3424 3408 3392 3376 3360 3344 3328 3312 3296 3280 3264
3248 3232 3216 3200 3184 3168 3152 3136 3120 3104 3088 3072 3056 3040
3024 3008 2992 2976 2960 2944 2928 2912 2896 2880 2864 2848 2832 2816
2800 2784 2768 2752 2736 2720 2704 2688 2672 2656 2640 2624 2608 2592
2576 2560 2544 2528 2512 2496 2480 2464 2448 2432 2416 2400 2384 2368
2352 2336 2320 2304 2288 2272 2256 2240 2224 2208 2192 2176 2160 2144
2128 2112 2096 2080 2064 2048 2032 2016 2000 1984 1968 1952 1936 1920
1904 1888 1872 1856 1840 1824 1808 1792 1776 1760 1744 1728 1712 1696
1680 1664 1648 1632 1616 1600 1584 1568 1552 1536 1520 1504 1488 1472
1456 1440 1424 1408 1392 1376 1360 1344 1328 1312 1296 1280 1264 1248
1232 1216 1200 1184 1168 1152 1136 1120 1104 1088 1072 1056 1040 1024
1008 992 976 960 944 928 912 896 880 864 848 832 816 800 784 768 752 736
720 704 688 672 656 640 624 608 592 576 560 544 528 512 496 480 464 448
432 416 400 384 368 352 336 320 304 288 272 256 240 224 208 192 176 160
144 128 112 96 80 64 48 32 16

#0 doadump () at pcpu.h:165
165 pcpu.h: No such file or directory.
        in pcpu.h
(kgdb) bt
#0 doadump () at pcpu.h:165
#1 0xc0672901 in boot (howto=260) at
/usr/src/sys/kern/kern_shutdown.c:402
#2 0xc0672c59 in panic (fmt=0xc087f113 "%s")
    at /usr/src/sys/kern/kern_shutdown.c:558
#3 0xc08493e6 in trap_fatal (frame=0xeb9a7b58, eva=0)
    at /usr/src/sys/i386/i386/trap.c:836
#4 0xc08490ef in trap_pfault (frame=0xeb9a7b58, usermode=0, eva=0)
    at /usr/src/sys/i386/i386/trap.c:744
#5 0xc0848d05 in trap (frame=
      {tf_fs = -916914168, tf_es = -916914136, tf_ds = -896335832,
tf_edi = -917610112, tf_esi = -342197140, tf_ebp = -342197300, tf_isp =
-342197372, tf_ebx = 4, tf_edx = -919717272, tf_ecx = -917610156, tf_eax
= -1064162880, tf_trapno = 12, tf_err = 0, tf_eip = 0, tf_cs = 32,
tf_eflags = 66118, tf_esp = -1067102273, tf_ss = -917610156}) at
/usr/src/sys/i386/i386/trap.c:434
#6 0xc08361fa in calltrap () at /usr/src/sys/i386/i386/exception.s:139
#7 0x00000000 in ?? ()
Previous frame inner to this frame (corrupt stack?)
(kgdb)

I wonder if switching to libthr (as opposed to running with pthreads
which I do now) would be more stable. Hmm, sigh.

Too bad kgdb in FreeBSD can not look into threads. :-/

I'm running with INVARIANTS and WITNESS on one server now, but haven't
had any crashes on that one since then.

Other than that, it seems aufs in FreeBSD 6.1 is quite fast, Squid
doesn't block for me.

Regards,

-- 
Anders.
Received on Sun Sep 10 2006 - 14:09:15 MDT

This archive was generated by hypermail pre-2.1.9 : Sun Oct 01 2006 - 12:00:03 MDT