This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap 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 runtime/10260] New: Crash due to stale timer callbacks


When the gettimeofday_* functions are used, we have timers that run to sync up
with the system clock.  However, in some error cases we forget to unregister
those timer callbacks, which will eventually lead to a crash from bad memory
accesses.

This can be induced by running a script with an oversized context, e.g. by using
a huge string size:

  stap -ve 'probe begin { println("hi ", gettimeofday_s()) }' \
    -DMAXSTRINGLEN=100000000

The context allocation will likely fail, and so systemtap_module_init will
return an error.  When module init calls fail, the module is unloaded right
away, so we never get to systemtap_module_exit to unregister the timers.  Thus,
we need to also clean up in the failure track of init.

-- 
           Summary: Crash due to stale timer callbacks
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: jistone at redhat dot com


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


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