[Pkg-haskell-maintainers] Bug#783389: hbro segfaults

Bernhard Übelacker bernhardu at vr-web.de
Mon Apr 27 19:28:02 UTC 2015


Hello,
tried to reproduce the issue:

Without debug symbols installed this stack is visible:
(gdb) bt
#0  0x083b6518 in ?? ()
#1  0x083ae0ed in ?? ()
#2  0xb4dda944 in __gmpz_init () from /usr/lib/i386-linux-gnu/libgmp.so.10
#3  0xac38b11c in ?? () from /usr/lib/i386-linux-gnu/libgnutls-deb0.so.28
#4  0xac2e7783 in ?? () from /usr/lib/i386-linux-gnu/libgnutls-deb0.so.28
#5  0xac2e7c65 in ?? () from /usr/lib/i386-linux-gnu/libgnutls-deb0.so.28
#6  0xac315be4 in ?? () from /usr/lib/i386-linux-gnu/libgnutls-deb0.so.28
#7  0xac32095b in ?? () from /usr/lib/i386-linux-gnu/libgnutls-deb0.so.28
#8  0xac313590 in ?? () from /usr/lib/i386-linux-gnu/libgnutls-deb0.so.28
#9  0xac339697 in gnutls_x509_crt_get_pk_algorithm () from /usr/lib/i386-linux-gnu/libgnutls-deb0.so.28
#10 0xac2fa693 in gnutls_pubkey_import_x509 () from /usr/lib/i386-linux-gnu/libgnutls-deb0.so.28
#11 0xac2f9a29 in gnutls_pcert_import_x509 () from /usr/lib/i386-linux-gnu/libgnutls-deb0.so.28
#12 0xac2f9b60 in gnutls_pcert_import_x509_raw () from /usr/lib/i386-linux-gnu/libgnutls-deb0.so.28
#13 0xac356a18 in ?? () from /usr/lib/i386-linux-gnu/libgnutls-deb0.so.28
#14 0xac2ddb79 in ?? () from /usr/lib/i386-linux-gnu/libgnutls-deb0.so.28
#15 0xac2da579 in gnutls_handshake () from /usr/lib/i386-linux-gnu/libgnutls-deb0.so.28
#16 0xac442591 in ?? () from /usr/lib/i386-linux-gnu/gio/modules/libgiognutls.so
#17 0xac442a26 in ?? () from /usr/lib/i386-linux-gnu/gio/modules/libgiognutls.so
#18 0xb509eb2f in ?? () from /usr/lib/i386-linux-gnu/libgio-2.0.so.0
#19 0xb4f0ce64 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#20 0xb4f0c3da in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#21 0xb4e54efb in start_thread (arg=0xad458b40) at pthread_create.c:309
#22 0xb4cb062e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129



After installing libgnutls28-dbg glib-networking-dbg libglib2.0-0-dbg,
locally building libgmp.so.10 and hbro the stack looks like this:


