Kaveh Posted July 8, 2012 Share Posted July 8, 2012 I've noticed a few of these scripts have unbounded while loops in them. This is really really bad because if the condition is never met, it ends up hanging the emhttp process and the webgui fails to ever respond. I can create some pull requests that time out these while loops after 10s (this solved the webgui hanging issue I was having), but the core issue needs to be solved as well. Quote Link to comment
spylex Posted July 8, 2012 Share Posted July 8, 2012 I've noticed a few of these scripts have unbounded while loops in them. This is really really bad because if the condition is never met, it ends up hanging the emhttp process and the webgui fails to ever respond. I can create some pull requests that time out these while loops after 10s (this solved the webgui hanging issue I was having), but the core issue needs to be solved as well. Thats a great spot Kaveh. I have experienced this problem several times but didn't attempt the solution myself. Can you please work with Influencer to get this sorted? Quote Link to comment
Influencer Posted July 8, 2012 Author Share Posted July 8, 2012 I've noticed a few of these scripts have unbounded while loops in them. This is really really bad because if the condition is never met, it ends up hanging the emhttp process and the webgui fails to ever respond. I can create some pull requests that time out these while loops after 10s (this solved the webgui hanging issue I was having), but the core issue needs to be solved as well. I'll go ahead and pull the changes, but the only plug-in that I've seen have the issue with the while loop is sickbeard. The others, if they fail anything, never make it to the loop. Haven't had the issue in a while so I may have got it to where it does always get to the loop though. Quote Link to comment
Influencer Posted July 8, 2012 Author Share Posted July 8, 2012 No one up to test a few changes? What has changed: Can now make changes without disabling/enabling the plug-in. Start button now enables plug-in + starts plug-in Restart button is not shown when app isn't running Ability to update the plug-in from the gui, no more manually downloading the plug-in and putting in the plug-ins directory. Will first backup the last running version before installing the new version, allowing you to roll-back Added margin padding so buttons are not cut off in windowed mode. I believe thats all. Still working on some things, and waiting on a little more testing of these changes before I roll them out Quote Link to comment
Kaveh Posted July 8, 2012 Share Posted July 8, 2012 I've noticed a few of these scripts have unbounded while loops in them. This is really really bad because if the condition is never met, it ends up hanging the emhttp process and the webgui fails to ever respond. I can create some pull requests that time out these while loops after 10s (this solved the webgui hanging issue I was having), but the core issue needs to be solved as well. I'll go ahead and pull the changes, but the only plug-in that I've seen have the issue with the while loop is sickbeard. The others, if they fail anything, never make it to the loop. Haven't had the issue in a while so I may have got it to where it does always get to the loop though. Excellent. Infinite loops are bad. Quote Link to comment
monkeydave Posted July 8, 2012 Share Posted July 8, 2012 I have updated sab, sb and cp plugins to the latest version from the master branch on github. All updated fine with no errors. The only problem I have noticed is the sabnzbd plugin still has the simpleFeatures icons linked in the source. Quote Link to comment
Influencer Posted July 8, 2012 Author Share Posted July 8, 2012 Thanks, overlooked that one. Should be removed now Quote Link to comment
Riot Posted July 9, 2012 Share Posted July 9, 2012 Updated both Sab and SB through the plugin GUI. Seem to both work fine Quote Link to comment
Influencer Posted July 9, 2012 Author Share Posted July 9, 2012 Good, . Hopefully this will make it easier for users with less linux experience. Quote Link to comment
Influencer Posted July 9, 2012 Author Share Posted July 9, 2012 Alright, I've updated the rest of the plug-ins for the changes posted previously, the changes are located in the dev branch. I'll continue some testing tonight, if anyone else would like to test be my guest. Note that the plug-in update will work but will update to the master branch, so any new changes will be lost if you do that. If you do decide to test, and find any bugs with the changes, please post the bugs here so I can fix them! EDIT: I would recommend not update to the dev branch right now, I cannot test properly because a parity check is going on right now, not sure if thats causing the issue but sab settings have started to hang. I'll test further tomorrow when I get home from work and post back when its ok to update to dev for testing. Quote Link to comment
DTPHawk Posted July 9, 2012 Share Posted July 9, 2012 Now that you guys mention it, maybe I am falling victim to the issue Kaveh is describing. My couchpotato_v2_unplugged plugin seems to be causing some freezing/crashing issues on my setup. All of a sudden I loose network connectivity to the webgui/sab/sick/couch/everything. The only way to bring everything back up is to press the button on the tower to shutdown/restart. If I disable the couchpotato plugin, my server will run flawless for days. Could I be using up all of my resources due to a loop in the code and eventually crashing everything? I tried tailing my syslog for answers but didn't see anything print to the logs. If you need me to provide anything, just let me know. Quote Link to comment
MyKroFt Posted July 9, 2012 Share Posted July 9, 2012 I installed CouchPotato V2 to play with and have noticed this was well, but I think it is CP doing it its scan looking for content to download lagging the system as my system load goes up big time and python is using a ton of memory. If I kill the python process, everything comes back down to normal and the system starts responding again.... Myk Quote Link to comment
Influencer Posted July 9, 2012 Author Share Posted July 9, 2012 The loop described will only happen when enabling the plugin and causes the webgui to hang loading. Stopping or refreshing the GUI stops this. What you are describing does sound like CP using up resources, which unless its due to a permission issue(unlikely but I can check) that is something I cannot address with the plugin. I suspect you are using the manage feature of CP which I could never get to work properly. Sent from my HTC Vivid Quote Link to comment
spylex Posted July 9, 2012 Share Posted July 9, 2012 Im up for testing, let us know when 'dev' branch is safe. I use CP, SAB, SB and HP. Quote Link to comment
PsyVision Posted July 9, 2012 Share Posted July 9, 2012 Influencer - Should Darkstat be working? I have put the plg in my plugins folder along with Sab, Sick, Headphones and CouchP and they all work fine and show up in the Settings screen in unRAID but not Darkstat. Oddly enough the DS plugin has written the config to my flash, I have tried starting it through the rc.d script but still nothing on port 667 Quote Link to comment
p4xel Posted July 9, 2012 Share Posted July 9, 2012 Influencer - Should Darkstat be working? I have put the plg in my plugins folder along with Sab, Sick, Headphones and CouchP and they all work fine and show up in the Settings screen in unRAID but not Darkstat. Oddly enough the DS plugin has written the config to my flash, I have tried starting it through the rc.d script but still nothing on port 667 DarkStat is showing in Utils not Settings, and it works fine for me. Quote Link to comment
PsyVision Posted July 9, 2012 Share Posted July 9, 2012 Thanks! - You're right, I thought I had looked across all tabs in case it worked differently, I have since rebooted so maybe that sorted it. Anyway, it's all going now cheers Quote Link to comment
hooger Posted July 9, 2012 Share Posted July 9, 2012 I have everything installed and working, however I cannot access Sickbeard at all. In settings it shows that its installed and running, but i cant access it. When i go into the processes i can see sabnzbd and couchpotato running but i dont see sickbeard there. EDIT: I ran it through the command line and got this when starting. Not sure what it means. root@Tower:/etc/rc.d# rc.sickbeard start Starting SickBeard: sudo -u nobody python /usr/local/sickbeard/SickBeard.py --daemon --port 8081 --datadir /mnt/cache/.programs/sickbeard --pidfile /var/run/sic kbeard/sickbeard.pid > /dev/null 2>&1 ... OK Exception in thread HTTPServer Thread-1: Traceback (most recent call last): File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner self.run() File "/usr/lib/python2.6/threading.py", line 484, in run self.__target(*self.__args, **self.__kwargs) File "/usr/local/sickbeard/cherrypy/process/servers.py", line 75, in _start_ht tp_thread self.httpserver.start() File "/usr/local/sickbeard/cherrypy/wsgiserver/__init__.py", line 1634, in sta rt raise socket.error(msg) error: [Errno 97] Address family not supported by protocol Please refresh the page Quote Link to comment
Influencer Posted July 9, 2012 Author Share Posted July 9, 2012 I'm still talking with the darkstat dev trying to figure out why it randomly shuts itself down. It's something unique to unraid so its slow going(dev had never even heard of unraid) That Sickbeard error is one I've never seen before, do you have a special configuration for your nic? I'll have to see what I can find out about it when I get off work. Sent from my HTC Vivid Quote Link to comment
hooger Posted July 9, 2012 Share Posted July 9, 2012 I'm still talking with the darkstat dev trying to figure out why it randomly shuts itself down. It's something unique to unraid so its slow going(dev had never even heard of unraid) That Sickbeard error is one I've never seen before, do you have a special configuration for your nic? I'll have to see what I can find out about it when I get off work. Sent from my HTC Vivid Nope nothing special, its just the onboard LAN... I even tried changing the port, only running sickbeard. Still same error. Quote Link to comment
mikezs Posted July 9, 2012 Share Posted July 9, 2012 The idea is the plug-in should never have to be read. If you update another program, sab, sickbeard or the others, there is nothing about the changes in the code. If its wanted I could add the changelog back, just find it redundant I'd like this if possible. I forked the original plugins and made roughly the same changes as you. My real job is software development, so I'd like to diff your changes to mine (and probably branch from you) and a changelog would help out a lot (Or keep the comments up to date so I can look at the commit log) Quote Link to comment
mikezs Posted July 9, 2012 Share Posted July 9, 2012 File "/usr/local/sickbeard/cherrypy/wsgiserver/__init__.py", line 1634, in sta rt raise socket.error(msg) error: [Errno 97] Address family not supported by protocol In python, this normally means you're trying to start an IPv6 socket. Check to see if the default listening address is 0.0.0.0. Another reinstall from git might be worth while. Quote Link to comment
hooger Posted July 9, 2012 Share Posted July 9, 2012 File "/usr/local/sickbeard/cherrypy/wsgiserver/__init__.py", line 1634, in sta rt raise socket.error(msg) error: [Errno 97] Address family not supported by protocol In python, this normally means you're trying to start an IPv6 socket. Check to see if the default listening address is 0.0.0.0. Another reinstall from git might be worth while. I opened up sickbeards ini, and noticed somehow the ipv6 field had a weird value in it. So i changed it back, and it now starts without any errors, but i still cant access the web side of it. Quote Link to comment
Influencer Posted July 9, 2012 Author Share Posted July 9, 2012 Run ps aux | grep sickbeard There should be two processes, one is the python process for sickbeard, the other will be the grep command. Sickbeard has always been odd, the first time I open it each day it takes it a while to load, are you giving it enough time(usually takes it a minute or two for me first time) If you haven't set sickbeard up at all, it might be worth while to delete your data directory and try a fresh install. Quote Link to comment
Tybio Posted July 9, 2012 Share Posted July 9, 2012 Sickbeard has always been odd, the first time I open it each day it takes it a while to load, are you giving it enough time(usually takes it a minute or two for me first time) If you haven't set sickbeard up at all, it might be worth while to delete your data directory and try a fresh install. Indeed, the database gets large quickly. I've reset it a few times and had it reload information from the shows I've downloaded. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.