This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/13426] New: Double-removals of JIT code info


http://sourceware.org/bugzilla/show_bug.cgi?id=13426

             Bug #: 13426
           Summary: Double-removals of JIT code info
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: sphink@gmail.com
    Classification: Unclassified


Created attachment 6069
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6069
gdb debug output for double-unregistration

I am using the jit code registration API, and occasionally I see errors from
gdb that look like:

  Unable to find JITed code entry at address: 0xffc730

The problem seems to be that it is doing a double-unregister: it unregisters
once successfully, then unregisters again and fails to find it.

I turned on debug_infrun and got output that suggests that the problem may be
that the inferior is getting a SIGPROF signal during the handling of the
__jit_debug_register_code() breakpoint, and somehow that triggers re-processing
the same unregistration event. (I am working on a SIGPROF-based profiler that
makes use of the JIT code registration information, so this would indeed happen
occasionally.)

gdb seems to recognize that the SIGPROF should be ignored:

  infrun: random signal 27
  infrun: signal arrived while stepping over breakpoint

but then it seems to see another SIGTRAP at the same stop_pc that it doesn't in
the absence of the SIGPROF. (So gdb sees SIGTRAP,SIGPROF,SIGTRAP without the
inferior advancing.)

I have modified the gdb source a bit to try to track this down, so the attached
output may have some minor differences from HEAD. The 'NUKE objf=0x695d410'
comes from jit_unregister_code(), which means it successfully removed an entry.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]