Comment 2 for bug 1597450

Brian Morton (rokclimb15) wrote :

Zesty 0.8.0-1 is the current FTBFS. I was able to progress the debugging a bit and something is scribbling on the stack. The problem I'm experiencing is gdb disables breakpoints in the shared lib I need to examine the stack canary address.

Starting program: /usr/sbin/apache2 -X -f /home/bmorton/mod-gnutls-0.8.0/test/tests/24_pkcs11_cert/apache.conf -k start
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/".
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using Set the 'ServerName' directive globally to suppress this message
warning: Temporarily disabling breakpoints for unloaded shared library "/usr/lib/i386-linux-gnu/"
*** stack smashing detected ***: /usr/sbin/apache2 terminated

Program received signal SIGABRT, Aborted.
0xb7fd9cf9 in __kernel_vsyscall ()
(gdb) bt
#0 0xb7fd9cf9 in __kernel_vsyscall ()
#1 0xb7d47050 in __libc_signal_restore_set (set=0xbfffe5cc) at ../sysdeps/unix/sysv/linux/nptl-signals.h:79
#2 __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#3 0xb7d48577 in __GI_abort () at abort.c:89
#4 0xb7d82f4f in __libc_message (do_abort=<optimized out>, fmt=<optimized out>) at ../sysdeps/posix/libc_fatal.c:175
#5 0xb7e14c78 in __GI___fortify_fail (msg=<optimized out>) at fortify_fail.c:37
#6 0xb7e14c18 in __stack_chk_fail () at stack_chk_fail.c:28
#7 0xb79c95e4 in __stack_chk_fail_local () from /usr/lib/i386-linux-gnu/
#8 0xb79a57e6 in proxy_C_GenerateKey (self=0xb6d3a9f0 <std::unique_ptr<MutexFactory, std::default_delete<MutexFactory> >::get() const+28>, handle=2148314568, mechanism=0xb79c95e4 <_fini>, template=0xb7e14c05 <__stack_chk_fail+5>,
    count=3221220068, key=0x0) at p11-kit/proxy.c:1470
#9 0xb6d3a53d in Mutex::lock (this=0x800b9840) at MutexFactory.cpp:60
#10 0xb6d3a5cd in MutexLocker::MutexLocker (this=0xbfffea48, inMutex=0x800b9840) at MutexFactory.cpp:81
#11 0xb6d7f31f in Token::getTokenInfo (this=0x800cc198, info=0xbfffec20) at Token.cpp:410
#12 0xb6d0a384 in SoftHSM::C_GetTokenInfo (this=0x800c4310, slotID=1566642341, pInfo=0xbfffec20) at SoftHSM.cpp:601
#13 0xb6ceca45 in C_GetTokenInfo (slotID=1566642341, pInfo=0xbfffec20) at main.cpp:220
#14 0xb7b1367c in pkcs11_get_token_info (module=0x800bc470, slot_id=1566642341, info=0xbfffec20) at pkcs11_int.c:65
#15 0xb7b02f1f in _pkcs11_traverse_tokens (find_func=0xb7b0490f <find_obj_url_cb>, input=0xbfffef04, info=0x800bd8c0, pin_info=0x800b4f04, flags=2) at pkcs11.c:1342
#16 0xb7b04eb8 in gnutls_pkcs11_obj_import_url (obj=0x800b4ec0,
    url=0xb7c39c48 "pkcs11:model=SoftHSM%20v2;manufacturer=SoftHSM%20project;serial=230076e3dd6110a5;token=mod_gnutls-test;id=%d5%32%8e%a4%57%da%03%cf%84%2a%51%14%69%c9%9d%50%d2%8a%6b%12;object=certificate;type=cert", flags=1)
    at pkcs11.c:2068
#17 0xb7c4aa14 in mgs_load_files (pconf=<optimized out>, ptemp=<optimized out>, s=<optimized out>) at gnutls_config.c:332
#18 0xb7c4f7ea in mgs_hook_post_config (pconf=0xb7fcc018, plog=0xb7c8a018, ptemp=0xb7c86018, base_server=0xb7c8cf18) at gnutls_hooks.c:405
#19 0x80046370 in ap_run_post_config (pconf=0xb7fcc018, plog=0xb7c8a018, ptemp=0xb7c86018, s=0xb7c8cf18) at config.c:103
#20 0x80023dff in main (argc=<optimized out>, argv=<optimized out>) at main.c:771