Page 1 of 1

Linux unrar/par2 problems

Posted: January 20th, 2011, 3:08 am
by nosleep
I think I have this problem

Version: 0.5.6
OS: Linux (Crystalbuntu install on AppleTV First Gen)
Install-type: JCFP Repository
Firewall Software: No, firewall is in router (Tomato 1.28)
Are you using IPV6? No

I am consistently getting the errors like the following in my log files

Code: Select all

2011-01-19 00:29:57,892::INFO::[postproc:134] Saving postproc queue
2011-01-19 00:29:57,898::INFO::[postproc:243] Starting PostProcessing on Next.Time.I.Will.Follow.Forum.Rules => Repair:True, Unpack:True, Delete:True, Script:sabToSickBeard.py
2011-01-19 00:29:57,899::INFO::[postproc:247] Par2 check starting on Next.Time.I.Will.Follow.Forum.RulesNext.Time.I.Will.Follow.Forum.Rules
2011-01-19 00:29:57,899::INFO::[postproc:254] Running repair on set Next.Time.I.Will.Follow.Forum.Rules
2011-01-19 00:29:57,947::INFO::[newsunpack:674] Scanning "/home/xbmc/downloads/incomplete/Next.Time.I.Will.Follow.Forum.Rules/Next.Time.I.Will.Follow.Forum.Rules.vol00+01.par2"
2011-01-19 00:29:58,180::ERROR::[newsunpack:698] Error [Errno 12] Cannot allocate memory while running par2_repair on set Next.Time.I.Will.Follow.Forum.Rules
2011-01-19 00:29:58,181::INFO::[newsunpack:699] Traceback: 
Traceback (most recent call last):
  File "/usr/share/sabnzbdplus/sabnzbd/newsunpack.py", line 679, in par2_repair
    setname, joinables)
  File "/usr/share/sabnzbdplus/sabnzbd/newsunpack.py", line 792, in PAR_Verify
    startupinfo=stup, creationflags=creationflags)
  File "/usr/lib/python2.5/subprocess.py", line 594, in __init__
    errread, errwrite)
  File "/usr/lib/python2.5/subprocess.py", line 1067, in _execute_child
    self.pid = os.fork()
OSError: [Errno 12] Cannot allocate memory
This gets reported by SABnzbd+ as

Code: Select all

2011-01-19 00:29:58,180
ERROR:
Error [Errno 12] Cannot allocate memory while running par2_repair on set Next.Time.I.Will.Follow.Forum.Rules
What's odd is that if I SSH into the AppleTV and run the following commands

Code: Select all

cd _FAILED_Next.Time.I.Will.Follow.Forum.Rules/
par2repair *.par2
par2repair works perfectly fine, I get told

Code: Select all

All files are correct, repair is not required.
The same works for using an alternative syntax e.g.

Code: Select all

par2 r *.par2
Which is consistent with what I am reading about par2

The par2 version is as follows

Code: Select all

par2cmdline version 0.4, Copyright (C) 2003 Peter Brian Clements.
I'm a little stuck as to what to do next, any pointers as to what to investigate next would be appreciated. I must have done something because it was working.

Although nothing to do with par2 or par2repair, SABnzbd+ does report that my versions of unrar is the wrong one; however, unrar reports the following which I believe is fine:-

Code: Select all

UNRAR 3.71 beta 1 freeware      Copyright (c) 1993-2007 Alexander Roshal

Re: Linux unrar/par2 problems

Posted: January 20th, 2011, 1:07 pm
by jcfp
Please read the forum rules, I had to edit your post.

nosleep wrote:

Code: Select all

2011-01-19 00:29:58,180
ERROR:
Error [Errno 12] Cannot allocate memory while running par2_repair on set sanctuary.s02e06.bdrip.xvid-saints
What's odd is that if I SSH into the AppleTV and run the following commands

[...]

I'm a little stuck as to what to do next, any pointers as to what to investigate next would be appreciated. I must have done something because it was working.
The error is pretty clear, so either no memory is available or there's quota. How much memory and swap does the system have? You could also try halting downloading while post-processing is going on. Or check for other resource hungry stuff.

nosleep wrote: Although nothing to do with par2 or par2repair, SABnzbd+ does report that my versions of unrar is the wrong one; however, unrar reports the following which I believe is fine:-

Code: Select all

UNRAR 3.71 beta 1 freeware      Copyright (c) 1993-2007 Alexander Roshal
It's ancient. There's some issues with version older than 3.80, hence the warning. Not related to your other issue though.

Re: Linux unrar/par2 problems

Posted: January 20th, 2011, 8:48 pm
by nosleep
Bad nosleep, I really should have done the editing of my prior post, sorry about that. I have now read the rules.

I think I am closer to solving the problem

Doing a

Code: Select all

top
Showed me that I have little free memory and no swap at all!

Code: Select all

top - 15:45:15 up 5 days, 16:25,  3 users,  load average: 0.03, 0.05, 0.05
Tasks:  92 total,   3 running,  89 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.3%us,  0.3%sy,  0.0%ni, 43.4%id, 52.6%wa,  0.0%hi,  2.3%si,  0.0%st
Mem:    248940k total,   240248k used,     8692k free,     1612k buffers
Swap:        0k total,        0k used,        0k free,    30188k cached
I was too busy trying to work out why I could run par2repair from the command line and everything was working fine but it was complaining of low memory when SABnzbd+ tried the same operation.

Thanks for the pointer to check the basics.

I have been running Crystalbuntu off an 8GB USB stick and have recently increased the root partition size using gparted. Now it looks like the UUID for my swap was pointing at the internal AppleTV swap partition and not one on the USB stick. Unsure why this is the case, unless it always was. But anyway I am going to back-up the internal AppleTV partitions and install Crystalbuntu / Ubuntu directly on the HD, it's time I did this anyway as running off the USB stick was only meant to be exercise. With an install on the HD I am expecting a lot of problems are going to be solved.

Thx for reply to my previous posting.

Re: Linux unrar/par2 problems

Posted: January 21st, 2011, 2:06 am
by jcfp
nosleep wrote:

Code: Select all

Mem:    248940k total,   240248k used,     8692k free,     1612k buffers
Swap:        0k total,        0k used,        0k free,    30188k cached
I was too busy trying to work out why I could run par2repair from the command line and everything was working fine but it was complaining of low memory when SABnzbd+ tried the same operation.
256 MB, no swap is living on the edge. Especially with little mem available (8692k+30188k) if need be. If sab was still handling other downloads or otherwise busy junk resources, that could explain why it would work afterwards but not at the time.