core: nmap_tracker slowing down HA so much it is unusable

The problem

After upgrading to ha-core2021.7.0b3 my HA instance is no longer usable and gets restarted by the supervisor watchdog.

What is version of Home Assistant Core has the issue?

core-2021.7.0b3

What was the last working version of Home Assistant Core?

core-2021.7.0b0

What type of installation are you running?

Home Assistant OS

Integration causing the issue

nmap_tracker

Link to integration documentation on our website

https://www.home-assistant.io/integrations/nmap_tracker/

Example YAML snippet

device_tracker:
- platform: nmap_tracker
  hosts:
    - 10.1.1.0/24
  interval_seconds: 60
  consider_home: '0:05'
- platform: nmap_tracker
  hosts:
    - 10.2.2.0/24
  interval_seconds: 60
  consider_home: '0:05'
- platform: nmap_tracker
  hosts:
    - 10.5.5.0/24
  interval_seconds: 60
  consider_home: '0:05'
- platform: nmap_tracker
  hosts:
    - 10.6.6.0/24
  interval_seconds: 60
  consider_home: '0:05'

Anything in the logs that might be useful for us?

No response

Additional information

I have pasted the converted yaml to config_entries below.

I believe the issue might be related to the interval_seconds as it is not imported into the config_entry and might be scanning all the time, freezing the instance.

Also creating a new config_entry from the UI does not create the interval_seconds but editing after first creation puts it there.

            {                                                  
                "entry_id": "88670c9600003f2ee55c61e5f6f1c605",
                "version": 1,                                  
                "domain": "nmap_tracker",                      
                "title": "Nmap Tracker 10.1.1.0/24",           
                "data": {},                                    
                "options": {                                   
                    "hosts": "10.1.1.0/24",                    
                    "home_interval": 0,                          
                    "exclude": "",                             
                    "scan_options": "-F --host-timeout 5s"     
                },                                             
                "pref_disable_new_entities": false,            
                "pref_disable_polling": false,                 
                "source": "import",                            
                "unique_id": null,                             
                "disabled_by": null                            
            },                                                 
            {                                                  
                "entry_id": "a91f7a52a03e7ea75c031724b38cfeed",
                "version": 1,                                  
                "domain": "nmap_tracker",                      
                "title": "Nmap Tracker 10.2.2.0/24",           
                "data": {},                                                                    
                "options": {                                   
                    "hosts": "10.2.2.0/24",                    
                    "home_interval": 0,                        
                    "exclude": "",                             
                    "scan_options": "-F --host-timeout 5s"     
                },                                             
                "pref_disable_new_entities": false,            
                "pref_disable_polling": false,                 
                "source": "import",                            
                "unique_id": null,                             
                "disabled_by": null                            
            },
            {                                                  
                "entry_id": "f949aaa7b17dc94fcabedc0b90ba35f3",  
                "version": 1,                                  
                "domain": "nmap_tracker",                      
                "title": "Nmap Tracker 10.5.5.0/24",           
                "data": {},                                    
                "options": {                                   
                    "hosts": "10.5.5.0/24",                    
                    "home_interval": 0,                        
                    "exclude": "",                             
                    "scan_options": "-F --host-timeout 5s"     
                },                                             
                "pref_disable_new_entities": false,            
                "pref_disable_polling": false,                 
                "source": "import",                            
                "unique_id": null,                             
                "disabled_by": null                                                            
            },                                                 
            {                                                  
                "entry_id": "bb2e7c20b29b933db175d5a02d311425",
                "version": 1,                                  
                "domain": "nmap_tracker",                      
                "title": "Nmap Tracker 10.6.6.0/24",           
                "data": {},                                    
                "options": {                                   
                    "hosts": "10.6.6.0/24",                    
                    "home_interval": 0,                        
                    "exclude": "",                             
                    "scan_options": "-F --host-timeout 5s"     
                },                                             
                "pref_disable_new_entities": false,            
                "pref_disable_polling": false,                 
                "source": "import",                            
                "unique_id": null,                             
                "disabled_by": null                            
            },

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 35 (30 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks for the attempt. It is appreciated. 👍 Hopefully we can figure it out and be ready in 2021.8

I fight with that issue for 3 years or more. You can revert whatever you feel comfortable with, but it will not fix the bug and other integration will hit the bug at one time or just the amount of integration that uses subprocess.

However you decide to go, I will fix the root of the issue on our python runtime: https://github.com/home-assistant/docker-base/releases/tag/2021.07.0 - builds are currently running. I’m totally fine if you like to revert your change. You don’t need to care about what I doing in the background. Look at my comments just as comments (no sarcasm)