Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cloudbase/PyMI
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: ader1990/PyMI
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 4 commits
  • 0 files changed
  • 2 contributors

Commits on Nov 13, 2019

  1. Fix event listener crash

    The MI operation cancel/close calls are asynchronuous for async
    subscriptions. The issue is that we're not waiting for those
    operations to complete when tearing down event watchers.
    
    For this reason, we may get event callbacks after deallocating
    those objects, which will lead to invalid memory access and
    crashes.
    
    This can be avoided by waiting for the MI operations to be canceled
    before going further with the teardown. After MI operations are
    canceled, a cancel notification is emitted and the "more_results"
    is set to False. We'll just wait for that.
    petrutlucian94 authored and ader1990 committed Nov 13, 2019
    Copy the full SHA
    fd26e46 View commit details
  2. EventWatcher: avoid using weakref conn

    If the _Connection object gets cleaned up before the event watcher,
    MI crashes. This happens even if the _Connection destructor closes
    the event watcher.
    
    It's difficult to say what exactly MI is trying to access from the
    crash dump alone.
    
    One workaround is to avoid using weak references for the connection
    object. This basically means that we have a circular dependency as the
    connection object holds a reference to the event watcher callback.
    This dependency gets cleared when calling the watcher .close method,
    allowing the two objects to be cleaned up.
    
    In short, with or without this patch, the watcher .close method
    must be called when we're done with it (unless we're running a
    daemon). Without this patch, if this call is omitted, the process
    can crash. With it, it would lead to a memory leak due to the
    ever growing queue of received events.
    petrutlucian94 authored and ader1990 committed Nov 13, 2019
    Copy the full SHA
    a504eaf View commit details
  3. Refactor build process

    At the moment, we're relying on a Visual Studio solution when
    building the extension. For this reason, simply doing a "pip install
    PyMI" will fail as setup.py doesn't build the extension, expecting
    it to be already built.
    
    We're now letting distutils build our extension (keeping the VS
    Solution as well for now). We're also switching to pbr, simplifying
    version management.
    
    The project structure will have to change a bit. Pbr seems to make
    some assumptions about the project layout, so we'll have to move
    setup.py in the top level dir, having wmi dir next to it.
    petrutlucian94 authored and ader1990 committed Nov 13, 2019
    Copy the full SHA
    1ed45b8 View commit details

Commits on Nov 27, 2019

  1. Copy the full SHA
    1af8af0 View commit details
Showing with 0 additions and 0 deletions.