rspamd binaries fail with illegal instruction 4:

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

rspamd binaries fail with illegal instruction 4:

Horst Simon
Hi,

I installed rspamd on macOS High Sierra Version 10.13.6, it build and installed oh, but when starting rspamd it fails with illegal instruction 4:, the same for rspamadm command. Anyone hs this successful running?

Thanks and Regards,
Horst Simon
Mobile: +61 414 303-433

Reply | Threaded
Open this post in threaded view
|

Re: rspamd binaries fail with illegal instruction 4:

Steven Smith
I installed rspamd on macOS High Sierra Version 10.13.6, it build and installed oh, but when starting rspamd it fails with illegal instruction 4:, the same for rspamadm command. Anyone hs this successful running?

I have rspamd running flawlessly on 10.14.

I suggest dumping a core and posting the issue upstream. See:

One thing to look for is the necessary linking of the native PCRE libraries—I’m not sure if they changed from 10.13 to 10.14. The upstream PCRE libraries that MacPorts uses have some jit bug. That’s just a guess.

Other possibilities are something specific with a configuration, file permissions, or buildbot compiler optimization settings.
Reply | Threaded
Open this post in threaded view
|

Re: rspamd binaries fail with illegal instruction 4:

Chris Jones

On 09/09/2019 11:17 am, Steven Smith wrote:

>> I installed rspamd on macOS High Sierra Version 10.13.6, it build and
>> installed oh, but when starting rspamd it fails with illegal
>> instruction 4:, the same for rspamadm command. Anyone hs this
>> successful running?
>
> I have rspamd running flawlessly on 10.14.
>
> I suggest dumping a core and posting the issue upstream. See:
> •
> https://rspamd.com/doc/faq.html#how-to-figure-out-why-rspamd-process-crashed
> • https://github.com/rspamd/rspamd/issues/2884
>
> One thing to look for is the necessary linking of the native PCRE
> libraries—I’m not sure if they changed from 10.13 to 10.14. The upstream
> PCRE libraries that MacPorts uses have some jit bug. That’s just a guess.
>
> Other possibilities are something specific with a configuration, file
> permissions, or buildbot compiler optimization settings.

'illegal instruction' usually points to the build enabling some hardware
dependent capability, such as AVX/AVX2. If you then attempt to run these
binaries on machines that do not support those features, you get this
sort of issue.

The solution is to make sure the default builds, as performed by the
buildbots, assume a minimum CPU type that is applicable to all possible
hardware running that OS. Usually this means just assuming a basic
x96_64 CPU.

If then, you want to allow the use of additional CPU features, the
standard way to tend to do this in MacPorts is to provide a 'native'
variant for the port in question, which a) allows build to determine
what the host machine supports and enables that and b) implicitly forces
a build from source (as the native variant is not enabled by default).

The first thing to do is check the buildbot logs, to see if you can work
out what CPU feature the builds are enabling, and then proceed from there.

https://ports.macports.org/port/rspamd/builds

Chris
Reply | Threaded
Open this post in threaded view
|

Re: rspamd binaries fail with illegal instruction 4:

Chris Jones

> The first thing to do is check the buildbot logs, to see if you can work
> out what CPU feature the builds are enabling, and then proceed from there.
>
> https://ports.macports.org/port/rspamd/builds

from the 10.13 configure step

-- Performing Test HAVE_AVX2_C_COMPILER
-- Performing Test HAVE_AVX2_C_COMPILER - Success
-- Compilation of avx asm set is supported
-- Compilation of sse2 asm set is supported
-- Compilation of sse3 asm set is supported
-- Compilation of ssse3 asm set is supported
-- Compilation of sse41 asm set is supported
-- Compilation of sse42 asm set is supported
-- AVX2 support is added
-- AVX support is added
-- SSE2 support is added
-- SSE41 support is added
-- SSE42 support is added

enabling AVX(2) is likely the issue here, as this is not guaranteed to
be available. My 2011 mac mini running 10.13 does not have AVX2, for
instance.

So the (default) build needs to be configured to not enable AVX, even if
the host CPU (buildbot) supports it.

Chris

>
> Chris
Reply | Threaded
Open this post in threaded view
|

Re: rspamd binaries fail with illegal instruction 4:

Horst Simon
Thanks for the replies, it is a Macbook Pro 2011 i try to run it on, will try the suggestions
Horst

