1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/9c767090274e/ Changeset: 9c767090274e User: natefoo Date: 2015-01-28 21:20:30+00:00 Summary: Remove memdump, which probably has not worked for many years. Affected #: 9 files diff -r c8b49753bf99d03462bace0dbb2f38b9c0f52915 -r 9c767090274eb2a213854dcdb367135d782fecec config/galaxy.ini.sample --- a/config/galaxy.ini.sample +++ b/config/galaxy.ini.sample @@ -629,10 +629,6 @@ # lot of CPU. #use_heartbeat = False -# Enable the memory debugging interface (careful, negatively impacts server -# performance). -#use_memdump = False - # -- Data Libraries # These library upload options are described in much more detail in the wiki: diff -r c8b49753bf99d03462bace0dbb2f38b9c0f52915 -r 9c767090274eb2a213854dcdb367135d782fecec eggs.ini --- a/eggs.ini +++ b/eggs.ini @@ -26,7 +26,6 @@ pysqlite = 2.5.6 python_lzo = 1.08_2.03_static PyYAML = 3.10 -guppy = 0.1.10 SQLAlchemy = 0.7.9 ; msgpack_python = 0.2.4 diff -r c8b49753bf99d03462bace0dbb2f38b9c0f52915 -r 9c767090274eb2a213854dcdb367135d782fecec lib/galaxy/app.py --- a/lib/galaxy/app.py +++ b/lib/galaxy/app.py @@ -107,10 +107,8 @@ self.quota_agent = galaxy.quota.QuotaAgent( self.model ) else: self.quota_agent = galaxy.quota.NoQuotaAgent( self.model ) - # Heartbeat and memdump for thread / heap profiling + # Heartbeat for thread profiling self.heartbeat = None - self.memdump = None - self.memory_usage = None # Container for OpenID authentication routines if self.config.enable_openid: from galaxy.web.framework import openid_manager @@ -125,11 +123,6 @@ self.heartbeat = heartbeat.Heartbeat( fname=self.config.heartbeat_log ) self.heartbeat.daemon = True self.heartbeat.start() - # Enable the memdump signal catcher if configured and available - if self.config.use_memdump: - from galaxy.util import memdump - if memdump.Memdump: - self.memdump = memdump.Memdump() # Transfer manager client if self.config.get_bool( 'enable_beta_job_managers', False ): from galaxy.jobs import transfer_manager diff -r c8b49753bf99d03462bace0dbb2f38b9c0f52915 -r 9c767090274eb2a213854dcdb367135d782fecec lib/galaxy/config.py --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -227,7 +227,6 @@ self.external_chown_script = kwargs.get('external_chown_script', None) self.environment_setup_file = kwargs.get( 'environment_setup_file', None ) self.use_heartbeat = string_as_bool( kwargs.get( 'use_heartbeat', 'False' ) ) - self.use_memdump = string_as_bool( kwargs.get( 'use_memdump', 'False' ) ) self.log_actions = string_as_bool( kwargs.get( 'log_actions', 'False' ) ) self.log_events = string_as_bool( kwargs.get( 'log_events', 'False' ) ) self.sanitize_all_html = string_as_bool( kwargs.get( 'sanitize_all_html', True ) ) diff -r c8b49753bf99d03462bace0dbb2f38b9c0f52915 -r 9c767090274eb2a213854dcdb367135d782fecec lib/galaxy/eggs/__init__.py --- a/lib/galaxy/eggs/__init__.py +++ b/lib/galaxy/eggs/__init__.py @@ -385,8 +385,6 @@ "DRMAA_python": lambda: "sge" in self.config.get( "app:main", "start_job_runners" ).split(","), "drmaa": lambda: "drmaa" in self.config.get( "app:main", "start_job_runners" ).split(","), "pbs_python": lambda: "pbs" in self.config.get( "app:main", "start_job_runners" ).split(","), - "threadframe": lambda: self.config.get( "app:main", "use_heartbeat" ), - "guppy": lambda: self.config.get( "app:main", "use_memdump" ), "python_openid": lambda: self.config.get( "app:main", "enable_openid" ), "python_daemon": lambda: sys.version_info[:2] >= ( 2, 5 ), "pysam": lambda: check_pysam(), diff -r c8b49753bf99d03462bace0dbb2f38b9c0f52915 -r 9c767090274eb2a213854dcdb367135d782fecec lib/galaxy/util/memdump.py --- a/lib/galaxy/util/memdump.py +++ /dev/null @@ -1,50 +0,0 @@ - -# Attempt to load guppy module, and only define Memdump class -# if available - -try: - - import pkg_resources - pkg_resources.require( "guppy" ) - -except: - - import sys - print >> sys.stderr, "No guppy module, Memdump not available" - Memdump = None - -else: - - import os, sys, signal, time, guppy - - class Memdump( object ): - def __init__( self, signum=signal.SIGUSR1, fname="memdump.log" ): - self.fname = fname - signal.signal( signum, self.dump ) - self.heapy = guppy.hpy() - self.heap = None - def dump( self, signum, stack ): - file = open( self.fname, "a" ) - print >> file, "Memdump for pid %d at %s" % ( os.getpid(), time.asctime() ) - print >> file - try: - self.heap = self.heapy.heap() - print >> file, "heap():" - print >> file, self.heap - print >> file, "\nbyrcs:" - print >> file, self.heap.byrcs - print >> file, "\nbyrcs[0].byid:" - print >> file, self.heap.byrcs[0].byid - print >> file, "\nget_rp():" - print >> file, self.heap.get_rp() - self.heapy.setref() - except AssertionError: - pass - print >> file, "\nEnd dump\n" - file.close() - def setref( self ): - self.heapy.setref() - def get( self, update=False ): - if update: - self.heap = self.heapy.heap() - return self.heap diff -r c8b49753bf99d03462bace0dbb2f38b9c0f52915 -r 9c767090274eb2a213854dcdb367135d782fecec lib/galaxy/web/base/controllers/admin.py --- a/lib/galaxy/web/base/controllers/admin.py +++ b/lib/galaxy/web/base/controllers/admin.py @@ -1026,48 +1026,6 @@ @web.expose @web.require_admin - def memdump( self, trans, ids = 'None', sorts = 'None', pages = 'None', new_id = None, new_sort = None, **kwd ): - if self.app.memdump is None: - return trans.show_error_message( "Memdump is not enabled (set <code>use_memdump = True</code> in galaxy.ini)" ) - heap = self.app.memdump.get() - p = util.Params( kwd ) - msg = None - if p.dump: - heap = self.app.memdump.get( update = True ) - msg = "Heap dump complete" - elif p.setref: - self.app.memdump.setref() - msg = "Reference point set (dump to see delta from this point)" - ids = ids.split( ',' ) - sorts = sorts.split( ',' ) - if new_id is not None: - ids.append( new_id ) - sorts.append( 'None' ) - elif new_sort is not None: - sorts[-1] = new_sort - breadcrumb = "<a href='%s' class='breadcrumb'>heap</a>" % web.url_for(controller='admin', action='memdump') - # new lists so we can assemble breadcrumb links - new_ids = [] - new_sorts = [] - for id, sort in zip( ids, sorts ): - new_ids.append( id ) - if id != 'None': - breadcrumb += "<a href='%s' class='breadcrumb'>[%s]</a>" % ( web.url_for(controller='admin', action='memdump', ids=','.join( new_ids ), sorts=','.join( new_sorts ) ), id ) - heap = heap[int(id)] - new_sorts.append( sort ) - if sort != 'None': - breadcrumb += "<a href='%s' class='breadcrumb'>.by('%s')</a>" % ( web.url_for(controller='admin', action='memdump', ids=','.join( new_ids ), sorts=','.join( new_sorts ) ), sort ) - heap = heap.by( sort ) - ids = ','.join( new_ids ) - sorts = ','.join( new_sorts ) - if p.theone: - breadcrumb += ".theone" - heap = heap.theone - return trans.fill_template( '/admin/memdump.mako', heap = heap, ids = ids, sorts = sorts, breadcrumb = breadcrumb, msg = msg ) - - - @web.expose - @web.require_admin def jobs( self, trans, stop = [], stop_msg = None, cutoff = 180, job_lock = None, ajl_submit = None, **kwd ): deleted = [] msg = None diff -r c8b49753bf99d03462bace0dbb2f38b9c0f52915 -r 9c767090274eb2a213854dcdb367135d782fecec templates/admin/memdump.mako --- a/templates/admin/memdump.mako +++ /dev/null @@ -1,76 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> - -<%def name="title()">Memory Profiling</%def> -<% - import re - from xml.sax.saxutils import escape, unescape -%> - -<style type="text/css"> - a.breadcrumb:link, - a.breadcrumb:visited, - a.breadcrumb:active { - text-decoration: none; - } - a.breadcrumb:hover { - text-decoration: underline; - } -</style> - -<h2>Memory Profiling</h2> - -<ul class="manage-table-actions"> - <li><a class="action-button" href="${h.url_for( controller='admin', action='memdump', dump=True )}">Dump memory (warning: hangs server!)</a></li> - <li><a class="action-button" href="${h.url_for( controller='admin', action='memdump', setref=True )}">Set reference point</a></li> -</ul> - -<%def name="htmlize( heap )"> -<% - s = escape( str( heap ) ) - new_s = "" - id_re = re.compile('^(\s+)([0-9]+)') - for line in s.split( '\n' ): - try: - id = id_re.search( line ).group( 2 ) - except: - id = None - new_s += re.sub( id_re, r'\1<a href="' + h.url_for( controller='admin', action='memdump', ids=ids, sorts=sorts, new_id=id ) + r'">\2</a>', line ) - if id and heap[int(id)].count == 1: - new_s += " <a href='%s'>theone</a>\n" % h.url_for( controller='admin', action='memdump', ids=ids, sorts=sorts, new_id=id, theone=True ) - else: - new_s += "\n" - return new_s -%> -</%def> - -%if message: - ${render_msg( message, status )} -%endif - -%if heap is None: - No memory dump available. Click "Dump memory" to create one. -%else: - <pre> - <br/> -You are here: ${breadcrumb}<br/> - %if breadcrumb.endswith( 'theone' ): - ${heap|h} - %else: - <nobr> -Sort: - <a href="${h.url_for( controller='admin', action='memdump', ids=ids, sorts=sorts, new_sort='Class')}">Class</a> | - <a href="${h.url_for( controller='admin', action='memdump', ids=ids, sorts=sorts, new_sort='Clodo' )}">Clodo</a> | - <a href="${h.url_for( controller='admin', action='memdump', ids=ids, sorts=sorts, new_sort='Id' )}">Id</a> | - <a href="${h.url_for( controller='admin', action='memdump', ids=ids, sorts=sorts, new_sort='Idset' )}">Idset</a> | - <a href="${h.url_for( controller='admin', action='memdump', ids=ids, sorts=sorts, new_sort='Module' )}">Module</a> | - <a href="${h.url_for( controller='admin', action='memdump', ids=ids, sorts=sorts, new_sort='Unity' )}">Unity</a> | - <a href="${h.url_for( controller='admin', action='memdump', ids=ids, sorts=sorts, new_sort='Rcs' )}">Rcs</a> | - <a href="${h.url_for( controller='admin', action='memdump', ids=ids, sorts=sorts, new_sort='Size' )}">Size</a> | - <a href="${h.url_for( controller='admin', action='memdump', ids=ids, sorts=sorts, new_sort='Type' )}">Type</a> | - <a href="${h.url_for( controller='admin', action='memdump', ids=ids, sorts=sorts, new_sort='Via' )}">Via</a> - </nobr> - ${htmlize( heap )} - %endif - </pre> -%endif diff -r c8b49753bf99d03462bace0dbb2f38b9c0f52915 -r 9c767090274eb2a213854dcdb367135d782fecec templates/webapps/galaxy/admin/index.mako --- a/templates/webapps/galaxy/admin/index.mako +++ b/templates/webapps/galaxy/admin/index.mako @@ -78,7 +78,6 @@ <div class="toolTitle"><a href="${h.url_for( controller='admin', action='tool_versions' )}" target="galaxy_main">View tool lineage</a></div><div class="toolTitle"><a href="${h.url_for( controller='admin', action='package_tool' )}" target="galaxy_main">Download tool tarball</a></div><div class="toolTitle"><a href="${h.url_for( controller='admin', action='reload_tool' )}" target="galaxy_main">Reload a tool's configuration</a></div> - <div class="toolTitle"><a href="${h.url_for( controller='admin', action='memdump' )}" target="galaxy_main">Profile memory usage</a></div><div class="toolTitle"><a href="${h.url_for( controller='admin', action='jobs' )}" target="galaxy_main">Manage jobs</a></div><div class="toolTitle"><a href="${h.url_for( controller='admin', action='review_tool_migration_stages' )}" target="galaxy_main">Review tool migration stages</a></div> %if installing_repository_ids: Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.