2

我在使用带 openssl 的 Multithread 时遇到问题。

环境: Linux centOS232 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

错误是段错误!和 clent 出口。

核心堆栈:

0 asn1_d2i_ex_primitive (pval=0x640280, in=0x7ffff6ffe140, inlen=9, it=0x7ffff77f0840, tag=-1, aclass=0, opt=0 '\000', ctx=0x7ffff6ffebd0) at tasn_dec.c:770

1 0x00007ffff75413f2 in ASN1_item_ex_d2i (pval=0x640280, in=0x7ffff6ffe140, len=9, it=0x7ffff77f0840, tag=-1, aclass=, opt=0 '\000', ctx=0x7ffff6ffebd0) at tasn_dec.c:233

2 0x00007ffff7541ba9 in asn1_template_noexp_d2i (val=0x640280, in=0x7ffff6ffe290, len=9, tt=0x7ffff77f6a40, opt=, ctx=0x7ffff6ffebd0) at tasn_dec.c:746

3 0x00007ffff7541eac in asn1_template_ex_d2i (val=0x640280, in=0x7ffff6ffe290, inlen=, tt=0x7ffff77f6a40, opt=, ctx=0x7ffff6ffebd0) at tasn_dec.c:607

4 0x00007ffff75415ca in ASN1_item_ex_d2i (pval=0x7ffff6ffe328, in=0x7ffff6ffe330, len=9, it=0x7ffff77f01e0, tag=, aclass=, opt=0 '\000', ctx=0x7ffff6ffebd0) at tasn_dec.c:448

5 0x00007ffff7541c8f in asn1_template_noexp_d2i (val=0x7ffff6ffe518, in=0x7ffff6ffe520, len=11, tt=0x7ffff77f6aa0, opt=, ctx=0x7ffff6ffebd0) at tasn_dec.c:706

6 0x00007ffff7541eac in asn1_template_ex_d2i (val=0x7ffff6ffe518, in=0x7ffff6ffe520, inlen=, tt=0x7ffff77f6aa0, opt=, ctx=0x7ffff6ffebd0) at tasn_dec.c:607

7 0x00007ffff75414c5 in ASN1_item_ex_d2i (pval=0x7ffff6ffe518, in=0x7ffff6ffe520, len=98, it=0x7ffff77f0220, tag=-1, aclass=, opt=0 '\000', ctx=0x7ffff6ffebd0) at tasn_dec.c:

8 0x00007ffff7541c8f in asn1_template_noexp_d2i (val=0x7ffff6ffe6e0, in=0x7ffff6ffe6e8, len=98, tt=0x7ffff77f6ae0, opt=, ctx=0x7ffff6ffebd0) at tasn_dec.c:706

9 0x00007ffff7541eac in asn1_template_ex_d2i (val=0x7ffff6ffe6e0, in=0x7ffff6ffe6e8, inlen=, tt=0x7ffff77f6ae0, opt=, ctx=0x7ffff6ffebd0) at tasn_dec.c:607

10 0x00007ffff75414c5 in ASN1_item_ex_d2i (pval=0x7ffff6ffe6e0, in=0x7ffff6ffe6e8, len=410, it=0x7ffff77f0260, tag=-1, aclass=, opt=0 '\000', ctx=0x7ffff6ffebd10) 在 tasn_dec.

11 0x00007ffff753a705 in x509_name_ex_d2i (val=0x63d6f8, in=0x7ffff6ffe830, len=, it=, tag=, aclass=, opt=0 '\000', ctx=0x7ffff6ffebd0) 在 x_name.c:186

12 0x00007ffff7541083 in ASN1_item_ex_d2i (pval=0x63d6f8, in=0x7ffff6ffe830, len=410, it=0x7ffff77f6a00, tag=-1, aclass=, opt=0 '\000', ctx=0x7ffff6ffebd0) at tasn_dec.c:

13 0x00007ffff7541ba9 in asn1_template_noexp_d2i (val=0x63d6f8, in=0x7ffff6ffe980, len=410, tt=0x7ffff77f6b98, opt=, ctx=0x7ffff6ffebd0) at tasn_dec.c:746

14 0x00007ffff7541eac in asn1_template_ex_d2i (val=0x63d6f8, in=0x7ffff6ffe980, inlen=, tt=0x7ffff77f6b98, opt=, ctx=0x7ffff6ffebd0) at tasn_dec.c:607

15 0x00007ffff75415ca in ASN1_item_ex_d2i (pval=0x63d620, in=0x7ffff6ffea20, len=410, it=0x7ffff77f02e0, tag=, aclass=, opt=0 '\000', ctx=0x7ffff6ffebd0) at tasn_dec.c:448

16 0x00007ffff7541ba9 in asn1_template_noexp_d2i (val=0x63d620, in=0x7ffff6ffeb70, len=587, tt=0x7ffff77f6cc0, opt=, ctx=0x7ffff6ffebd0) at tasn_dec.c:746

17 0x00007ffff7541eac in asn1_template_ex_d2i (val=0x63d620, in=0x7ffff6ffeb70, inlen=, tt=0x7ffff77f6cc0, opt=, ctx=0x7ffff6ffebd0) at tasn_dec.c:607

18 0x00007ffff75415ca in ASN1_item_ex_d2i (pval=0x7ffff6ffebf8, in=0x7ffff6ffec20, len=587, it=0x7ffff77f0320, tag=, aclass=, opt=0 '\000', ctx=0x7ffff6ffebd0) at tasn_dec.c8:4

19 0x00007ffff7542024 in ASN1_item_d2i (pval=0x7ffff6ffebf8, in=, len=, it=) at tasn_dec.c:136

20 0x00007ffff7830c3c 在 ssl3_get_server_certificate (s=0x62a870) 在 s3_clnt.c:1125

21 0x00007ffff7832332 in ssl3_connect (s=0x62a870) at s3_clnt.c:334

22 0x00007ffff783a3bc 在 ssl23_get_server_hello (s=0x62a870) 在 s23_clnt.c:743

23 ssl23_connect (s=0x62a870) 在 s23_clnt.c:226

24 0x00007ffff7ab85fa in ZCY_SSL_create (ssl=0x626940, ssl_ctx=, bio_ctx=0x626948) at ssl_cliapi.c:267

25 0x00007ffff701bf12 在 Cli_Login (gid=0x7ffff6fff7a0, err=0x7ffff6fff390) at capi.c:1146

26 0x00007ffff7a89568 在登录 (gid=0x7ffff6fff7a0, err=0x7ffff6fff390) 在 tmcapi.c:137

27 0x00000000004022cb 在 ssl_get_send.c:337 的 send_msg (argv=0x605ed0)

28 0x0000003efd407851 in start_thread () from /lib64/libpthread.so.0

29 0x0000003efd0e811d 来自 /lib64/libc.so.6 的克隆 ()

线程支持:

我已经在 ssl 代码中设置了回调,例如 "crypto/threads/mttest.c" 中的示例。

问题:但是在另一台机器上的代码相同2[Linux ph-suse 2.6.27.19-5-default #1 SMP 2009-02-28 04:40:21 +0100 x86_64 x86_64 x86_64 GNU/Linux]是成功的。我使用了'ldd' 检查机器 2 中的库是否不同,但它们是相同的。

道歉,我是英语泳池。

谁能帮我?谢谢你!

4

0 回答 0