Horst Simon
Mobile: <a href="tel:+61%20414%20303-433" dir="ltr" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="4/1" style="text-decoration-color: rgba(88, 86, 214, 0.258824);">+61 414 303-433
Phone: <a href="tel:+61%203%208555-2322" dir="ltr" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="4/2" style="text-decoration-color: rgba(88, 86, 214, 0.258824);">+61 3 8555-2322
______________________________________________________________________
Please consider your environmental
responsibility before printing this email.

  

This message (including any attachments) is intended only for the use of the individual or entity
to which it is addressed and may contain information that is non-public, proprietary, privileged,
confidential, and exempt from disclosure under applicable law or may constitute as attorney work
product. If you are not the intended recipient, you are hereby notified that any use, dissemination,
distribution, or copying of this communication is strictly prohibited. If you have received this
communication in error, notify us immediately by telephone and (i) destroy this message if a facsimile
or (ii) delete this message immediately if this is an electronic communication.

On 9 Sep 2019, at 20:57, Chris Jones <[hidden email]> wrote:


The first thing to do is check the buildbot logs, to see if you can work out what CPU feature the builds are enabling, and then proceed from there.
https://ports.macports.org/port/rspamd/builds

from the 10.13 configure step

-- Performing Test HAVE_AVX2_C_COMPILER
-- Performing Test HAVE_AVX2_C_COMPILER - Success
-- Compilation of avx asm set is supported
-- Compilation of sse2 asm set is supported
-- Compilation of sse3 asm set is supported
-- Compilation of ssse3 asm set is supported
-- Compilation of sse41 asm set is supported
-- Compilation of sse42 asm set is supported
-- AVX2 support is added
-- AVX support is added
-- SSE2 support is added
-- SSE41 support is added
-- SSE42 support is added

enabling AVX(2) is likely the issue here, as this is not guaranteed to be available. My 2011 mac mini running 10.13 does not have AVX2, for instance.

So the (default) build needs to be configured to not enable AVX, even if the host CPU (buildbot) supports it.

Chris

Chris
Reply | Threaded
Open this post in threaded view
|

Re: rspamd binaries fail with illegal instruction 4:

Chris Jones

On 09/09/2019 12:35 pm, Horst Simon wrote:
> Thanks for the replies, it is a Macbook Pro 2011 i try to run it on,

In which case I am going to bet the issue is your machine does not
support avx2,  which the default build of rspamd apears to be enabling.

One easy way to check is to force a build from source, and see what that
does. The build should then detect what the build machine, your machine,
supports and thus disable what is causing the problem.

If that works, then please file a ticket at

https://trac.macports.org/wiki/Tickets

asking the maintainer or spamd to address the issue, by disabling the
automatic CPU capabilities detection in the default builds.

cheers Chris


> will try the suggestions
> Horst
>
>> *Horst Simon*
>> Mobile: +61 414 303-433 <tel:+61%20414%20303-433>
>> Phone: +61 3 8555-2322 <tel:+61%203%208555-2322>
>> Email: [hidden email] <mailto:[hidden email]>
>> ______________________________________________________________________
>> Please consider your environmental
>> responsibility before printing this email.
>>
>> This message (including any attachments) is intended only for the use
>> of the individual or entity
>> to which it is addressed and may contain information that is
>> non-public, proprietary, privileged,
>> confidential, and exempt from disclosure under applicable law or may
>> constitute as attorney work
>> product. If you are not the intended recipient, you are hereby
>> notified that any use, dissemination,
>> distribution, or copying of this communication is strictly prohibited.
>> If you have received this
>> communication in error, notify us immediately by telephone and (i)
>> destroy this message if a facsimile
>> or (ii) delete this message immediately if this is an electronic
>> communication.
>
> On 9 Sep 2019, at 20:57, Chris Jones <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>>
>>> The first thing to do is check the buildbot logs, to see if you can
>>> work out what CPU feature the builds are enabling, and then proceed
>>> from there.
>>> https://ports.macports.org/port/rspamd/builds
>>
>> from the 10.13 configure step
>>
>> -- Performing Test HAVE_AVX2_C_COMPILER
>> -- Performing Test HAVE_AVX2_C_COMPILER - Success
>> -- Compilation of avx asm set is supported
>> -- Compilation of sse2 asm set is supported
>> -- Compilation of sse3 asm set is supported
>> -- Compilation of ssse3 asm set is supported
>> -- Compilation of sse41 asm set is supported
>> -- Compilation of sse42 asm set is supported
>> -- AVX2 support is added
>> -- AVX support is added
>> -- SSE2 support is added
>> -- SSE41 support is added
>> -- SSE42 support is added
>>
>> enabling AVX(2) is likely the issue here, as this is not guaranteed to
>> be available. My 2011 mac mini running 10.13 does not have AVX2, for
>> instance.
>>
>> So the (default) build needs to be configured to not enable AVX, even
>> if the host CPU (buildbot) supports it.
>>
>> Chris
>>
>>> Chris
Reply | Threaded
Open this post in threaded view
|

