Enabling IPSec panics stable/9 (runs OK on stable/8)

Attila Nagy bra at fsn.hu
Thu Jan 5 10:20:51 UTC 2012


On 01/04/12 17:31, VANHULLEBUS Yvan wrote:
> On Wed, Jan 04, 2012 at 04:17:41PM +0100, Attila Nagy wrote:
> [....]
>>     #7  0xffffffff809bf779 in ipsec_process_done (m=0xfffffe000c7c7a00,
>>         isr=0xfffffe001bf54380) at
>>     /data/usr/src/sys/netipsec/ipsec_output.c:170
>>
>> Here seems to be the problem....
>> Can you do the following (in this order) in kgdb:
>> frame 7
>> p saidx
>> p *saidx
>>
>>     (kgdb) frame 7
>>     #7  0xffffffff809bf779 in ipsec_process_done (m=0xfffffe000c7c7a00,
>>         isr=0xfffffe001bf54380) at
>>     /data/usr/src/sys/netipsec/ipsec_output.c:170
>>     170                     switch (saidx->dst.sa.sa_family) {
>>     (kgdb) p saidx
>>     No symbol "saidx" in current context.
>
> ????
> There *is* such a symbol, as confirmed by kgdb's output when you
> switched to frame 7 !
>
> Could you check that you are running a correct debug kernel ?
The kernel config is GENERIC, plus some, so it contains DEBUG=-g 
makeoptions.
This is a limited environment (with a lot of programs missing from the 
boot image), but I don't think it should affect that.
kgdb command line is:
./kgdb kernel.debug vmcore.0
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...

Unread portion of the kernel message buffer:


Fatal trap 12: page fault while in kernel mode
cpuid = 4; apic id = 04
fault virtual address   = 0xa0
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:0xffffffff809bf779
stack pointer           = 0x28:0xffffff80002cd350
frame pointer           = 0x28:0xffffff80002cd390
code segment            = base 0x0, limit 0xfffff, type 0x1b
                         = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 12 (swi1: netisr 0)
trap number             = 12
panic: page fault
cpuid = 4
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
kdb_backtrace() at kdb_backtrace+0x37
panic() at panic+0x187
trap_fatal() at trap_fatal+0x290
trap_pfault() at trap_pfault+0x1f9
trap() at trap+0x3df
calltrap() at calltrap+0x8
--- trap 0xc, rip = 0xffffffff809bf779, rsp = 0xffffff80002cd350, rbp = 
0xffffff80002cd390 ---
ipsec_process_done() at ipsec_process_done+0x119
esp_output_cb() at esp_output_cb+0x1a1
crypto_done() at crypto_done+0x102
swcr_process() at swcr_process+0x1d7
crypto_invoke() at crypto_invoke+0x6b
crypto_dispatch() at crypto_dispatch+0xfb
esp_output() at esp_output+0x5a2
ipsec4_process_packet() at ipsec4_process_packet+0x1f8
ip_ipsec_output() at ip_ipsec_output+0x16a
ip_output() at ip_output+0x526
icmp_reflect() at icmp_reflect+0x339
icmp_input() at icmp_input+0x257
ip_input() at ip_input+0x1de
swi_net() at swi_net+0x14d
intr_event_execute_handlers() at intr_event_execute_handlers+0x104
ithread_loop() at ithread_loop+0xa4
fork_exit() at fork_exit+0x11f
fork_trampoline() at fork_trampoline+0xe
--- trap 0, rip = 0, rsp = 0xffffff80002cdd00, rbp = 0 ---
Uptime: 12m32s
Dumping 30283 MB (4 chunks)
   chunk 0: 1MB (139 pages) ... ok
   chunk 1: 3070MB (785904 pages)panic: bufwrite: buffer is not busy???
cpuid = 4
  3054 3038 3022 3006 2990 2974 2958 2942 2926 2910 2894 2878 2862 2846 
2830 2814 2798 2782 2766 2750 2734 2718 2702 2686 2670 2654 2638 2622 
2606 2590 2574 2558 2542 2526 2510 2494 2478 2462 2446 2430 2414 2398 
2382 2366 2350 2334 2318 2302 2286 2270 2254 2238 2222 2206 2190 2174 
2158 2142 2126 2110 2094 2078 2062 2046 2030 2014 1998 1982 1966 1950 
1934 1918 1902 1886 1870 1854 1838 1822 1806 1790 1774 1758 1742 1726 
1710 1694 1678 1662 1646 1630 1614 1598 1582 1566 1550 1534 1518 1502 
1486 1470 1454 1438 1422 1406 1390 1374 1358 1342 1326 1310 1294 1278 
1262 1246 1230 1214 1198 1182 1166 1150 1134 1118 1102 1086 1070 1054 
1038 1022 1006 990 974 958 942 926 910 894 878 862 846 830 814 798 782 
766 750 734 718 702 686 670 654 638 622 606 590 574 558 542 526 510 494 
478 462 446 430 414 398 382 366 350 334 318 302 286 270 254 238 222 206 
190 174 158 142 126 110 94 78 62 46 30 14 ... ok
   chunk 2: 1MB (256 pages) ... ok
   chunk 3: 27212MB (6966272 pages) 27197 27181 27165 27149 27133 27117 
27101 27085 27069 27053 27037 27021 27005 26989 26973 26957 26941 26925 
26909 26893 26877 26861 26845 26829 26813 26797 26781 26765 26749 26733 
26717 26701 26685 26669 26653 26637 26621 26605 26589 26573 26557 26541 
26525 26509 26493 26477 26461 26445 26429 26413 26397 26381 26365 26349 
26333 26317 26301 26285 26269 26253 26237 26221 26205 26189 26173 26157 
26141 26125 26109 26093 26077 26061 26045 26029 26013 25997 25981 25965 
25949 25933 25917 25901 25885 25869 25853 25837 25821 25805 25789 25773 
25757 25741 25725 25709 25693 25677 25661 25645 25629 25613 25597 25581 
25565 25549 25533 25517 25501 25485 25469 25453 25437 25421 25405 25389 
25373 25357 25341 25325 25309 25293 25277 25261 25245 25229 25213 25197 
25181 25165 25149 25133 25117 25101 25085 25069 25053 25037 25021 25005 
24989 24973 24957 24941 24925 24909 24893 24877 24861 24845 24829 24813 
24797 24781 24765 24749 24733 24717 24701 24685 24669 24653 24637 24621 
24605 24589 24573 24557 24541 24525 24509 24493 24477 24461 24445 24429 
24413 24397 24381 24365 24349 24333 24317 24301 24285 24269 24253 24237 
24221 24205 24189 24173 24157 24141 24125 24109 24093 24077 24061 24045 
24029 24013 23997 23981 23965 23949 23933 23917 23901 23885 23869 23853 
23837 23821 23805 23789 23773 23757 23741 23725 23709 23693 23677 23661 
23645 23629 23613 23597 23581 23565 23549 23533 23517 23501 23485 23469 
23453 23437 23421 23405 23389 23373 23357 23341 23325 23309 23293 23277 
23261 23245 23229 23213 23197 23181 23165 23149 23133 23117 23101 23085 
23069 23053 23037 23021 23005 22989 22973 22957 22941 22925 22909 22893 
22877 22861 22845 22829 22813 22797 22781 22765 22749 22733 22717 22701 
22685 22669 22653 22637 22621 22605 22589 22573 22557 22541 22525 22509 
22493 22477 22461 22445 22429 22413 22397 22381 22365 22349 22333 22317 
22301 22285 22269 22253 22237 22221 22205 22189 22173 22157 22141 22125 
22109 22093 22077 22061 22045 22029 22013 21997 21981 21965 21949 21933 
21917 21901 21885 21869 21853 21837 21821 21805 21789 21773 21757 21741 
21725 21709 21693 21677 21661 21645 21629 21613 21597 21581 21565 21549 
21533 21517 21501 21485 21469 21453 21437 21421 21405 21389 21373 21357 
21341 21325 21309 21293 21277 21261 21245 21229 21213 21197 21181 21165 
21149 21133 21117 21101 21085 21069 21053 21037 21021 21005 20989 20973 
20957 20941 20925 20909 20893 20877 20861 20845 20829 20813 20797 20781 
20765 20749 20733 20717 20701 20685 20669 20653 20637 20621 20605 20589 
20573 20557 20541 20525 20509 20493 20477 20461 20445 20429 20413 20397 
20381 20365 20349 20333 20317 20301 20285 20269 20253 20237 20221 20205 
20189 20173 20157 20141 20125 20109 20093 20077 20061 20045 20029 20013 
19997 19981 19965 19949 19933 19917 19901 19885 19869 19853 19837 19821 
19805 19789 19773 19757 19741 19725 19709 19693 19677 19661 19645 19629 
19613 19597 19581 19565 19549 19533 19517 19501 19485 19469 19453 19437 
19421 19405 19389 19373 19357 19341 19325 19309 19293 19277 19261 19245 
19229 19213 19197 19181 19165 19149 19133 19117 19101 19085 19069 19053 
19037 19021 19005 18989 18973 18957 18941 18925 18909 18893 18877 18861 
18845 18829 18813 18797 18781 18765 18749 18733 18717 18701 18685 18669 
18653 18637 18621 18605 18589 18573 18557 18541 18525 18509 18493 18477 
18461 18445 18429 18413 18397 18381 18365 18349 18333 18317 18301 18285 
18269 18253 18237 18221 18205 18189 18173 18157 18141 18125 18109 18093 
18077 18061 18045 18029 18013 17997 17981 17965 17949 17933 17917 17901 
17885 17869 17853 17837 17821 17805 17789 17773 17757 17741 17725 17709 
17693 17677 17661 17645 17629 17613 17597 17581 17565 17549 17533 17517 
17501 17485 17469 17453 17437 17421 17405 17389 17373 17357 17341 17325 
17309 17293 17277 17261 17245 17229 17213 17197 17181 17165 17149 17133 
17117 17101 17085 17069 17053 17037 17021 17005 16989 16973 16957 16941 
16925 16909 16893 16877 16861 16845 16829 16813 16797 16781 16765 16749 
16733 16717 16701 16685 16669 16653 16637 16621 16605 16589 16573 16557 
16541 16525 16509 16493 16477 16461 16445 16429 16413 16397 16381 16365 
16349 16333 16317 16301 16285 16269 16253 16237 16221 16205 16189 16173 
16157 16141 16125 16109 16093 16077 16061 16045 16029 16013 15997 15981 
15965 15949 15933 15917 15901 15885 15869 15853 15837 15821 15805 15789 
15773 15757 15741 15725 15709 15693 15677 15661 15645 15629 15613 15597 
15581 15565 15549 15533 15517 15501 15485 15469 15453 15437 15421 15405 
15389 15373 15357 15341 15325 15309 15293 15277 15261 15245 15229 15213 
15197 15181 15165 15149 15133 15117 15101 15085 15069 15053 15037 15021 
15005 14989 14973 14957 14941 14925 14909 14893 14877 14861 14845 14829 
14813 14797 14781 14765 14749 14733 14717 14701 14685 14669 14653 14637 
14621 14605 14589 14573 14557 14541 14525 14509 14493 14477 14461 14445 
14429 14413 14397 14381 14365 14349 14333 14317 14301 14285 14269 14253 
14237 14221 14205 14189 14173 14157 14141 14125 14109 14093 14077 14061 
14045 14029 14013 13997 13981 13965 13949 13933 13917 13901 13885 13869 
13853 13837 13821 13805 13789 13773 13757 13741 13725 13709 13693 13677 
13661 13645 13629 13613 13597 13581 13565 13549 13533 13517 13501 13485 
13469 13453 13437 13421 13405 13389 13373 13357 13341 13325 13309 13293 
13277 13261 13245 13229 13213 13197 13181 13165 13149 13133 13117 13101 
13085 13069 13053 13037 13021 13005 12989 12973 12957 12941 12925 12909 
12893 12877 12861 12845 12829 12813 12797 12781 12765 12749 12733 12717 
12701 12685 12669 12653 12637 12621 12605 12589 12573 12557 12541 12525 
12509 12493 12477 12461 12445 12429 12413 12397 12381 12365 12349 12333 
12317 12301 12285 12269 12253 12237 12221 12205 12189 12173 12157 12141 
12125 12109 12093 12077 12061 12045 12029 12013 11997 11981 11965 11949 
11933 11917 11901 11885 11869 11853 11837 11821 11805 11789 11773 11757 
11741 11725 11709 11693 11677 11661 11645 11629 11613 11597 11581 11565 
11549 11533 11517 11501 11485 11469 11453 11437 11421 11405 11389 11373 
11357 11341 11325 11309 11293 11277 11261 11245 11229 11213 11197 11181 
11165 11149 11133 11117 11101 11085 11069 11053 11037 11021 11005 10989 
10973 10957 10941 10925 10909 10893 10877 10861 10845 10829 10813 10797 
10781 10765 10749 10733 10717 10701 10685 10669 10653 10637 10621 10605 
10589 10573 10557 10541 10525 10509 10493 10477 10461 10445 10429 10413 
10397 10381 10365 10349 10333 10317 10301 10285 10269 10253 10237 10221 
10205 10189 10173 10157 10141 10125 10109 10093 10077 10061 10045 10029 
10013 9997 9981 9965 9949 9933 9917 9901 9885 9869 9853 9837 9821 9805 
9789 9773 9757 9741 9725 9709 9693 9677 9661 9645 9629 9613 9597 9581 
9565 9549 9533 9517 9501 9485 9469 9453 9437 9421 9405 9389 9373 9357 
9341 9325 9309 9293 9277 9261 9245 9229 9213 9197 9181 9165 9149 9133 
9117 9101 9085 9069 9053 9037 9021 9005 8989 8973 8957 8941 8925 8909 
8893 8877 8861 8845 8829 8813 8797 8781 8765 8749 8733 8717 8701 8685 
8669 8653 8637 8621 8605 8589 8573 8557 8541 8525 8509 8493 8477 8461 
8445 8429 8413 8397 8381 8365 8349 8333 8317 8301 8285 8269 8253 8237 
8221 8205 8189 8173 8157 8141 8125 8109 8093 8077 8061 8045 8029 8013 
7997 7981 7965 7949 7933 7917 7901 7885 7869 7853 7837 7821 7805 7789 
7773 7757 7741 7725 7709 7693 7677 7661 7645 7629 7613 7597 7581 7565 
7549 7533 7517 7501 7485 7469 7453 7437 7421 7405 7389 7373 7357 7341 
7325 7309 7293 7277 7261 7245 7229 7213 7197 7181 7165 7149 7133 7117 
7101 7085 7069 7053 7037 7021 7005 6989 6973 6957 6941 6925 6909 6893 
6877 6861 6845 6829 6813 6797 6781 6765 6749 6733 6717 6701 6685 6669 
6653 6637 6621 6605 6589 6573 6557 6541 6525 6509 6493 6477 6461 6445 
6429 6413 6397 6381 6365 6349 6333 6317 6301 6285 6269 6253 6237 6221 
6205 6189 6173 6157 6141 6125 6109 6093 6077 6061 6045 6029 6013 5997 
5981 5965 5949 5933 5917 5901 5885 5869 5853 5837 5821 5805 5789 5773 
5757 5741 5725 5709 5693 5677 5661 5645 5629 5613 5597 5581 5565 5549 
5533 5517 5501 5485 5469 5453 5437 5421 5405 5389 5373 5357 5341 5325 
5309 5293 5277 5261 5245 5229 5213 5197 5181 5165 5149 5133 5117 5101 
5085 5069 5053 5037 5021 5005 4989 4973 4957 4941 4925 4909 4893 4877 
4861 4845 4829 4813 4797 4781 4765 4749 4733 4717 4701 4685 4669 4653 
4637 4621 4605 4589 4573 4557 4541 4525 4509 4493 4477 4461 4445 4429 
4413 4397 4381 4365 4349 4333 4317 4301 4285 4269 4253 4237 4221 4205 
4189 4173 4157 4141 4125 4109 4093 4077 4061 4045 4029 4013 3997 3981 
3965 3949 3933 3917 3901 3885 3869 3853 3837 3821 3805 3789 3773 3757 
3741 3725 3709 3693 3677 3661 3645 3629 3613 3597 3581 3565 3549 3533 
3517 3501 3485 3469 3453 3437 3421 3405 3389 3373 3357 3341 3325 3309 
3293 3277 3261 3245 3229 3213 3197 3181 3165 3149 3133 3117 3101 3085 
3069 3053 3037 3021 3005 2989 2973 2957 2941 2925 2909 2893 2877 2861 
2845 2829 2813 2797 2781 2765 2749 2733 2717 2701 2685 2669 2653 2637 
2621 2605 2589 2573 2557 2541 2525 2509 2493 2477 2461 2445 2429 2413 
2397 2381 2365 2349 2333 2317 2301 2285 2269 2253 2237 2221 2205 2189 
2173 2157 2141 2125 2109 2093 2077 2061 2045 2029 2013 1997 1981 1965 
1949 1933 1917 1901 1885 1869 1853 1837 1821 1805 1789 1773 1757 1741 
1725 1709 1693 1677 1661 1645 1629 1613 1597 1581 1565 1549 1533 1517 
1501 1485 1469 1453 1437 1421 1405 1389 1373 1357 1341 1325 1309 1293 
1277 1261 1245 1229 1213 1197 1181 1165 1149 1133 1117 1101 1085 1069 
1053 1037 1021 1005 989 973 957 941 925 909 893 877 861 845 829 813 797 
781 765 749 733 717 701 685 669 653 637 621 605 589 573 557 541 525 509 
493 477 461 445 429 413 397 381 365 349 333 317 301 285 269 253 237 221 
205 189 173 157 141 125 109 93 77 61 45 29 13

Reading symbols from /boot/kernel/zfs.ko...Reading symbols from 
/boot/kernel/zfs.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/zfs.ko
Reading symbols from /boot/kernel/opensolaris.ko...Reading symbols from 
/boot/kernel/opensolaris.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/opensolaris.ko
Reading symbols from /boot/kernel/tmpfs.ko...Reading symbols from 
/boot/kernel/tmpfs.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/tmpfs.ko
Reading symbols from /boot/kernel/pflog.ko...Reading symbols from 
/boot/kernel/pflog.ko.symbols...done.
fdone.
Loaded symbols for /boot/kernel/pflog.ko
Reading symbols from /boot/kernel/pf.ko...Reading symbols from 
/boot/kernel/pf.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/pf.ko
Reading symbols from /boot/kernel/nullfs.ko...Reading symbols from 
/boot/kernel/nullfs.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/nullfs.ko
#0  doadump (textdump=1) at /data/usr/src/sys/kern/kern_shutdown.c:260
260             if (textdump && textdump_pending) {
(kgdb) frame 7
#7  0xffffffff809bf779 in ipsec_process_done (m=0xfffffe001977a600,
     isr=0xfffffe019eb96480) at 
/data/usr/src/sys/netipsec/ipsec_output.c:170
170                     switch (saidx->dst.sa.sa_family) {
(kgdb) p saidx
No symbol "saidx" in current context.

BTW in the same frame:
(kgdb) p tdbi
$1 = (struct tdb_ident *) 0xfffffe017ce5e418
(kgdb) p mtag
$2 = (struct m_tag *) 0xfffffe017ce5e400
(kgdb) p isr
$3 = (struct ipsecrequest *) 0xfffffe019eb96480


>> Strange.... I'll review changes in IPsec stack which have been done in
>> STABLE/9 and not backported to STABLE/8.....
>>
>>     Oh, sorry, not quite an up-to-date 8-STABLE, it's from Sat May 21
>>     22:05:26 CEST 2011 (csup'd some hours earlier).
>>     Should I check with a more recent version? Does that help?
>>     Thanks for helping.
>
> Yes, this may help if you try with a most recent 8-STABLE: I don't
> remember exactly what, but I'm quite sure there have been some IPsec
> related commits on stable/8 between that date and now !
I will try it.


More information about the freebsd-stable mailing list