# Amavisd-new and unrar -- problems

## hanj

Hello All

Starting to see some problems with unrar and amavis.. anyone else seeing these?

```

Aug  1 10:47:24 comp.com amavis[22741]: (22741-09) (!) killing process [775] running /usr/bin/unrar

Aug  1 10:47:24 comp.com amavis[22741]: (22741-09) (!) do_unrar: Error reading: Bad file descriptor at (eval 73) line 675, <GEN71> line 2.
```

versions:

```
[ebuild   R   ] mail-filter/amavisd-new-2.4.1  USE="mysql -ldap -milter -postgres" 823 kB

[ebuild   R   ] app-arch/unrar-3.7.5  127 kB
```

Any suggestions are greatly appreciated.

Thanks!

hanji

----------

## hanj

anyone? anyone?

Thanks!

hanji

----------

## elgato319

I'm running amavisd-new 2.5.2 - no problems with unrar so far.

----------

## paintcheck200

Aug  9 10:09:25 computer amavis[30705]: (30705-01) (!)killing process [30727] running /usr/bin/unrar (reason: Error reading: Bad file descriptor at (eval 72) line 810, <GEN18> line 2.)

I just noticed I have same issue - 

mail-filter/amavisd-new-2.5.2 

app-arch/unrar-3.7.5

What version are u using elgato?

I haven't really looked into it yet, maybe its corrupted?

----------

## steveb

I have app-arch/unrar-3.7.5 and mail-filter/amavisd-new-2.5.2 and have not that issue. Probably you have a corrupted RAR archive leading to this error?

Do you have a mail with such a RAR file? Could you post a link to such a RAR file?

// SteveB

----------

## hanj

 *steveb wrote:*   

> I have app-arch/unrar-3.7.5 and mail-filter/amavisd-new-2.5.2 and have not that issue. Probably you have a corrupted RAR archive leading to this error?
> 
> Do you have a mail with such a RAR file? Could you post a link to such a RAR file?
> 
> // SteveB

 

I cannot find the exact emails that cause the problem. I have a feeling it's all spam using rar archives. I do get the error often though. Do you think the mails are still being quarantined, or is the mail lost due to this error?

Thanks!

hanji

----------

## steveb

 *hanj wrote:*   

> I cannot find the exact emails that cause the problem. I have a feeling it's all spam using rar archives. I do get the error often though. Do you think the mails are still being quarantined, or is the mail lost due to this error?

 I don't know.

Usually a bad file descriptor means that the filesystem is corrupt. A fsck on the filesystem where amavis is extracting the files should clear the inode and fix the issue.

I don't know how amavis handles such a case but I would guess that it continues without scanning the file. However... I would suggest to run fsck on the filesystem where amavis is extracting the files. And I would suggest to upgrade to 2.5.2. 2.4-series has some horrible issues.

// SteveB

----------

## hanj

 *steveb wrote:*   

>  *hanj wrote:*   I cannot find the exact emails that cause the problem. I have a feeling it's all spam using rar archives. I do get the error often though. Do you think the mails are still being quarantined, or is the mail lost due to this error? I don't know.
> 
> Usually a bad file descriptor means that the filesystem is corrupt. A fsck on the filesystem where amavis is extracting the files should clear the inode and fix the issue.
> 
> I don't know how amavis handles such a case but I would guess that it continues without scanning the file. However... I would suggest to run fsck on the filesystem where amavis is extracting the files. And I would suggest to upgrade to 2.5.2. 2.4-series has some horrible issues.
> ...

 

Really.. you think filesystem corruption?? That's not good. When you're saying "where amavis is extracting the files", would that be my /var partition then? I'm not 100% clear on what you're saying.

What issues are present with 2.4? I'm hoping that performance might be improved, since amavis is chewing on my memory pretty hard.

Thanks for all of your help.

hanji

----------

## steveb

 *hanj wrote:*   

> Really.. you think filesystem corruption?? That's not good.

 I know. But this is why I wrote "normally". It could be the old 2.4 series of amavis.

 *hanj wrote:*   

> When you're saying "where amavis is extracting the files", would that be my /var partition then? I'm not 100% clear on what you're saying.

 Check in /etc/amavisd.conf where $TEMPBASE is pointing to. Normally this should be /var/amavis or /var/amavis/tmp. But it could be anything else. Depending on your configuration (some people like to put that on a memory based fs (for speed reasons) like tempfs).

 *hanj wrote:*   

> What issues are present with 2.4? I'm hoping that performance might be improved, since amavis is chewing on my memory pretty hard.

 Well... I personally think that everything below 30% improved performance is not "feelable". You would need to do benchmarking to know if it is faster. And I did not do that. But memory consumption is less with 2.5 then with 2.4. Stability is much better with 2.5 then with 2.4.

// SteveB

----------

## biggyL

I have to confirm:

mail-filter/amavisd-new-2.5.2

app-arch/unrar-3.7.6

On every .rar archive even unpacking on commnd line I've got:

```

Dec  3 16:37:20 mail amavis[14072]: (14072-10) p003 1/2 Content-Type: application/octet-stream, size: 29415 B, name: arch.rar

Dec  3 16:37:20 mail amavis[14072]: (14072-10) (!)killing process [15147] running /usr/bin/unrar (reason: Error reading: Bad file descriptor at (eval 72) line 810, <GEN88> line 2.)

Dec  3 16:37:20 mail amavis[14072]: (14072-10) (!)do_unrar: Error reading: Bad file descriptor at (eval 72) line 810, <GEN88> line 2.

```

Even after upgrade to unrar-3.7.8 I got the same error  :Sad: 

----------

## Heretiqu3

Had a same problem.

emerge -C unrar; emerge rar

Add [Solved] please.

----------

## hanj

 *Heretiqu3 wrote:*   

> Had a same problem.
> 
> emerge -C unrar; emerge rar
> 
> Add [Solved] please.

 

Any changes to amavis.conf? remove unrar and rar.. or will it just handle that?

Thanks!

hanji

----------

## henson

 *Heretiqu3 wrote:*   

> Had a same problem.
> 
> emerge -C unrar; emerge rar
> 
> Add [Solved] please.

 

rar is a binary <blech>, plus requires emul libs under amd64.

The underlying problem is unrar>3.73 breaks the av- option (see bug 206470). For now, the best bet is to downgrade unrar to 3.73...

----------

## hexa

Or remove -av- option from /usr/sbin/amavisd  :Wink: 

----------