Re: rspamd binaries fail with illegal instruction 4:

Horst Simon
I tried a build from source and it showed following for AVX

-- Performing Test C_HAS_AVX_1
-- Performing Test C_HAS_AVX_1 - Failed
-- Performing Test C_HAS_AVX_2
-- Performing Test C_HAS_AVX_2 - Success
-- Performing Test C_HAS_AVX2_1
-- Performing Test C_HAS_AVX2_1 - Failed
-- Performing Test C_HAS_AVX2_2
-- Performing Test C_HAS_AVX2_2 - Success

Will download the tar file and try with AVX disabled. I tried it on my iMac 2017 macOS 10.14.6 and it works fine on this one.

Regards,
Horst Simon

On 09 Sep 2019, at 21:47, Chris Jones <[hidden email]> wrote:


On 09/09/2019 12:35 pm, Horst Simon wrote:
Thanks for the replies, it is a Macbook Pro 2011 i try to run it on,

In which case I am going to bet the issue is your machine does not support avx2,  which the default build of rspamd apears to be enabling.

One easy way to check is to force a build from source, and see what that does. The build should then detect what the build machine, your machine, supports and thus disable what is causing the problem.

If that works, then please file a ticket at

https://trac.macports.org/wiki/Tickets

asking the maintainer or spamd to address the issue, by disabling the automatic CPU capabilities detection in the default builds.

cheers Chris


will try the suggestions
Horst
*Horst Simon*
Mobile: +61 414 303-433 <tel:+61%20414%20303-433>
Phone: +61 3 8555-2322 <tel:+61%203%208555-2322>
Email: [hidden email] <mailto:[hidden email]>
______________________________________________________________________
Please consider your environmental
responsibility before printing this email.

This message (including any attachments) is intended only for the use of the individual or entity
to which it is addressed and may contain information that is non-public, proprietary, privileged,
confidential, and exempt from disclosure under applicable law or may constitute as attorney work
product. If you are not the intended recipient, you are hereby notified that any use, dissemination,
distribution, or copying of this communication is strictly prohibited. If you have received this
communication in error, notify us immediately by telephone and (i) destroy this message if a facsimile
or (ii) delete this message immediately if this is an electronic communication.
On 9 Sep 2019, at 20:57, Chris Jones <[hidden email] <mailto:[hidden email]>> wrote:

The first thing to do is check the buildbot logs, to see if you can work out what CPU feature the builds are enabling, and then proceed from there.
https://ports.macports.org/port/rspamd/builds

from the 10.13 configure step

-- Performing Test HAVE_AVX2_C_COMPILER
-- Performing Test HAVE_AVX2_C_COMPILER - Success
-- Compilation of avx asm set is supported
-- Compilation of sse2 asm set is supported
-- Compilation of sse3 asm set is supported
-- Compilation of ssse3 asm set is supported
-- Compilation of sse41 asm set is supported
-- Compilation of sse42 asm set is supported
-- AVX2 support is added
-- AVX support is added
-- SSE2 support is added
-- SSE41 support is added
-- SSE42 support is added

enabling AVX(2) is likely the issue here, as this is not guaranteed to be available. My 2011 mac mini running 10.13 does not have AVX2, for instance.

So the (default) build needs to be configured to not enable AVX, even if the host CPU (buildbot) supports it.

Chris

Chris

Reply | Threaded
Open this post in threaded view
|

Re: rspamd binaries fail with illegal instruction 4:

Chris Jones

what does

sysctl -a | grep machdep.cpu.features

give on the machine with the issues ? Does it list AVX2 ?

rspamd was recently (by Steven Smith) given a bit of an overhaul, adding
a few new deps and features, see the history of recent commits at

https://github.com/macports/macports-ports/commits/master/mail/rspamd/Portfile

it could be one of these is giving the problems, not the rspamd build
itself. Try seeing if build one of the various deps from source helps.