export LD_LIBRARY_PATH=/home/benutzer/libgmp10/gmp-6.0.0+dfsg/build/tests/cxx/.libs
gdb --args /home/benutzer/hbro/hbro-1.1.2.2/dist-ghc/build/hbro/hbro
...
(gdb) b __gmp_set_memory_functions
Breakpoint 1, __gmp_set_memory_functions (alloc_func=0x83ae180 <stgAllocForGMP>, realloc_func=0x83ae1c0 <stgReallocForGMP>, free_func=0x83ae170 <stgDeallocForGMP>) at ../mp_set_fns.c:39
39      {
(gdb) bt
#0  __gmp_set_memory_functions (alloc_func=0x83ae180 <stgAllocForGMP>, realloc_func=0x83ae1c0 <stgReallocForGMP>, free_func=0x83ae170 <stgDeallocForGMP>) at ../mp_set_fns.c:39
#1  0x0805a697 in initAllocForGMP ()
#2  0x083da152 in __libc_csu_init ()
#3  0xb4bdf9fa in __libc_start_main (main=0x805f8d1 <main>, argc=1, argv=0xbffff6f4, init=0x83da100 <__libc_csu_init>, fini=0x83da170 <__libc_csu_fini>, rtld_fini=0xb7fedc90 <_dl_fini>, stack_end=0xbffff6ec) at libc-start.c:246
#4  0x0805f752 in _start ()
(gdb) cont
...
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xacc56b40 (LWP 23824)]
0x083b65b8 in rts_unsafeGetMyCapability ()
(gdb) bt
#0  0x083b65b8 in rts_unsafeGetMyCapability ()
#1  0x083ae18d in stgAllocForGMP ()
#2  0xb4dd9b54 in __gmpz_init (x=0xb15100b0) at ../../mpz/init.c:38
#3  0xac38a11c in wrap_nettle_mpi_init (w=0xacc55738) at mpi.c:82
#4  0xac2e6783 in _gnutls_mpi_init_scan (ret_mpi=0xacc55980, buffer=0xb150a108, nbytes=257) at gnutls_mpi.c:118
#5  0xac2e6c65 in __gnutls_x509_read_int (node=<optimized out>, value=0xac3925ef "modulus", ret_mpi=0xacc55980, overwrite=0) at gnutls_mpi.c:306
#6  0xac2e71dd in _gnutls_x509_read_int (node=<optimized out>, value=<optimized out>, ret_mpi=0xacc55980) at gnutls_mpi.c:324
#7  0xac314be4 in _gnutls_x509_read_rsa_pubkey (params=0xacc55980, dersize=270, der=0xb150d9e8 "0\202\001\n\002\202\001\001") at key_decode.c:73
#8  _gnutls_x509_read_pubkey (algo=GNUTLS_PK_RSA, der=0xb150d9e8 "0\202\001\n\002\202\001\001", dersize=270, params=0xacc55980) at key_decode.c:242
#9  0xac31f95b in _gnutls_get_asn_mpis (asn=0xb1501038, root=0xac3931d0 "tbsCertificate.subjectPublicKeyInfo", params=0xacc55980) at mpi.c:102
#10 0xac312590 in _gnutls_x509_get_pk_algorithm (src=0xb1501038, src_name=0xac3931d0 "tbsCertificate.subjectPublicKeyInfo", bits=0xb1503a3c) at common.c:1502
#11 0xac338697 in gnutls_x509_crt_get_pk_algorithm (cert=0xb1501000, bits=0xb1503a3c) at x509.c:1094
#12 0xac2f9693 in gnutls_pubkey_import_x509 (key=0xb1503a38, crt=0xb1501000, flags=0) at gnutls_pubkey.c:162
#13 0xac2f8a29 in gnutls_pcert_import_x509 (pcert=0xb1500fd8, crt=0xb1501000, flags=0) at gnutls_pcert.c:71
#14 0xac2f8b60 in gnutls_pcert_import_x509_raw (pcert=0xb1500fd8, cert=0xacc55bbc, format=GNUTLS_X509_FMT_DER, flags=0) at gnutls_pcert.c:191
#15 0xac355a18 in _gnutls_proc_x509_server_crt (data_size=<optimized out>, data=<optimized out>, session=<optimized out>) at cert.c:1111
#16 _gnutls_proc_crt (session=0xb1501986, data=0xb1500fd8 "8:P\261\360\233P\261\023\005", data_size=2479) at cert.c:1375
#17 0xac2dcb79 in _gnutls_recv_server_certificate (session=0x857aff0) at gnutls_kx.c:634
#18 0xac2d9579 in handshake_client (session=0x857aff0) at gnutls_handshake.c:2716
#19 gnutls_handshake (session=0x857aff0) at gnutls_handshake.c:2548
#20 0xac441591 in handshake_thread (task=0x855a5e8, object=0x84d8240, task_data=0x0, cancellable=0x854a350) at gtlsconnection-gnutls.c:1188
#21 0xac441a26 in async_handshake_thread (task=0x855a5e8, object=0x84d8240, task_data=0x0, cancellable=0x854a350) at gtlsconnection-gnutls.c:1376
#22 0xb509db2f in g_task_thread_pool_thread (thread_data=0x855a5e8, pool_data=0x0) at /build/glib2.0-EvFudu/glib2.0-2.42.1/./gio/gtask.c:1215
#23 0xb4f0be64 in g_thread_pool_thread_proxy (data=0x85560f0) at /build/glib2.0-EvFudu/glib2.0-2.42.1/./glib/gthreadpool.c:307
#24 0xb4f0b3da in g_thread_proxy (data=0x84c4890) at /build/glib2.0-EvFudu/glib2.0-2.42.1/./glib/gthread.c:764
#25 0xb4e53efb in start_thread (arg=0xacc56b40) at pthread_create.c:309
#26 0xb4caf62e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129
(gdb)



This exact same problem seems to be discussed at [1] already.

But I am not sure if they came to a solution applicable here.


Kind regards,
Bernhard


[1] http://sourceforge.net/p/gtk2hs/mailman/gtk2hs-users/?viewmonth=201405



More information about the Pkg-haskell-maintainers mailing list