From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1378 invoked by alias); 27 Aug 2012 16:05:19 -0000 Received: (qmail 1348 invoked by uid 22791); 27 Aug 2012 16:05:14 -0000 X-SWARE-Spam-Status: No, hits=-4.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_XB X-Spam-Check-By: sourceware.org Received: from mail-vb0-f41.google.com (HELO mail-vb0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 27 Aug 2012 16:05:00 +0000 Received: by vbkv13 with SMTP id v13so5303984vbk.0 for ; Mon, 27 Aug 2012 09:04:59 -0700 (PDT) Received: by 10.52.175.130 with SMTP id ca2mr9348174vdc.112.1346083499702; Mon, 27 Aug 2012 09:04:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.221.1.205 with HTTP; Mon, 27 Aug 2012 09:04:38 -0700 (PDT) In-Reply-To: <87sjbdo2z4.fsf@fleche.redhat.com> References: <87k3wpr9uy.fsf@fleche.redhat.com> <87sjbdo2z4.fsf@fleche.redhat.com> From: Kevin Pouget Date: Mon, 27 Aug 2012 16:05:00 -0000 Message-ID: Subject: Re: GDB crashing because of Python To: Tom Tromey Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00087.txt.bz2 On Thu, Aug 23, 2012 at 8:52 PM, Tom Tromey wrote: > > Kevin> I'm on Fedora 17, x86_64, Python seems to be at version 2.7.3, gdb is > Kevin> up to date against the trunk (7.5.50.20120823-cvs) > > I installed F17 in a mock chroot and ran the latest gdb there. > This isn't an identical scenario due to possible kernel differences, but > I wouldn't expect those to matter. > > >> Fatal Python error: GC object already tracked > > Kevin> this one appears when I start the inferior execution, and start it again > > I couldn't make it crash. > What happens if you run under valgrind? > When I do that, I see some output, but nothing that looks too serious > and/or new. > > Tom Hello, so based on `git bisect`, it looks like the errors were introduced by this commit: --> SystemError: /builddir/build/BUILD/Python-2.7.3/Objects/listobject.c:178: bad argument to internal function --> Fatal Python error: GC object already tracked # http://sourceware.org/ml/gdb-patches/2012-08/msg00434.html > commit 97143778fc8aceaca6895de13b93c88811402441 > Author: Tom Tromey > Date: Wed Aug 15 14:21:57 2012 +0000 > PR python/14387: I'm not sure about what relevant information I can provide with valgrind, so here is the complete log: ==29717== Memcheck, a memory error detector ==29717== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. ==29717== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info ==29717== Command: gdb-master --pid 26304 -ex quit ==29717== GNU gdb (GDB) 7.5.50.20120815-cvs [... gdb starts ...] Attaching to process 26304 Reading symbols from /home/kevin/travail/i386/gdb-trunk.build/gdb/gdb...done. ==29719== ==29719== HEAP SUMMARY: ==29719== in use at exit: 18,910,812 bytes in 38,905 blocks ==29719== total heap usage: 174,966 allocs, 136,061 frees, 132,543,220 bytes allocated ==29719== ==29719== LEAK SUMMARY: ==29719== definitely lost: 5,598 bytes in 33 blocks ==29719== indirectly lost: 24 bytes in 1 blocks ==29719== possibly lost: 1,819,580 bytes in 10,752 blocks ==29719== still reachable: 17,085,610 bytes in 28,119 blocks ==29719== suppressed: 0 bytes in 0 blocks ==29719== Rerun with --leak-check=full to see details of leaked memory ==29719== ==29719== For counts of detected and suppressed errors, rerun with: -v ==29719== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2) Reading symbols from /lib64/libdl.so.2...Reading symbols from /usr/lib/debug/lib64/libdl-2.15.so.debug... [... symbols loading ...] ==29717== Invalid read of size 8 ==29717== at 0x501076: objfpy_get_printers (py-objfile.c:88) ==29717== by 0x502ACD: find_pretty_printer_from_objfiles (py-prettyprint.c:114) ==29717== by 0x502D75: find_pretty_printer (py-prettyprint.c:190) ==29717== by 0x503EEE: apply_val_pretty_printer (py-prettyprint.c:719) ==29717== by 0x5819E8: val_print (valprint.c:727) ==29717== by 0x581CAD: common_val_print (valprint.c:806) ==29717== by 0x5C33DA: print_frame_arg (stack.c:282) ==29717== by 0x5C3F5D: print_frame_args (stack.c:647) ==29717== by 0x5C4E72: print_frame (stack.c:1171) ==29717== by 0x5C44A9: print_frame_info (stack.c:826) ==29717== by 0x5C2F4E: print_stack_frame (stack.c:165) ==29717== by 0x5BCB09: normal_stop (infrun.c:6053) ==29717== Address 0xbf8d638 is 24 bytes inside a block of size 240 free'd ==29717== at 0x4A079AE: free (vg_replace_malloc.c:427) ==29717== by 0x6F9D9C: xfree (common-utils.c:107) ==29717== by 0x5CAFAD: catcher_pop (exceptions.c:123) ==29717== by 0x5CB03D: exceptions_state_mc (exceptions.c:149) ==29717== by 0x5CB1C8: exceptions_state_mc_action_iter (exceptions.c:210) ==29717== by 0x6CEE1B: get_frame_pc_if_available (frame.c:1990) ==29717== by 0x6CEBD2: get_prev_frame (frame.c:1891) ==29717== by 0x6594F2: value_of_dwarf_reg_entry (dwarf2loc.c:1238) ==29717== by 0x65969B: value_of_dwarf_block_entry (dwarf2loc.c:1300) ==29717== by 0x65F125: loclist_read_variable_at_entry (dwarf2loc.c:4009) ==29717== by 0x5C3632: read_frame_arg (stack.c:335) ==29717== by 0x5C3F3F: print_frame_args (stack.c:644) ==29717== ==29717== ==29717== Process terminating with default action of signal 11 (SIGSEGV) ==29717== Bad permissions for mapped region at address 0x456EF0 ==29717== at 0x501081: objfpy_get_printers (py-objfile.c:88) ==29717== by 0x502ACD: find_pretty_printer_from_objfiles (py-prettyprint.c:114) ==29717== by 0x502D75: find_pretty_printer (py-prettyprint.c:190) ==29717== by 0x503EEE: apply_val_pretty_printer (py-prettyprint.c:719) ==29717== by 0x5819E8: val_print (valprint.c:727) ==29717== by 0x581CAD: common_val_print (valprint.c:806) ==29717== by 0x5C33DA: print_frame_arg (stack.c:282) ==29717== by 0x5C3F5D: print_frame_args (stack.c:647) ==29717== by 0x5C4E72: print_frame (stack.c:1171) ==29717== by 0x5C44A9: print_frame_info (stack.c:826) ==29717== by 0x5C2F4E: print_stack_frame (stack.c:165) ==29717== by 0x5BCB09: normal_stop (infrun.c:6053) 0x0000003f190e8b84 in __GI___poll (==29717== ==29717== HEAP SUMMARY: ==29717== in use at exit: 37,857,799 bytes in 42,044 blocks ==29717== total heap usage: 849,325 allocs, 807,281 frees, 807,618,669 bytes allocated ==29717== ==29717== LEAK SUMMARY: ==29717== definitely lost: 5,598 bytes in 33 blocks ==29717== indirectly lost: 24 bytes in 1 blocks ==29717== possibly lost: 1,839,074 bytes in 10,983 blocks ==29717== still reachable: 36,013,103 bytes in 31,027 blocks ==29717== suppressed: 0 bytes in 0 blocks ==29717== Rerun with --leak-check=full to see details of leaked memory ==29717== ==29717== For counts of detected and suppressed errors, rerun with: -v ==29717== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2) [1] 29717 segmentation fault valgrind gdb-master --pid 26304 -ex quit Thanks for your help, Kevin