Chris

On 09/09/2019 2:11 pm, Horst Simon wrote:

> I tried a build from source and it showed following for AVX
>
> -- Performing Test C_HAS_AVX_1
> -- Performing Test C_HAS_AVX_1 - Failed
> -- Performing Test C_HAS_AVX_2
> -- Performing Test C_HAS_AVX_2 - Success
> -- Performing Test C_HAS_AVX2_1
> -- Performing Test C_HAS_AVX2_1 - Failed
> -- Performing Test C_HAS_AVX2_2
> -- Performing Test C_HAS_AVX2_2 - Success
>
> Will download the tar file and try with AVX disabled. I tried it on my
> iMac 2017 macOS 10.14.6 and it works fine on this one.
>
> Regards,
> *Horst Simon*
>
>> On 09 Sep 2019, at 21:47, Chris Jones <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>
>> On 09/09/2019 12:35 pm, Horst Simon wrote:
>>> Thanks for the replies, it is a Macbook Pro 2011 i try to run it on,
>>
>> In which case I am going to bet the issue is your machine does not
>> support avx2,  which the default build of rspamd apears to be enabling.
>>
>> One easy way to check is to force a build from source, and see what
>> that does. The build should then detect what the build machine, your
>> machine, supports and thus disable what is causing the problem.
>>
>> If that works, then please file a ticket at
>>
>> https://trac.macports.org/wiki/Tickets
>>
>> asking the maintainer or spamd to address the issue, by disabling the
>> automatic CPU capabilities detection in the default builds.
>>
>> cheers Chris
>>
>>
>>> will try the suggestions
>>> Horst
>>>> *Horst Simon*
>>>> Mobile: +61 414 303-433 <tel:+61%20414%20303-433>
>>>> Phone: +61 3 8555-2322 <tel:+61%203%208555-2322>
>>>> Email: [hidden email] <mailto:[hidden email]>
>>>> ______________________________________________________________________
>>>> Please consider your environmental
>>>> responsibility before printing this email.
>>>>
>>>> This message (including any attachments) is intended only for the
>>>> use of the individual or entity
>>>> to which it is addressed and may contain information that is
>>>> non-public, proprietary, privileged,
>>>> confidential, and exempt from disclosure under applicable law or may
>>>> constitute as attorney work
>>>> product. If you are not the intended recipient, you are hereby
>>>> notified that any use, dissemination,
>>>> distribution, or copying of this communication is strictly
>>>> prohibited. If you have received this
>>>> communication in error, notify us immediately by telephone and (i)
>>>> destroy this message if a facsimile
>>>> or (ii) delete this message immediately if this is an electronic
>>>> communication.
>>> On 9 Sep 2019, at 20:57, Chris Jones <[hidden email]
>>> <mailto:[hidden email]>> wrote:
>>>>
>>>>> The first thing to do is check the buildbot logs, to see if you can
>>>>> work out what CPU feature the builds are enabling, and then proceed
>>>>> from there.
>>>>> https://ports.macports.org/port/rspamd/builds
>>>>
>>>> from the 10.13 configure step
>>>>
>>>> -- Performing Test HAVE_AVX2_C_COMPILER
>>>> -- Performing Test HAVE_AVX2_C_COMPILER - Success
>>>> -- Compilation of avx asm set is supported
>>>> -- Compilation of sse2 asm set is supported
>>>> -- Compilation of sse3 asm set is supported
>>>> -- Compilation of ssse3 asm set is supported
>>>> -- Compilation of sse41 asm set is supported
>>>> -- Compilation of sse42 asm set is supported
>>>> -- AVX2 support is added
>>>> -- AVX support is added
>>>> -- SSE2 support is added
>>>> -- SSE41 support is added
>>>> -- SSE42 support is added
>>>>
>>>> enabling AVX(2) is likely the issue here, as this is not guaranteed
>>>> to be available. My 2011 mac mini running 10.13 does not have AVX2,
>>>> for instance.
>>>>
>>>> So the (default) build needs to be configured to not enable AVX,
>>>> even if the host CPU (buildbot) supports it.
>>>>
>>>> Chris
>>>>
>>>>> Chris
>
Reply | Threaded
Open this post in threaded view
|

Re: rspamd binaries fail with illegal instruction 4:

Horst Simon
Hi Chris,

Failing machine output Macbook Pro 13 inch 2010
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 DTES64 MON DSCPL VMX SMX EST TM2 SSSE3 CX16 TPR PDCM SSE4.1 XSAVE

