amavis[12345]: (12345-02) (!)file utility failed: exit 1

Scot Hetzel swhetzel at gmail.com
Thu Oct 24 05:45:19 UTC 2013


On Wed, Oct 23, 2013 at 1:25 PM, Michael Grimm
<trashcan at odo.in-berlin.de> wrote:
> Hi --
>
> On 23.10.2013, at 20:03, Mark Martinec <Mark.Martinec+freebsd at ijs.si> wrote:
>
>> The text "ERROR: line 163: regex error 17, (illegal byte sequence)"
>> comes from the file utility, unmodified.
>>
>>> 1) Is the file utility to blame?
>>
>> Yes.
>>
>>> 2) My setup?
>>
>> Possibly (e.g. broken magic database).
>>
>> Looks like a known bug in the file utility, already fixed upstream:
>>
>>  http://bugs.gw.com/my_view_page.php
>>    (search for: illegal byte sequence)
>>
>> Should be reproducible by running the file(1) from a command line
>> (in the same/similar environment as amavisd is running, just in case).
>
> Confirmed, it's throwing the same error message[1]:
>
> | mail> /usr/local/bin/file zzz
> | zzz: ERROR: line 163: regex error 17, (illegal byte sequence)
>
> Thank you for helping me understand that issue. Now, I will wait for
> a corrected file port.
>
> With kind regards,

To cause the error to occur do the following:

cd /usr/ports/sysutils/file
make install
cd /usr/ports/sysutils/file/work/file-5.15/magic/Magdir
LC_ALL=en_US.UTF-8 /usr/local/bin/file -d -m windows
/usr/ports/sysutils/file/Makefile

I tested all the magic files in the directory using:

sh
(for i in `ls` ; do echo "==== $i ====" ; LC_ALL=en_US.UTF-8
/usr/local/bin/file -d -m $i /usr/ports/sysutils/file/Makefile ; done)
2>&1 > ../fine.test

The only one that failed was the 'windows' magic file.  Which is bug 292

http://bugs.gw.com/view.php?id=292

I was able to resolve the bug in PR 183257.

http://www.freebsd.org/cgi/query-pr.cgi?pr=183257

Could someone check that the regex is correct an commit it to the port
and submit it upstream.

Thanks,

Scot


More information about the freebsd-ports mailing list