FS#78383 - [rspamd][hyperscan] update breaks rspamd, likely needs rebuild

Attached to Project: Community Packages
Opened by Alexander Diana (Roukoswarf) - Thursday, 04 May 2023, 02:07 GMT
Last edited by Toolybird (Toolybird) - Friday, 26 May 2023, 03:29 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Maxime Gauduin (Alucryd)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

When starting rspamd with hyperscan 5.4.2-1, I received the following error:

#893(main) rspamd_url_init: start compiling of 9628 TLD suffixes; it might take a long time
#893(main) rspamd_multipattern_compile: cannot allocate scratch space for hyperscan: error code -5
#893(main) rspamd_url_init: cannot compile url matcher static patterns, fatal error: cannot allocate scratch space for hyperscan: error code -5

From what I can find, it seems like rspamd might need to be built against the hyperscan version in some cases?

Reverting to hyperscan 5.4.1-1, rspamd startup works as intended.

Additional info:
* Package Versions Used: rspamd-3.5-1, hyperscan-5.4.2-1

Steps to reproduce:
1. Install rspamd-3.5-1, hyperscan-5.4.2-1
2. Start rspamd
This task depends upon

Closed by  Toolybird (Toolybird)
Friday, 26 May 2023, 03:29 GMT
Reason for closing:  Fixed
Additional comments about closing:  rspamd 3.5-2
Comment by Toolybird (Toolybird) - Thursday, 04 May 2023, 03:49 GMT
It's the same error as in  FS#77672 ...
Comment by Alexander Diana (Roukoswarf) - Thursday, 04 May 2023, 04:19 GMT
I guess I should have searched closed issues, apologies.
Should it be a user action to fix on every upgrade, or should hyperscan be held until rspamd updates to match it?
Comment by Alexander Klang (casu) - Sunday, 07 May 2023, 09:05 GMT
Concluding for myself that this might become a recurring issue (was affected by  FS#77672  and now #FS78383), I just created a pacman hook that applies the quick fix mentioned in https://github.com/rspamd/rspamd/issues/4329#issuecomment-1313630789 to rspamd whenever hyperscan is getting an update. Hope this may help anyone else as well.

/etc/pacman.d/hooks/hyperscan.hook

[Trigger]

Operation = Upgrade
Type = Package
Target = hyperscan

[Action]

Description = Delete old Rspamd .unser-files
When = PostTransaction
Exec = /usr/bin/find /var/lib/rspamd -type f -name '*.unser' -delete
Depends = rspamd
Comment by Maxime Gauduin (Alucryd) - Sunday, 14 May 2023, 20:17 GMT
I've just included the hook in the rspamd package, while we wait for a permanent solution from upstream. Thanks Alexander.

Loading...