Working machine output Macbook Pro 15 inch 2010
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX SMX EST TM2 SSSE3 CX16 TPR PDCM SSE4.1 SSE4.2 POPCNT AES PCID

I can not see any reference to AVX on either CPU. I downloaded the rspamd tar ball from macports, is there documentation on how to make changes and how to disable certain feature for the build?

I use the 13 inch MacBook mainly as aptest machine so it is not to important if it doesn’t work as long as I have a working one.

Thanks and Regards,
Horst

On 09 Sep 2019, at 23:21, Chris Jones <[hidden email]> wrote:


what does

sysctl -a | grep machdep.cpu.features

give on the machine with the issues ? Does it list AVX2 ?

rspamd was recently (by Steven Smith) given a bit of an overhaul, adding a few new deps and features, see the history of recent commits at

https://github.com/macports/macports-ports/commits/master/mail/rspamd/Portfile

it could be one of these is giving the problems, not the rspamd build itself. Try seeing if build one of the various deps from source helps.

Chris

On 09/09/2019 2:11 pm, Horst Simon wrote:
I tried a build from source and it showed following for AVX
-- Performing Test C_HAS_AVX_1
-- Performing Test C_HAS_AVX_1 - Failed
-- Performing Test C_HAS_AVX_2
-- Performing Test C_HAS_AVX_2 - Success
-- Performing Test C_HAS_AVX2_1
-- Performing Test C_HAS_AVX2_1 - Failed
-- Performing Test C_HAS_AVX2_2
-- Performing Test C_HAS_AVX2_2 - Success
Will download the tar file and try with AVX disabled. I tried it on my iMac 2017 macOS 10.14.6 and it works fine on this one.
Regards,
*Horst Simon*
On 09 Sep 2019, at 21:47, Chris Jones <[hidden email] <mailto:[hidden email]>> wrote:


On 09/09/2019 12:35 pm, Horst Simon wrote:
Thanks for the replies, it is a Macbook Pro 2011 i try to run it on,

In which case I am going to bet the issue is your machine does not support avx2,  which the default build of rspamd apears to be enabling.

One easy way to check is to force a build from source, and see what that does. The build should then detect what the build machine, your machine, supports and thus disable what is causing the problem.

If that works, then please file a ticket at

https://trac.macports.org/wiki/Tickets

asking the maintainer or spamd to address the issue, by disabling the automatic CPU capabilities detection in the default builds.

cheers Chris


will try the suggestions
Horst
*Horst Simon*
Mobile: +61 414 303-433 <tel:+61%20414%20303-433>
Phone: +61 3 8555-2322 <tel:+61%203%208555-2322>
Email: [hidden email] <mailto:[hidden email]>
______________________________________________________________________
Please consider your environmental
responsibility before printing this email.

This message (including any attachments) is intended only for the use of the individual or entity
to which it is addressed and may contain information that is non-public, proprietary, privileged,
confidential, and exempt from disclosure under applicable law or may constitute as attorney work
product. If you are not the intended recipient, you are hereby notified that any use, dissemination,
distribution, or copying of this communication is strictly prohibited. If you have received this
communication in error, notify us immediately by telephone and (i) destroy this message if a facsimile
or (ii) delete this message immediately if this is an electronic communication.
On 9 Sep 2019, at 20:57, Chris Jones <[hidden email] <mailto:[hidden email]>> wrote:

The first thing to do is check the buildbot logs, to see if you can work out what CPU feature the builds are enabling, and then proceed from there.
https://ports.macports.org/port/rspamd/builds

from the 10.13 configure step

-- Performing Test HAVE_AVX2_C_COMPILER
-- Performing Test HAVE_AVX2_C_COMPILER - Success
-- Compilation of avx asm set is supported
-- Compilation of sse2 asm set is supported
-- Compilation of sse3 asm set is supported
-- Compilation of ssse3 asm set is supported
-- Compilation of sse41 asm set is supported
-- Compilation of sse42 asm set is supported
-- AVX2 support is added
-- AVX support is added
-- SSE2 support is added
-- SSE41 support is added
-- SSE42 support is added

enabling AVX(2) is likely the issue here, as this is not guaranteed to be available. My 2011 mac mini running 10.13 does not have AVX2, for instance.

So the (default) build needs to be configured to not enable AVX, even if the host CPU (buildbot) supports it.

Chris

Chris

