Skip to content

Instantly share code, notes, and snippets.

@martinhbramwell
Created May 17, 2012 16:19
Show Gist options
  • Save martinhbramwell/2719957 to your computer and use it in GitHub Desktop.
Save martinhbramwell/2719957 to your computer and use it in GitHub Desktop.
Debug de ugly buglet
I built with ...
chef@cgf:~/ot/Open-Transactions$ cd ~ && mkdir -p .ot && cd ot/Open-Transactions && sudo make uninstall && make clean && make DSP=1 java && make DSP=1 && sudo make install
... then with ...
chef@cgf:~/ot/Open-Transactions$ make clean && make DSP=1 debug
... then ...
chef@cgf:~/ot/Open-Transactions$
chef@cgf:~/ot/Open-Transactions$
chef@cgf:~/ot/Open-Transactions$ gdb transaction/transaction.debug
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 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 "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/chef/ot/Open-Transactions/transaction/transaction.debug...done.
(gdb) run
Starting program: /home/chef/ot/Open-Transactions/transaction/transaction.debug
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
[Thread debugging using libthread_db enabled]
Welcome to Open Transactions... Test Server -- version 0.80f
(transport build: OTMessage -> OTEnvelope -> ZMQ )
server main: Reading ini file (/home/chef/.ot/ot_init.cfg).
Found Server data_folder path: ~/.ot/server_data
Using data_folder path: /home/chef/.ot/server_data
Now loading the server nym, which will also ask you for a password, to unlock
its private key. (Default password is "".)
Setting logfile: /home/chef/.ot/log-server.log
Setting log level: 0
Setting cron refill_trans_number: 500
Setting cron ms_between_cron_beats: 10000
Setting heartbeat_no_requests: 10
Setting heartbeat ms_between_beats: 100
Setting latency blocking: false
Setting latency send_fail_no_tries: 2
Setting latency send_fail_max_ms: 5000
Setting permissions override_nym_id: T1Q3wZWgeTUoaUvn9m1lzIK5tn5wITlzxzrGNI8qtaV
Setting markets minimum_scale: 1
Setting security master_key_timeout: -1
Setting permissions admin_usage_credits to: false
Setting permissions admin_server_locked to: false
Setting permissions cmd_usage_credits to: false
Setting permissions cmd_issue_asset to: true
Setting permissions cmd_get_contract to: true
Setting permissions cmd_check_server_id to: true
Setting permissions cmd_create_user_acct to: true
Setting permissions cmd_del_user_acct to: true
Setting permissions cmd_check_user to: true
Setting permissions cmd_get_request to: true
Setting permissions cmd_get_trans_num to: true
Setting permissions cmd_send_message to: true
Setting permissions cmd_get_nymbox to: true
Setting permissions cmd_process_nymbox to: true
Setting permissions cmd_create_asset_acct to: true
Setting permissions cmd_del_asset_acct to: true
Setting permissions cmd_get_acct to: true
Setting permissions cmd_get_inbox to: true
Setting permissions cmd_get_outbox to: true
Setting permissions cmd_process_inbox to: true
Setting permissions cmd_issue_basket to: false
Setting permissions transact_exchange_basket to: true
Setting permissions cmd_notarize_transaction to: true
Setting permissions transact_process_inbox to: true
Setting permissions transact_transfer to: true
Setting permissions transact_withdrawal to: true
Setting permissions transact_deposit to: true
Setting permissions transact_withdraw_voucher to: true
Setting permissions transact_deposit_cheque to: true
Setting permissions cmd_get_mint to: true
Setting permissions transact_withdraw_cash to: true
Setting permissions transact_deposit_cash to: true
Setting permissions cmd_get_market_list to: true
Setting permissions cmd_get_market_offers to: true
Setting permissions cmd_get_market_recent_trades to: true
Setting permissions cmd_get_nym_market_offers to: true
Setting permissions transact_market_offer to: true
Setting permissions transact_payment_plan to: true
Setting permissions transact_cancel_cron_item to: true
Setting permissions transact_smart_contract to: true
Setting permissions cmd_trigger_clause to: true
OTDB::InitDefaultStorage: Existing storage context doesn't already exist. (Creating it.)
StorageFS::Init: New path segments are: /home/chef/.ot/server_data notaryServer.xml
Created folder: /home/chef/.ot/server_data/smartcontracts
Created folder: /home/chef/.ot/server_data/spent
Loading Open Transactions server. File version: 1.0
Last Issued Transaction Number: 579
ServerID:
tBy5mL14qSQXCJK7Uz3WlTOKRP9M0JZksA3Eg7EnnQ1
PLEASE SIGN YOUR PASSPHRASE, for: "OTAsymmetricKey::LoadPrivateKeyFromCertString is calling PEM_read_bio_PrivateKey..."
(OT) passphrase:
*** glibc detected *** /home/chef/ot/Open-Transactions/transaction/transaction.debug: malloc(): memory corruption: 0x0000000000b94cb0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7a87a)[0x7ffff5f6f87a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x6e)[0x7ffff5f71e1e]
/usr/local/lib/libcrypto.so.1.0.0(CRYPTO_malloc+0x5e)[0x7ffff77fd68e]
/usr/local/lib/libcrypto.so.1.0.0(EVP_CipherInit_ex+0x329)[0x7ffff7888fe9]
/usr/local/lib/libcrypto.so.1.0.0(PEM_do_header+0xee)[0x7ffff78b54ce]
/usr/local/lib/libcrypto.so.1.0.0(PEM_bytes_read_bio+0x3ca)[0x7ffff78b6f1a]
/usr/local/lib/libcrypto.so.1.0.0(PEM_read_bio_PrivateKey+0x7f)[0x7ffff78b8ddf]
/home/chef/ot/Open-Transactions/transaction/transaction.debug[0x51fa2f]
/home/chef/ot/Open-Transactions/transaction/transaction.debug[0x51fee0]
/home/chef/ot/Open-Transactions/transaction/transaction.debug[0x49c4fc]
/home/chef/ot/Open-Transactions/transaction/transaction.debug[0x422cac]
/home/chef/ot/Open-Transactions/transaction/transaction.debug[0x423943]
/home/chef/ot/Open-Transactions/transaction/transaction.debug[0x422b16]
/home/chef/ot/Open-Transactions/transaction/transaction.debug[0x44f924]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xff)[0x7ffff5f13eff]
/home/chef/ot/Open-Transactions/transaction/transaction.debug[0x411539]
======= Memory map: ========
00400000-00966000 r-xp 00000000 08:02 12059500 /home/chef/ot/Open-Transactions/transaction/transaction.debug
00b65000-00b66000 r--p 00565000 08:02 12059500 /home/chef/ot/Open-Transactions/transaction/transaction.debug
00b66000-00b68000 rw-p 00566000 08:02 12059500 /home/chef/ot/Open-Transactions/transaction/transaction.debug
00b68000-00bab000 rw-p 00000000 00:00 0 [heap]
7ffff0000000-7ffff0021000 rw-p 00000000 00:00 0
7ffff0021000-7ffff4000000 ---p 00000000 00:00 0
7ffff5531000-7ffff58d0000 rw-p 00000000 00:00 0
7ffff58d0000-7ffff58d4000 r-xp 00000000 08:02 1993024 /lib/x86_64-linux-gnu/libuuid.so.1.3.0
7ffff58d4000-7ffff5ad3000 ---p 00004000 08:02 1993024 /lib/x86_64-linux-gnu/libuuid.so.1.3.0
7ffff5ad3000-7ffff5ad4000 r--p 00003000 08:02 1993024 /lib/x86_64-linux-gnu/libuuid.so.1.3.0
7ffff5ad4000-7ffff5ad5000 rw-p 00004000 08:02 1993024 /lib/x86_64-linux-gnu/libuuid.so.1.3.0
7ffff5ad5000-7ffff5aec000 r-xp 00000000 08:02 1992997 /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7ffff5aec000-7ffff5ceb000 ---p 00017000 08:02 1992997 /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7ffff5ceb000-7ffff5cec000 r--p 00016000 08:02 1992997 /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7ffff5cec000-7ffff5ced000 rw-p 00017000 08:02 1992997 /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7ffff5ced000-7ffff5cf4000 r-xp 00000000 08:02 1993295 /lib/x86_64-linux-gnu/librt-2.13.so
7ffff5cf4000-7ffff5ef3000 ---p 00007000 08:02 1993295 /lib/x86_64-linux-gnu/librt-2.13.so
7ffff5ef3000-7ffff5ef4000 r--p 00006000 08:02 1993295 /lib/x86_64-linux-gnu/librt-2.13.so
7ffff5ef4000-7ffff5ef5000 rw-p 00007000 08:02 1993295 /lib/x86_64-linux-gnu/librt-2.13.so
7ffff5ef5000-7ffff607f000 r-xp 00000000 08:02 1993175 /lib/x86_64-linux-gnu/libc-2.13.so
7ffff607f000-7ffff627f000 ---p 0018a000 08:02 1993175 /lib/x86_64-linux-gnu/libc-2.13.so
7ffff627f000-7ffff6283000 r--p 0018a000 08:02 1993175 /lib/x86_64-linux-gnu/libc-2.13.so
7ffff6283000-7ffff6284000 rw-p 0018e000 08:02 1993175 /lib/x86_64-linux-gnu/libc-2.13.so
7ffff6284000-7ffff628a000 rw-p 00000000 00:00 0
7ffff628a000-7ffff629f000 r-xp 00000000 08:02 1993026 /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff629f000-7ffff649e000 ---p 00015000 08:02 1993026 /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff649e000-7ffff649f000 r--p 00014000 08:02 1993026 /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff649f000-7ffff64a0000 rw-p 00015000 08:02 1993026 /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff64a0000-7ffff6524000 r-xp 00000000 08:02 1993212 /lib/x86_64-linux-gnu/libm-2.13.so
7ffff6524000-7ffff6723000 ---p 00084000 08:02 1993212 /lib/x86_64-linux-gnu/libm-2.13.so
7ffff6723000-7ffff6724000 r--p 00083000 08:02 1993212 /lib/x86_64-linux-gnu/libm-2.13.so
7ffff6724000-7ffff6725000 rw-p 00084000 08:02 1993212 /lib/x86_64-linux-gnu/libm-2.13.so
7ffff6725000-7ffff680d000 r-xp 00000000 08:02 3581516 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.14
7ffff680d000-7ffff6a0c000 ---p 000e8000 08:02 3581516 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.14
7ffff6a0c000-7ffff6a14000 r--p 000e7000 08:02 3581516 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.14
7ffff6a14000-7ffff6a16000 rw-p 000ef000 08:02 3581516 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.14
7ffff6a16000-7ffff6a2b000 rw-p 00000000 00:00 0
7ffff6a2b000-7ffff6a43000 r-xp 00000000 08:02 1993293 /lib/x86_64-linux-gnu/libpthread-2.13.so
7ffff6a43000-7ffff6c43000 ---p 00018000 08:02 1993293 /lib/x86_64-linux-gnu/libpthread-2.13.so
7ffff6c43000-7ffff6c44000 r--p 00018000 08:02 1993293 /lib/x86_64-linux-gnu/libpthread-2.13.so
7ffff6c44000-7ffff6c45000 rw-p 00019000 08:02 1993293 /lib/x86_64-linux-gnu/libpthread-2.13.so
7ffff6c45000-7ffff6c49000 rw-p 00000000 00:00 0
7ffff6c49000-7ffff6c4b000 r-xp 00000000 08:02 1993206 /lib/x86_64-linux-gnu/libdl-2.13.so
7ffff6c4b000-7ffff6e4b000 ---p 00002000 08:02 1993206 /lib/x86_64-linux-gnu/libdl-2.13.so
7ffff6e4b000-7ffff6e4c000 r--p 00002000 08:02 1993206 /lib/x86_64-linux-gnu/libdl-2.13.so
7ffff6e4c000-7ffff6e4d000 rw-p 00003000 08:02 1993206 /lib/x86_64-linux-gnu/libdl-2.13.so
7ffff6e4d000-7ffff6e80000 r-xp 00000000 08:02 9316956 /usr/local/lib/libzmq.so.1.0.1
7ffff6e80000-7ffff7080000 ---p 00033000 08:02 9316956 /usr/local/lib/libzmq.so.1.0.1
7ffff7080000-7ffff7083000 r--p 00033000 08:02 9316956 /usr/local/lib/libzmq.so.1.0.1
7ffff7083000-7ffff7084000 rw-p 00036000 08:02 9316956 /usr/local/lib/libzmq.so.1.0.1
Program received signal SIGABRT, Aborted.
0x00007ffff5f28d05 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment