I have tests that generate unique dynamodb tables (with streams enabled) for each test (to provide isolation) and keep running into Math.random() with tests timing out. After bash'ing into the docker container and force killing various services, I narrowed it down to kinesalite.

An easy way to reproduce isrun it within sharedLimit = 1 like so:
`node /opt/code/localstack/localstack/node_modules/kinesalite/cli.js --shardLimit 1 --port 4565`

Doing so causes dynamodb.createTable commands to hang after a few tries.
global SERVICE_PORTS
    SERVICE_PORTS = service_ports or parse_service_ports()
    globs = globals()
    
    for key, value in six.iteritems(DEFAULT_SERVICE_PORTS):
        key_upper = key.upper().replace('-', '_')
        
        port_var_name = 'PORT_%s' % key_upper
        port_number = SERVICE_PORTS.get(key, 0)
        globs[port_var_name] = port_number
        url = 'http%s://%s:%s' % ('s' if USE_SSL else '', LOCALSTACK_HOSTNAME, port_number)
        
        url_key = 'TEST_%s_URL' % key_upper
        globs[url_key] = url
        
        os.environ[url_key] = url
    
    os.environ['LOCALSTACK_HOSTNAME'] = LOCALSTACK_HOSTNAME
def service_port(service_key):
    return SERVICE_PORTS.get(service_key, 0)
populate_configs()
if os.environ.get('DEBUG', '').lower() in TRUE_VALUES:
    logging.getLogger('').setLevel(logging.DEBUG)
    logging.getLogger('localstack').setLevel(logging.DEBUG)
BUNDLE_API_PROCESSES = True
USE_PROFILER = os.environ.get('USE_PROFILER', '').lower() in TRUE_VALUES
INBOUND_GATEWAY_URL_PATTERN = ('%s/restapis/{api_id}/{stage_name}/%s{path}' %
    (TEST_APIGATEWAY_URL, PATH_USER_REQUEST))