Reply | Threaded
Open this post in threaded view
|

Re: rspamd binaries fail with illegal instruction 4:

Chris Jones


On 9 Sep 2019, at 11:21 pm, Horst Simon <[hidden email]> wrote:

Hi Chris,

Failing machine output Macbook Pro 13 inch 2010
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 DTES64 MON DSCPL VMX SMX EST TM2 SSSE3 CX16 TPR PDCM SSE4.1 XSAVE

Working machine output Macbook Pro 15 inch 2010
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX SMX EST TM2 SSSE3 CX16 TPR PDCM SSE4.1 SSE4.2 POPCNT AES PCID

I can not see any reference to AVX on either CPU.

AVX was just a guess. Based in the above it could be sse 4.2 that is the issue. The machine that is failing lacks this (which actually makes that cpu pretty old I would guess)

I downloaded the rspamd tar ball from macports, is there documentation on how to make changes and how to disable certain feature for the build?

I do not know exactly what tarball you are referring to, but thats not how its done in macports. You will need to checkout the ports tree from github, or just the portfile in question, and patch that accordingly. See


For more details.

Chris


I use the 13 inch MacBook mainly as aptest machine so it is not to important if it doesn’t work as long as I have a working one.

Thanks and Regards,
Horst

On 09 Sep 2019, at 23:21, Chris Jones <[hidden email]> wrote:


what does

sysctl -a | grep machdep.cpu.features

give on the machine with the issues ? Does it list AVX2 ?

rspamd was recently (by Steven Smith) given a bit of an overhaul, adding a few new deps and features, see the history of recent commits at

https://github.com/macports/macports-ports/commits/master/mail/rspamd/Portfile

it could be one of these is giving the problems, not the rspamd build itself. Try seeing if build one of the various deps from source helps.

Chris

On 09/09/2019 2:11 pm, Horst Simon wrote:
I tried a build from source and it showed following for AVX
-- Performing Test C_HAS_AVX_1
-- Performing Test C_HAS_AVX_1 - Failed
-- Performing Test C_HAS_AVX_2
-- Performing Test C_HAS_AVX_2 - Success
-- Performing Test C_HAS_AVX2_1
-- Performing Test C_HAS_AVX2_1 - Failed
-- Performing Test C_HAS_AVX2_2
-- Performing Test C_HAS_AVX2_2 - Success
Will download the tar file and try with AVX disabled. I tried it on my iMac 2017 macOS 10.14.6 and it works fine on this one.
Regards,
*Horst Simon*
On 09 Sep 2019, at 21:47, Chris Jones <[hidden email] <[hidden email]>> wrote:


On 09/09/2019 12:35 pm, Horst Simon wrote:
Thanks for the replies, it is a Macbook Pro 2011 i try to run it on,

In which case I am going to bet the issue is your machine does not support avx2,  which the default build of rspamd apears to be enabling.

One easy way to check is to force a build from source, and see what that does. The build should then detect what the build machine, your machine, supports and thus disable what is causing the problem.

If that works, then please file a ticket at

https://trac.macports.org/wiki/Tickets

asking the maintainer or spamd to address the issue, by disabling the automatic CPU capabilities detection in the default builds.

cheers Chris


will try the suggestions
Horst
*Horst Simon*
Mobile: +61 414 303-433 <<a href="tel:+61%20414%20303-433">tel:+61%20414%20303-433>
Phone: +61 3 8555-2322 <<a href="tel:+61%203%208555-2322">tel:+61%203%208555-2322>
Email: [hidden email] <[hidden email]>
______________________________________________________________________
Please consider your environmental
responsibility before printing this email.

This message (including any attachments) is intended only for the use of the individual or entity
to which it is addressed and may contain information that is non-public, proprietary, privileged,
confidential, and exempt from disclosure under applicable law or may constitute as attorney work
product. If you are not the intended recipient, you are hereby notified that any use, dissemination,
distribution, or copying of this communication is strictly prohibited. If you have received this
communication in error, notify us immediately by telephone and (i) destroy this message if a facsimile
or (ii) delete this message immediately if this is an electronic communication.
On 9 Sep 2019, at 20:57, Chris Jones <[hidden email] <[hidden email]>> wrote:

The first thing to do is check the buildbot logs, to see if you can work out what CPU feature the builds are enabling, and then proceed from there.
https://ports.macports.org/port/rspamd/builds

from the 10.13 configure step

