[strongSwan] Strongswan receive signal 11 on PPC even with mlongcall
Barry G
mr.scada at gmail.com
Fri Aug 30 01:31:06 CEST 2013
Hello,
I am having trouble with strongSwan 4.5.2 on the PowerPC platform.
Specifically I am getting a signal 11 in openssl_diffie_hellman_create.
Googling turned up
http://comments.gmane.org/gmane.network.vpn.strongswan.devel/610
which recommended I compile with -mlongcall. I added that to the
compilation, verified
it was present, but it still dies when starting. Attached is the GDB backtrace
and the disassembly of openssl_diffie_hellman_create.
Any thoughts or guidance would be appreciated.
Thanks,
Barry
ipsec start --nofork
Starting strongSwan 4.5.2 IPsec [starter]...
00[DMN] Starting IKEv2 charon daemon (strongSwan 4.5.2)
00[KNL] listening on interfaces:
00[KNL] eth0
00[KNL] 192.168.3.2
00[KNL] eth1
00[KNL] 192.168.1.2
00[KNL] eth2
00[KNL] 10.203.16.190
00[KNL] received netlink error: Address family not supported by protocol (97)
00[KNL] unable to create IPv6 routing table rule
00[NET] unable to create raw socket: Address family not supported by protocol
00[NET] could not open IPv6 receive socket, IPv6 disabled
00[CFG] loading ca certificates from '/etc/ipsec.d/cacerts'
00[CFG] loading aa certificates from '/etc/ipsec.d/aacerts'
00[CFG] loading ocsp signer certificates from '/etc/ipsec.d/ocspcerts'
00[CFG] loading attribute certificates from '/etc/ipsec.d/acerts'
00[CFG] loading crls from '/etc/ipsec.d/crls'
00[CFG] loading secrets from '/etc/ipsec.secrets'
00[CFG] loaded IKE secret for 192.168.3.2 192.168.3.3
00[CFG] sql plugin: database URI not set
00[LIB] plugin 'sql': failed to load - sql_plugin_create returned NULL
00[CFG] loaded 0 RADIUS server configurations
00[CFG] HA config misses local/remote address
00[LIB] plugin 'ha': failed to load - ha_plugin_create returned NULL
00[DMN] loaded plugins: test-vectors curl ldap aes des sha1 sha2 md5
random x509 revocation constraints pubkey pkcs1 pgp pem openssl
fips-prf gmp agent pkcs11 xcbc hmac ctr ccm gcm attr kernel-netlink
resolve socket-raw farp stroke updown eap-identity eap-aka eap-md5
eap-gtc eap-mschapv2 eap-radius eap-tls eap-ttls eap-tnc dhcp led
addrblock
00[JOB] spawning 16 worker threads
charon (6162) started after 3920 ms
08[CFG] received stroke: add connection 'host-host-2'
08[CFG] added configuration 'host-host-2'
12[CFG] received stroke: initiate 'host-host-2'
12[IKE] initiating IKE_SA host-host-2[1] to 192.168.3.3
12[DMN] thread 12 received 11
dumping 17 stack frame addresses:
@ 0x100000 (__kernel_sigtramp32+0x0) [0x100364]
[snip missing addr2line comments]
12[DMN] killing ourself, received critical signal
charon has died -- restart scheduled (5sec)
ipsec starter stopped
# gdb /usr/lib/ipsec/charon core
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "powerpc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/lib/ipsec/charon...Reading symbols from
/usr/lib/debug/usr/lib/ipsec/charon...done.
done.
[New LWP 6176]
[New LWP 6174]
[New LWP 6179]
[New LWP 6165]
[New LWP 6173]
[New LWP 6172]
[New LWP 6180]
[New LWP 6167]
[New LWP 6178]
[New LWP 6162]
[New LWP 6171]
[New LWP 6170]
[New LWP 6169]
[New LWP 6168]
[New LWP 6166]
[New LWP 6177]
[New LWP 6175]
warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/powerpc-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/lib/ipsec/charon'.
Program terminated with signal 6, Aborted.
#0 0x204211e0 in raise () from /lib/powerpc-linux-gnu/libc.so.6
(gdb) thread apply all bt 10
Thread 17 (Thread 0x4d827490 (LWP 6175)):
#0 0x2057e2c4 in accept () from /lib/powerpc-linux-gnu/libpthread.so.0
#1 0x1f9b8898 in receive (this=0x209e6440) at stroke_socket.c:598
#2 0x20669358 in execute (this=0x209e6b60)
at processing/jobs/callback_job.c:199
#3 0x20669c50 in process_jobs (this=0x209d4dd0) at processing/processor.c:136
#4 0x2066c920 in thread_main (this=0x209ec150) at threading/thread.c:291
#5 0x20575864 in start_thread () from /lib/powerpc-linux-gnu/libpthread.so.0
#6 0x204d1198 in clone () from /lib/powerpc-linux-gnu/libc.so.6
Thread 16 (Thread 0x4e827490 (LWP 6177)):
#0 0x2057a1d8 in pthread_cond_wait@@GLIBC_2.3.2 ()
from /lib/powerpc-linux-gnu/libpthread.so.0
#1 0x2066d914 in _wait (this=<optimized out>, mutex=0x209d4ed0)
at threading/mutex.c:252
#2 0x20669ba8 in process_jobs (this=0x209d4dd0) at processing/processor.c:128
#3 0x2066c920 in thread_main (this=0x209ec430) at threading/thread.c:291
#4 0x20575864 in start_thread () from /lib/powerpc-linux-gnu/libpthread.so.0
#5 0x204d1198 in clone () from /lib/powerpc-linux-gnu/libc.so.6
Thread 15 (Thread 0x49027490 (LWP 6166)):
#0 0x204c988c in select () from /lib/powerpc-linux-gnu/libc.so.6
---Type <return> to continue, or q <return> to quit---
#1 0x1fa0db1c in receiver (this=0x209e5638, packet=0x49026abc)
at socket_raw_socket.c:157
#2 0x205ca38c in receiver (this=0x209d5c78, packet=0x49026abc)
at network/socket_manager.c:71
#3 0x205c8f30 in receive_packets (this=0x209eaf50) at network/receiver.c:280
#4 0x20669358 in execute (this=0x209eb038)
at processing/jobs/callback_job.c:199
#5 0x20669c50 in process_jobs (this=0x209d4dd0) at processing/processor.c:136
#6 0x2066c920 in thread_main (this=0x209eb460) at threading/thread.c:291
#7 0x20575864 in start_thread () from /lib/powerpc-linux-gnu/libpthread.so.0
#8 0x204d1198 in clone () from /lib/powerpc-linux-gnu/libc.so.6
Thread 14 (Thread 0x4a027490 (LWP 6168)):
#0 0x2057e478 in recvfrom () from /lib/powerpc-linux-gnu/libpthread.so.0
#1 0x1f9ea164 in recvfrom (__addr_len=0x4a026a84, __addr=0x4a026ac4,
__flags=0, __n=28, __buf=0x4a026aa8, __fd=<optimized out>)
at /usr/include/powerpc-linux-gnu/bits/socket2.h:77
#2 receive_arp (this=0x209e5b70) at farp_spoofer.c:114
#3 0x20669358 in execute (this=0x209e5b88)
at processing/jobs/callback_job.c:199
#4 0x20669c50 in process_jobs (this=0x209d4dd0) at processing/processor.c:136
#5 0x2066c920 in thread_main (this=0x209eb740) at threading/thread.c:291
#6 0x20575864 in start_thread () from /lib/powerpc-linux-gnu/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#7 0x204d1198 in clone () from /lib/powerpc-linux-gnu/libc.so.6
Thread 13 (Thread 0x4a827490 (LWP 6169)):
#0 0x2057e478 in recvfrom () from /lib/powerpc-linux-gnu/libpthread.so.0
#1 0x1fa5a628 in recvfrom (__addr_len=0x4a8266b8, __addr=0x4a8266ac,
__flags=0, __n=1024, __buf=0x4a8266bc, __fd=<optimized out>)
at /usr/include/powerpc-linux-gnu/bits/socket2.h:77
#2 receive_events (this=0x209e4878) at kernel_netlink_net.c:579
#3 0x20669358 in execute (this=0x209e4a68)
at processing/jobs/callback_job.c:199
#4 0x20669c50 in process_jobs (this=0x209d4dd0) at processing/processor.c:136
#5 0x2066c920 in thread_main (this=0x209eb8b0) at threading/thread.c:291
#6 0x20575864 in start_thread () from /lib/powerpc-linux-gnu/libpthread.so.0
#7 0x204d1198 in clone () from /lib/powerpc-linux-gnu/libc.so.6
Thread 12 (Thread 0x4b027490 (LWP 6170)):
#0 0x2057e478 in recvfrom () from /lib/powerpc-linux-gnu/libpthread.so.0
#1 0x1fa5531c in recvfrom (__addr_len=0x4b026698, __addr=0x4b02668c,
__flags=0, __n=1024, __buf=0x4b02669c, __fd=<optimized out>)
at /usr/include/powerpc-linux-gnu/bits/socket2.h:77
#2 receive_events (this=0x209e45c8) at kernel_netlink_ipsec.c:717
#3 0x20669358 in execute (this=0x209e4760)
at processing/jobs/callback_job.c:199
---Type <return> to continue, or q <return> to quit---
#4 0x20669c50 in process_jobs (this=0x209d4dd0) at processing/processor.c:136
#5 0x2066c920 in thread_main (this=0x209eba20) at threading/thread.c:291
#6 0x20575864 in start_thread () from /lib/powerpc-linux-gnu/libpthread.so.0
#7 0x204d1198 in clone () from /lib/powerpc-linux-gnu/libc.so.6
Thread 11 (Thread 0x4b827490 (LWP 6171)):
#0 0x2057e478 in recvfrom () from /lib/powerpc-linux-gnu/libpthread.so.0
#1 0x1f7bc4bc in recvfrom (__addr_len=0x4b826898, __addr=0x4b826aa8,
__flags=0, __n=520, __buf=0x4b8268a0, __fd=<optimized out>)
at /usr/include/powerpc-linux-gnu/bits/socket2.h:77
#2 receive_dhcp (this=0x209e9e60) at dhcp_socket.c:575
#3 0x20669358 in execute (this=0x209ea110)
at processing/jobs/callback_job.c:199
#4 0x20669c50 in process_jobs (this=0x209d4dd0) at processing/processor.c:136
#5 0x2066c920 in thread_main (this=0x209ebb90) at threading/thread.c:291
#6 0x20575864 in start_thread () from /lib/powerpc-linux-gnu/libpthread.so.0
#7 0x204d1198 in clone () from /lib/powerpc-linux-gnu/libc.so.6
Thread 10 (Thread 0x480260c0 (LWP 6162)):
#0 0x2057f370 in do_sigwait () from /lib/powerpc-linux-gnu/libpthread.so.0
#1 0x2057f428 in sigwait () from /lib/powerpc-linux-gnu/libpthread.so.0
#2 0x206a3e8c in run () at charon.c:102
#3 main (argc=<optimized out>, argv=<optimized out>) at charon.c:582
---Type <return> to continue, or q <return> to quit---
[snip 8 threads in pthread_cond_wait]
Thread 1 (Thread 0x4e027490 (LWP 6176)):
#0 0x204211e0 in raise () from /lib/powerpc-linux-gnu/libc.so.6
#1 0x20426004 in abort () from /lib/powerpc-linux-gnu/libc.so.6
#2 0x206a4524 in segv_handler (signal=11) at charon.c:224
#3 <signal handler called>
---Type <return> to continue, or q <return> to quit---
#4 0x1fc7a174 in openssl_diffie_hellman_create (group=MODP_1536_BIT, g=...,
p=<error reading variable: Cannot access memory at address 0x0>)
at openssl_diffie_hellman.c:143
#5 0x2065a7e4 in create_dh (this=0x209d2c58, group=MODP_1536_BIT)
at crypto/crypto_factory.c:358
#6 0x205de738 in create_dh (this=<optimized out>, group=<optimized out>)
at sa/keymat.c:130
#7 0x205ec700 in build_i (this=0x209ed2d0, message=0x209eda48)
at sa/tasks/ike_init.c:248
#8 0x205dd32c in initiate (this=0x209ed140) at sa/task_manager.c:438
#9 initiate (this=0x209ed140) at sa/task_manager.c:282
(More stack frames follow...)
(gdb)
(gdb) disassemble openssl_diffie_hellman_create
Dump of assembler code for function openssl_diffie_hellman_create:
0x1fc7a120 <+0>: stwu r1,-48(r1)
0x1fc7a124 <+4>: mflr r0
0x1fc7a128 <+8>: bcl 20,4*cr7+so,0x1fc7a12c
<openssl_diffie_hellman_create+12>
0x1fc7a12c <+12>: stw r30,40(r1)
0x1fc7a130 <+16>: mflr r30
0x1fc7a134 <+20>: stw r0,52(r1)
0x1fc7a138 <+24>: stw r24,16(r1)
0x1fc7a13c <+28>: addis r30,r30,2
0x1fc7a140 <+32>: stw r25,20(r1)
0x1fc7a144 <+36>: addi r30,r30,1916
0x1fc7a148 <+40>: stw r26,24(r1)
0x1fc7a14c <+44>: lwz r0,-32764(r30)
0x1fc7a150 <+48>: stw r27,28(r1)
0x1fc7a154 <+52>: mtctr r0
0x1fc7a158 <+56>: stw r28,32(r1)
0x1fc7a15c <+60>: stw r29,36(r1)
0x1fc7a160 <+64>: mr r29,r3
0x1fc7a164 <+68>: li r3,44
0x1fc7a168 <+72>: stw r31,44(r1)
0x1fc7a16c <+76>: lwz r27,0(r4)
0x1fc7a170 <+80>: lwz r26,4(r4)
0x1fc7a174 <+84>: lwz r25,0(r5)
0x1fc7a178 <+88>: lwz r24,4(r5)
0x1fc7a17c <+92>: bctrl
0x1fc7a180 <+96>: li r4,0
0x1fc7a184 <+100>: li r5,44
0x1fc7a188 <+104>: lwz r0,-32760(r30)
0x1fc7a18c <+108>: mr r31,r3
0x1fc7a190 <+112>: mtctr r0
0x1fc7a194 <+116>: bctrl
0x1fc7a198 <+120>: lwz r0,-32708(r30)
0x1fc7a19c <+124>: lwz r28,-32692(r30)
0x1fc7a1a0 <+128>: stw r0,0(r31)
0x1fc7a1a4 <+132>: lwz r0,-32704(r30)
0x1fc7a1a8 <+136>: stw r28,16(r31)
0x1fc7a1ac <+140>: stw r0,4(r31)
0x1fc7a1b0 <+144>: lwz r0,-32700(r30)
0x1fc7a1b4 <+148>: stw r0,8(r31)
0x1fc7a1b8 <+152>: lwz r0,-32696(r30)
0x1fc7a1bc <+156>: stw r0,12(r31)
0x1fc7a1c0 <+160>: lwz r0,-32688(r30)
0x1fc7a1c4 <+164>: mtctr r0
0x1fc7a1c8 <+168>: bctrl
0x1fc7a1cc <+172>: cmpwi cr7,r3,0
0x1fc7a1d0 <+176>: stw r3,24(r31)
0x1fc7a1d4 <+180>: beq cr7,0x1fc7a38c
<openssl_diffie_hellman_create+620>
0x1fc7a1d8 <+184>: li r0,0
0x1fc7a1dc <+188>: sth r29,20(r31)
0x1fc7a1e0 <+192>: stb r0,40(r31)
0x1fc7a1e4 <+196>: lwz r0,-32684(r30)
0x1fc7a1e8 <+200>: mtctr r0
0x1fc7a1ec <+204>: bctrl
0x1fc7a1f0 <+208>: cmpwi cr7,r29,1025
0x1fc7a1f4 <+212>: lwz r9,-32736(r30)
0x1fc7a1f8 <+216>: stw r3,28(r31)
0x1fc7a1fc <+220>: lwz r10,0(r9)
0x1fc7a200 <+224>: lwz r11,4(r9)
0x1fc7a204 <+228>: stw r10,32(r31)
0x1fc7a208 <+232>: stw r11,36(r31)
0x1fc7a20c <+236>: beq cr7,0x1fc7a344
<openssl_diffie_hellman_create+548>
0x1fc7a210 <+240>: lwz r0,-32680(r30)
0x1fc7a214 <+244>: lhz r3,20(r31)
0x1fc7a218 <+248>: mtctr r0
0x1fc7a21c <+252>: bctrl
0x1fc7a220 <+256>: mr. r29,r3
0x1fc7a224 <+260>: beq 0x1fc7a304 <openssl_diffie_hellman_create+484>
0x1fc7a228 <+264>: lwz r9,-32748(r30)
0x1fc7a22c <+268>: li r5,0
0x1fc7a230 <+272>: lwz r4,4(r29)
0x1fc7a234 <+276>: mtctr r9
0x1fc7a238 <+280>: lwz r3,0(r29)
0x1fc7a23c <+284>: lwz r27,24(r31)
0x1fc7a240 <+288>: bctrl
0x1fc7a244 <+292>: lwz r9,-32748(r30)
0x1fc7a248 <+296>: li r5,0
0x1fc7a24c <+300>: stw r3,8(r27)
0x1fc7a250 <+304>: mtctr r9
0x1fc7a254 <+308>: lwz r4,12(r29)
0x1fc7a258 <+312>: lwz r3,8(r29)
0x1fc7a25c <+316>: lwz r27,24(r31)
0x1fc7a260 <+320>: bctrl
0x1fc7a264 <+324>: lwz r0,16(r29)
0x1fc7a268 <+328>: lwz r9,4(r29)
0x1fc7a26c <+332>: stw r3,12(r27)
0x1fc7a270 <+336>: cmpw cr7,r0,r9
0x1fc7a274 <+340>: lwz r3,24(r31)
0x1fc7a278 <+344>: beq cr7,0x1fc7a284
<openssl_diffie_hellman_create+356>
0x1fc7a27c <+348>: rlwinm r0,r0,3,0,28
0x1fc7a280 <+352>: stw r0,16(r3)
0x1fc7a284 <+356>: lwz r0,-32676(r30)
0x1fc7a288 <+360>: mtctr r0
0x1fc7a28c <+364>: bctrl
0x1fc7a290 <+368>: cmpwi cr7,r3,0
0x1fc7a294 <+372>: beq cr7,0x1fc7a304
<openssl_diffie_hellman_create+484>
0x1fc7a298 <+376>: lwz r9,24(r31)
0x1fc7a29c <+380>: lwz r0,-32756(r30)
0x1fc7a2a0 <+384>: lwz r3,24(r9)
0x1fc7a2a4 <+388>: mtctr r0
0x1fc7a2a8 <+392>: lwz r9,-32728(r30)
0x1fc7a2ac <+396>: lwz r29,0(r9)
0x1fc7a2b0 <+400>: bctrl
0x1fc7a2b4 <+404>: li r4,2
0x1fc7a2b8 <+408>: lwz r5,-32672(r30)
0x1fc7a2bc <+412>: mtctr r29
0x1fc7a2c0 <+416>: mr r6,r3
0x1fc7a2c4 <+420>: li r3,11
0x1fc7a2c8 <+424>: crclr 4*cr1+eq
0x1fc7a2cc <+428>: bctrl
0x1fc7a2d0 <+432>: mr r3,r31
0x1fc7a2d4 <+436>: lwz r0,52(r1)
0x1fc7a2d8 <+440>: lwz r24,16(r1)
0x1fc7a2dc <+444>: mtlr r0
0x1fc7a2e0 <+448>: lwz r25,20(r1)
0x1fc7a2e4 <+452>: lwz r26,24(r1)
0x1fc7a2e8 <+456>: lwz r27,28(r1)
0x1fc7a2ec <+460>: lwz r28,32(r1)
0x1fc7a2f0 <+464>: lwz r29,36(r1)
0x1fc7a2f4 <+468>: lwz r30,40(r1)
0x1fc7a2f8 <+472>: lwz r31,44(r1)
0x1fc7a2fc <+476>: addi r1,r1,48
0x1fc7a300 <+480>: blr
0x1fc7a304 <+484>: mr r3,r31
0x1fc7a308 <+488>: mtctr r28
0x1fc7a30c <+492>: bctrl
0x1fc7a310 <+496>: lwz r0,52(r1)
0x1fc7a314 <+500>: li r3,0
0x1fc7a318 <+504>: lwz r24,16(r1)
0x1fc7a31c <+508>: mtlr r0
0x1fc7a320 <+512>: lwz r25,20(r1)
0x1fc7a324 <+516>: lwz r26,24(r1)
0x1fc7a328 <+520>: lwz r27,28(r1)
0x1fc7a32c <+524>: lwz r28,32(r1)
0x1fc7a330 <+528>: lwz r29,36(r1)
0x1fc7a334 <+532>: lwz r30,40(r1)
0x1fc7a338 <+536>: lwz r31,44(r1)
0x1fc7a33c <+540>: addi r1,r1,48
0x1fc7a340 <+544>: blr
0x1fc7a344 <+548>: lwz r9,-32748(r30)
0x1fc7a348 <+552>: mr r4,r24
0x1fc7a34c <+556>: li r5,0
0x1fc7a350 <+560>: mr r3,r25
0x1fc7a354 <+564>: lwz r29,24(r31)
0x1fc7a358 <+568>: mtctr r9
0x1fc7a35c <+572>: bctrl
0x1fc7a360 <+576>: lwz r9,-32748(r30)
0x1fc7a364 <+580>: mr r4,r26
0x1fc7a368 <+584>: li r5,0
0x1fc7a36c <+588>: stw r3,8(r29)
0x1fc7a370 <+592>: mr r3,r27
0x1fc7a374 <+596>: mtctr r9
0x1fc7a378 <+600>: lwz r29,24(r31)
0x1fc7a37c <+604>: bctrl
0x1fc7a380 <+608>: stw r3,12(r29)
0x1fc7a384 <+612>: lwz r3,24(r31)
0x1fc7a388 <+616>: b 0x1fc7a284 <openssl_diffie_hellman_create+356>
---Type <return> to continue, or q <return> to quit---
0x1fc7a38c <+620>: lwz r0,-32740(r30)
0x1fc7a390 <+624>: mr r3,r31
0x1fc7a394 <+628>: mtctr r0
0x1fc7a398 <+632>: bctrl
0x1fc7a39c <+636>: li r3,0
0x1fc7a3a0 <+640>: b 0x1fc7a2d4 <openssl_diffie_hellman_create+436>
End of assembler dump.
(gdb) quit
#
Thanks!
More information about the Users
mailing list