-- Performing Test HAVE_AVX2_C_COMPILER
-- Performing Test HAVE_AVX2_C_COMPILER - Success
-- Compilation of avx asm set is supported
-- Compilation of sse2 asm set is supported
-- Compilation of sse3 asm set is supported
-- Compilation of ssse3 asm set is supported
-- Compilation of sse41 asm set is supported
-- Compilation of sse42 asm set is supported
-- AVX2 support is added
-- AVX support is added
-- SSE2 support is added
-- SSE41 support is added
-- SSE42 support is added

enabling AVX(2) is likely the issue here, as this is not guaranteed to be available. My 2011 mac mini running 10.13 does not have AVX2, for instance.

So the (default) build needs to be configured to not enable AVX, even if the host CPU (buildbot) supports it.

Chris

Chris

Reply | Threaded
Open this post in threaded view
|

Re: rspamd binaries fail with illegal instruction 4:

Steven Smith
AVX was just a guess. Based in the above it could be sse 4.2 that is the issue. The machine that is failing lacks this (which actually makes that cpu pretty old I would guess)

A core dump is the most efficient diagnostic. It’s fast and easy. The modern macOS instructions are here: https://rspamd.com/doc/faq.html#how-to-figure-out-why-rspamd-process-crashed
Reply | Threaded
Open this post in threaded view
|

Re: rspamd binaries fail with illegal instruction 4:

ryandesign2
Administrator
In reply to this post by Horst Simon


On Sep 9, 2019, at 02:32, Horst Simon wrote:
>
> I installed rspamd on macOS High Sierra Version 10.13.6, it build and installed oh, but when starting rspamd it fails with illegal instruction 4:, the same for rspamadm command. Anyone hs this successful running?
>

I noticed a couple recent builds fail on the buildbot with "Illegal instruction: 4". I don't know what to make of that.

https://trac.macports.org/ticket/59022

An older ticket also mentions "Illegal instruction: 4" though the reason might not be the same:

https://trac.macports.org/ticket/55632

Reply | Threaded
Open this post in threaded view
|

Re: rspamd binaries fail with illegal instruction 4:

Chris Jones
Hi,

It might be interesting to see exactly what cpu capabilities are support on the build bots. Could you run

sysctl -a | grep machdep.cpu.features
On them, and post what it gives ?
Chris

On 12 Sep 2019, at 7:46 pm, Ryan Schmidt <[hidden email]> wrote:



On Sep 9, 2019, at 02:32, Horst Simon wrote:

I installed rspamd on macOS High Sierra Version 10.13.6, it build and installed oh, but when starting rspamd it fails with illegal instruction 4:, the same for rspamadm command. Anyone hs this successful running?


I noticed a couple recent builds fail on the buildbot with "Illegal instruction: 4". I don't know what to make of that.

https://trac.macports.org/ticket/59022

An older ticket also mentions "Illegal instruction: 4" though the reason might not be the same:

https://trac.macports.org/ticket/55632

Reply | Threaded
Open this post in threaded view
|

Re: rspamd binaries fail with illegal instruction 4:

ryandesign2
Administrator


On Sep 12, 2019, at 14:10, Chris Jones wrote:

> It might be interesting to see exactly what cpu capabilities are support on the build bots. Could you run
>
> sysctl -a | grep machdep.cpu.features
> On them, and post what it gives ?

Sure.


Snow Leopard i386

FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS MMX FXSR SSE SSE2 SS HTT SSE3 MON SSSE3 SSE4.1 SSE4.2 POPCNT VMM


Snow Leopard x86_64
Lion
Mountain Lion
Mavericks
Yosemite
El Capitan
Sierra

FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS MMX FXSR SSE SSE2 SS HTT SSE3 MON SSSE3 CX16 SSE4.1 SSE4.2 POPCNT VMM


High Sierra
Mojave

FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS MMX FXSR SSE SSE2 SS HTT SSE3 MON SSSE3 CX16 SSE4.1 SSE4.2 x2APIC POPCNT VMM


High Sierra and Mojave use VM version 9, since they would not boot on earlier VM versions. Sierra and earlier are set to VM version 8.

Reply | Threaded
Open this post in threaded view
|

Re: rspamd binaries fail with illegal instruction 4:

Horst Simon
In reply to this post by Steven Smith
Hi Steven,

I was finally able to run a test on the failing rspamd, I am not familiar with reading this core dumps and followed the instructions given in the URL, i got following from lldb:


lldb `which /opt/local/bin/rspamd` -c /cores/core.89034 
(lldb) target create "/opt/local/bin/rspamd" --core "/cores/core.89034"
Core file '/cores/core.89034' (x86_64) was loaded.
(lldb) bt all
* thread #1, stop reason = signal SIGSTOP
  * frame #0: 0x000000000f4c74b1 librspamd-server.dylib`ue2::hs_compile_multi_int(char const* const*, unsigned int const*, unsigned int const*, hs_expr_ext const* const*, unsigned int, unsigned int, hs_platform_info const*, hs_database**, hs_compile_error**, ue2::Grey const&) + 513
    frame #1: 0x000000000f4c7c40 librspamd-server.dylib`hs_compile_multi + 96
    frame #2: 0x000000000f2daff5 librspamd-server.dylib`rspamd_multipattern_compile + 370
    frame #3: 0x000000000f376b70 librspamd-server.dylib`rspamd_language_detector_init + 5664
    frame #4: 0x000000000f31d570 librspamd-server.dylib`rspamd_config_read + 1262
    frame #5: 0x000000010d479de8 rspamd`load_rspamd_config + 107
    frame #6: 0x000000010d479499 rspamd`main + 1373
    frame #7: 0x00007fff55d0f015 libdyld.dylib`start + 1
(lldb) 

It created two core dumps every minute until I unloaded rspamd.

Regards,
Horst

On 10 Sep 2019, at 11:40, Steven Smith <[hidden email]> wrote:

AVX was just a guess. Based in the above it could be sse 4.2 that is the issue. The machine that is failing lacks this (which actually makes that cpu pretty old I would guess)

A core dump is the most efficient diagnostic. It’s fast and easy. The modern macOS instructions are here: https://rspamd.com/doc/faq.html#how-to-figure-out-why-rspamd-process-crashed

Reply | Threaded
Open this post in threaded view
|

Re: rspamd binaries fail with illegal instruction 4:

Steven Smith
I’m not an expert either, but it looks like it’s related to hyperscan (“ue2::hs_compile_multi_int”).


I suggest two paths:

1. Poke at hyperscan and see if that’s the problem on this specific architecture.

2. That’s exactly the information the upstream author needs to pinpoint the problem. Please open an issue at https://github.com/rspamd/rspamd/issues and post that very same lldb output, along with the error message, and ask for help there. He’ll probably send you along to hyperscan, but would also have insight if it’s something rspamd-specific.

I was finally able to run a test on the failing rspamd, I am not familiar with reading this core dumps and followed the instructions given in the URL, i got following from lldb:


lldb `which /opt/local/bin/rspamd` -c /cores/core.89034 
(lldb) target create "/opt/local/bin/rspamd" --core "/cores/core.89034"
Core file '/cores/core.89034' (x86_64) was loaded.
(lldb) bt all
* thread #1, stop reason = signal SIGSTOP
  * frame #0: 0x000000000f4c74b1 librspamd-server.dylib`ue2::hs_compile_multi_int(char const* const*, unsigned int const*, unsigned int const*, hs_expr_ext const* const*, unsigned int, unsigned int, hs_platform_info const*, hs_database**, hs_compile_error**, ue2::Grey const&) + 513
    frame #1: 0x000000000f4c7c40 librspamd-server.dylib`hs_compile_multi + 96
    frame #2: 0x000000000f2daff5 librspamd-server.dylib`rspamd_multipattern_compile + 370
    frame #3: 0x000000000f376b70 librspamd-server.dylib`rspamd_language_detector_init + 5664
    frame #4: 0x000000000f31d570 librspamd-server.dylib`rspamd_config_read + 1262
    frame #5: 0x000000010d479de8 rspamd`load_rspamd_config + 107
    frame #6: 0x000000010d479499 rspamd`main + 1373
    frame #7: 0x00007fff55d0f015 libdyld.dylib`start + 1
(lldb) 

It created two core dumps every minute until I unloaded rspamd.

Regards,
Horst

On 10 Sep 2019, at 11:40, Steven Smith <[hidden email]> wrote:

AVX was just a guess. Based in the above it could be sse 4.2 that is the issue. The machine that is failing lacks this (which actually makes that cpu pretty old I would guess)

A core dump is the most efficient diagnostic. It’s fast and easy. The modern macOS instructions are here: https://rspamd.com/doc/faq.html#how-to-figure-out-why-rspamd-process-crashed