[BUG] rspamd 2.5-2 gives a core dump on start

Interesting. I am on the linux-rpi4-next kernel and installed:

rspamd opensmtpd-filter-rspamd

Screenshot at 2020-07-08 14-27-53

Can you post

systemctl cat rspamd.service
[ray@pi4 ~]$ systemctl cat rspamd.service
# /usr/lib/systemd/system/rspamd.service
[Unit]
Description=rapid spam filtering system
After=nss-lookup.target network-online.target
Documentation=https://rspamd.com/doc/

[Service]
LimitNOFILE=1048576
NonBlocking=true
ExecStart=/usr/bin/rspamd -c /etc/rspamd/rspamd.conf -f
ExecReload=/bin/kill -HUP $MAINPID
User=rspamd
RuntimeDirectory=rspamd
RuntimeDirectoryMode=0755
lines 1-14...skipping...
# /usr/lib/systemd/system/rspamd.service
[Unit]
Description=rapid spam filtering system
After=nss-lookup.target network-online.target
Documentation=https://rspamd.com/doc/

[Service]
LimitNOFILE=1048576
NonBlocking=true
ExecStart=/usr/bin/rspamd -c /etc/rspamd/rspamd.conf -f
ExecReload=/bin/kill -HUP $MAINPID
User=rspamd
RuntimeDirectory=rspamd
RuntimeDirectoryMode=0755
Restart=always
lines 1-15...skipping...
# /usr/lib/systemd/system/rspamd.service
[Unit]
Description=rapid spam filtering system
After=nss-lookup.target network-online.target
Documentation=https://rspamd.com/doc/

[Service]
LimitNOFILE=1048576
NonBlocking=true
ExecStart=/usr/bin/rspamd -c /etc/rspamd/rspamd.conf -f
ExecReload=/bin/kill -HUP $MAINPID
User=rspamd
RuntimeDirectory=rspamd
RuntimeDirectoryMode=0755
Restart=always

lines 1-16...skipping...
# /usr/lib/systemd/system/rspamd.service
[Unit]
Description=rapid spam filtering system
After=nss-lookup.target network-online.target
Documentation=https://rspamd.com/doc/

[Service]
LimitNOFILE=1048576
NonBlocking=true
ExecStart=/usr/bin/rspamd -c /etc/rspamd/rspamd.conf -f
ExecReload=/bin/kill -HUP $MAINPID
User=rspamd
RuntimeDirectory=rspamd
RuntimeDirectoryMode=0755
Restart=always

[Install]
lines 1-17...skipping...
# /usr/lib/systemd/system/rspamd.service
[Unit]
Description=rapid spam filtering system
After=nss-lookup.target network-online.target
Documentation=https://rspamd.com/doc/

[Service]
LimitNOFILE=1048576
NonBlocking=true
ExecStart=/usr/bin/rspamd -c /etc/rspamd/rspamd.conf -f
ExecReload=/bin/kill -HUP $MAINPID
User=rspamd
RuntimeDirectory=rspamd
RuntimeDirectoryMode=0755
Restart=always

[Install]
WantedBy=multi-user.target
lines 1-18...skipping...
# /usr/lib/systemd/system/rspamd.service
[Unit]
Description=rapid spam filtering system
After=nss-lookup.target network-online.target
Documentation=https://rspamd.com/doc/

[Service]
LimitNOFILE=1048576
NonBlocking=true
ExecStart=/usr/bin/rspamd -c /etc/rspamd/rspamd.conf -f
ExecReload=/bin/kill -HUP $MAINPID
User=rspamd
RuntimeDirectory=rspamd
RuntimeDirectoryMode=0755
Restart=always

[Install]
WantedBy=multi-user.target

A lot of redundancy.

[ray@pi4 ~]$ cat /usr/lib/systemd/system/rspamd.service
[Unit]
Description=rapid spam filtering system
After=nss-lookup.target network-online.target
Documentation=https://rspamd.com/doc/

[Service]
LimitNOFILE=1048576
NonBlocking=true
ExecStart=/usr/bin/rspamd -c /etc/rspamd/rspamd.conf -f
ExecReload=/bin/kill -HUP $MAINPID
User=rspamd
RuntimeDirectory=rspamd
RuntimeDirectoryMode=0755
Restart=always

[Install]
WantedBy=multi-user.target

@Darksky, how can I update the kernel 4.19.127-1 that I got installed from Manjaro-ARM-minimal-rpi4-20.06.img.xz that you provided on Manjaro ARM 20.06 released! ?

sudo pacman -S linux-rpi4-next

Yep, usually this command just outputs the content of the service file and additional files.

I had recently some problems with the systemd security features on ARM , but it looks like as if rspamd.service does not use any of these. So it doesn't relate to this problem.

Thanks!

I just reflashed my SD card. Will setup, update it and try with the new kernel.

I am actually on kernel 5.4.50-2 in the unstable branch but think 5.4.50-1
should be ok.

Another thing to note is to make sure all of the files are up to date on the images.

sudo pacman -Syu

Still the same problem... :frowning:

How can I put the same kernel you are using to see if this solves the problem?


██████████████████  ████████   peracchi@ninja
██████████████████  ████████   --------------
██████████████████  ████████   OS: Manjaro ARM Linux aarch64
██████████████████  ████████   Host: Raspberry Pi 4 Model B Rev 1.2
████████            ████████   Kernel: 5.4.47-1-MANJARO-ARM
████████  ████████  ████████   Uptime: 4 mins
████████  ████████  ████████   Packages: 266 (pacman)
████████  ████████  ████████   Shell: bash 5.0.17
████████  ████████  ████████   Resolution: 1920x1080
████████  ████████  ████████   Terminal: /dev/pts/0
████████  ████████  ████████   CPU: BCM2835 (4) @ 1.500GHz
████████  ████████  ████████   Memory: 120MiB / 3810MiB
████████  ████████  ████████
████████  ████████  ████████

$ pstree
systemd─┬─NetworkManager───2*[{NetworkManager}]
        ├─agetty
        ├─brcm_patchram_p
        ├─dbus-daemon
        ├─dhcpcd─┬─dhcpcd───dhcpcd
        │        └─2*[dhcpcd]
        ├─f2b/server───4*[{f2b/server}]
        ├─haveged
        ├─nginx───nginx
        ├─sshd───sshd───sshd───bash───pstree
        ├─systemd───(sd-pam)
        ├─systemd-homed
        ├─systemd-journal
        ├─systemd-logind
        ├─systemd-network
        ├─systemd-timesyn───{systemd-timesyn}
        ├─systemd-udevd
        ├─systemd-userdbd───3*[systemd-userwor]
        └─wpa_supplicant

$ pacman -Si rspamd
Repository      : community
Name            : rspamd
Version         : 2.5-2
Description     : Fast, free and open-source spam filtering system
Architecture    : aarch64
URL             : https://rspamd.com
Licenses        : BSD
Groups          : None
Provides        : None
Depends On      : file  glib2  glibc  icu  jemalloc  libevent  libsodium  luajit  openblas  openssl  pcre  sqlite  zlib
Optional Deps   : redis: Redis cache and data storage
Conflicts With  : None
Replaces        : None
Download Size   : 2.52 MiB
Installed Size  : 9.64 MiB
Packager        : Arch Linux ARM Build System <builder+n1@archlinuxarm.org>
Build Date      : Fri 01 May 2020 02:54:45 PM -03
Validated By    : MD5 Sum  SHA-256 Sum  Signature

$ sudo systemctl status rspamd
● rspamd.service - rapid spam filtering system
     Loaded: loaded (/usr/lib/systemd/system/rspamd.service; disabled; vendor preset: disabled)
     Active: inactive (dead)
       Docs: https://rspamd.com/doc/

$ sudo systemctl start rspamd

Jul 08 17:22:27 ninja sudo[525]: peracchi : TTY=pts/0 ; PWD=/home/peracchi ; USER=root ; COMMAND=/usr/bin/systemctl start rspamd
Jul 08 17:22:27 ninja sudo[525]: pam_unix(sudo:session): session opened for user root by peracchi(uid=0)
Jul 08 17:22:27 ninja systemd[1]: Started rapid spam filtering system.
Jul 08 17:22:27 ninja sudo[525]: pam_unix(sudo:session): session closed for user root
Jul 08 17:22:27 ninja systemd[1]: Created slice system-systemd\x2dcoredump.slice.
Jul 08 17:22:27 ninja systemd[1]: Started Process Core Dump (PID 536/UID 0).
Jul 08 17:22:28 ninja systemd[1]: rspamd.service: Main process exited, code=dumped, status=11/SEGV
Jul 08 17:22:28 ninja systemd[1]: rspamd.service: Failed with result 'core-dump'.
Jul 08 17:22:28 ninja systemd-coredump[537]: Process 531 (rspamd) of user 974 dumped core.

                                             Stack trace of thread 531:
                                             #0  0x0000007f8a718120 lpeg_allocate_mem_low (librspamd-server.so + 0x1e5120)
                                             #1  0x0000007f8a716820 n/a (librspamd-server.so + 0x1e3820)
                                             #2  0x0000007f8a2e3cd4 n/a (libluajit-5.1.so.2 + 0x9cd4)
                                             #3  0x0000007f8a331b78 lua_pcall (libluajit-5.1.so.2 + 0x57b78)
                                             #4  0x0000007f8a5f7d54 n/a (librspamd-server.so + 0xc4d54)
                                             #5  0x0000007f8a7ec184 ucl_parser_add_chunk_full (librspamd-server.so + 0x2b9184)
                                             #6  0x0000007f8a5fd0e0 rspamd_config_parse_ucl (librspamd-server.so + 0xca0e0)
                                             #7  0x0000007f8a60158c rspamd_config_read (librspamd-server.so + 0xce58c)
                                             #8  0x000000557b597f08 n/a (rspamd-2.5 + 0x17f08)
                                             #9  0x000000557b58961c n/a (rspamd-2.5 + 0x961c)
                                             #10 0x0000007f8a01bd90 __libc_start_main (libc.so.6 + 0x23d90)
                                             #11 0x000000557b58a120 n/a (rspamd-2.5 + 0xa120)
                                             #12 0x000000557b58a120 n/a (rspamd-2.5 + 0xa120)

$ sudo pacman -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: Starting full system upgrade...
 there is nothing to do

Or maybe you can provide a link to download and flash the same minimal image you are using. :roll_eyes:

I do not for sure know the issue is kernel. The -2 was a minor thing with a .dts. I am not using a minimal image. I flashed this mate image a couple of days ago using manjaro-arm installer.

All of your files up to date?

Yes, all updated.

Maybe it's something related with the minimal image. I will try with KDE edition.

I used the minimal image you provided here: Manjaro ARM 20.06 released! (I checked the MD5, the file is ok)

Well it did not survive a reboot and now I am getting the same as you.

Sorry to hear that...

On Manjaro KDE, on my notebook, it works.

The problem is only on Manjaro ARM.

All of these packages that was installed with this are arch-arm packages (we do not build them) but complaining to them saying you have manjaro they will delete you. And they do not offer a 64bit for the pi4 yet so does not look promising to get any help from them.

Results with Manjaro-ARM-kde-plasma-rpi4-20.06.img.xz flashed to SD Card and same steps repeated:


██████████████████  ████████   peracchi@ninja
██████████████████  ████████   --------------
██████████████████  ████████   OS: Manjaro ARM Linux aarch64
██████████████████  ████████   Host: Raspberry Pi 4 Model B Rev 1.2
████████            ████████   Kernel: 4.19.127-1-MANJARO-ARM
████████  ████████  ████████   Uptime: 4 mins
████████  ████████  ████████   Packages: 778 (pacman)
████████  ████████  ████████   Shell: bash 5.0.17
████████  ████████  ████████   Resolution: 1920x1080
████████  ████████  ████████   Terminal: /dev/pts/0
████████  ████████  ████████   CPU: BCM2835 (4) @ 1.500GHz
████████  ████████  ████████   Memory: 592MiB / 3819MiB
████████  ████████  ████████
████████  ████████  ████████

$ pstree
systemd─┬─NetworkManager───2*[{NetworkManager}]
        ├─baloo_file───{baloo_file}
        ├─bluetoothd
        ├─brcm_patchram_p
        ├─dbus-daemon
        ├─f2b/server───4*[{f2b/server}]
        ├─gmenudbusmenupr───2*[{gmenudbusmenupr}]
        ├─haveged
        ├─kaccess───2*[{kaccess}]
        ├─kded5───6*[{kded5}]
        ├─kdeinit5─┬─file.so
        │          └─klauncher───2*[{klauncher}]
        ├─ksmserver───2*[{ksmserver}]
        ├─kwalletd5───2*[{kwalletd5}]
        ├─kwin_x11───4*[{kwin_x11}]
        ├─lvmetad
        ├─nginx───nginx
        ├─org_kde_powerde───4*[{org_kde_powerde}]
        ├─pamac-tray-appi───2*[{pamac-tray-appi}]
        ├─plasmashell───6*[{plasmashell}]
        ├─polkit-kde-auth───4*[{polkit-kde-auth}]
        ├─polkitd───7*[{polkitd}]
        ├─rtkit-daemon───2*[{rtkit-daemon}]
        ├─sddm─┬─Xorg
        │      ├─sddm-helper───startplasma-x11───{startplasma-x11}
        │      └─{sddm}
        ├─sshd───sshd───sshd───bash───pstree
        ├─start_kdeinit
        ├─systemd─┬─(sd-pam)
        │         ├─at-spi-bus-laun─┬─dbus-daemon
        │         │                 └─3*[{at-spi-bus-laun}]
        │         ├─at-spi2-registr───2*[{at-spi2-registr}]
        │         ├─dbus-daemon
        │         ├─dconf-service───2*[{dconf-service}]
        │         ├─kactivitymanage───5*[{kactivitymanage}]
        │         ├─kglobalaccel5───2*[{kglobalaccel5}]
        │         ├─kscreen_backend───2*[{kscreen_backend}]
        │         ├─obexd
        │         └─pulseaudio─┬─gsettings-helpe───3*[{gsettings-helpe}]
        │                      └─2*[{pulseaudio}]
        ├─systemd-homed
        ├─systemd-journal
        ├─systemd-logind
        ├─systemd-network
        ├─systemd-timesyn───{systemd-timesyn}
        ├─systemd-udevd
        ├─systemd-userdbd───3*[systemd-userwor]
        ├─udisksd───4*[{udisksd}]
        ├─upowerd───2*[{upowerd}]
        ├─wpa_supplicant
        └─xembedsniproxy───2*[{xembedsniproxy}]

$ pacman -Si rspamd
Repository      : community
Name            : rspamd
Version         : 2.5-2
Description     : Fast, free and open-source spam filtering system
Architecture    : aarch64
URL             : https://rspamd.com
Licenses        : BSD
Groups          : None
Provides        : None
Depends On      : file  glib2  glibc  icu  jemalloc  libevent  libsodium  luajit  openblas  openssl  pcre  sqlite  zlib
Optional Deps   : redis: Redis cache and data storage
Conflicts With  : None
Replaces        : None
Download Size   : 2.52 MiB
Installed Size  : 9.64 MiB
Packager        : Arch Linux ARM Build System <builder+n1@archlinuxarm.org>
Build Date      : Fri 01 May 2020 02:54:45 PM -03
Validated By    : MD5 Sum  SHA-256 Sum  Signature

$ sudo systemctl status rspamd
● rspamd.service - rapid spam filtering system
     Loaded: loaded (/usr/lib/systemd/system/rspamd.service; disabled; vendor preset: disabled)
     Active: inactive (dead)
       Docs: https://rspamd.com/doc/

$ sudo systemctl start rspamd

Jul 08 19:00:23 ninja sudo[968]: peracchi : TTY=pts/0 ; PWD=/home/peracchi ; USER=root ; COMMAND=/usr/bin/systemctl status rspamd
Jul 08 19:00:23 ninja sudo[968]: pam_unix(sudo:session): session opened for user root by peracchi(uid=0)
Jul 08 19:00:23 ninja sudo[968]: pam_unix(sudo:session): session closed for user root
Jul 08 19:00:53 ninja sudo[982]: peracchi : TTY=pts/0 ; PWD=/home/peracchi ; USER=root ; COMMAND=/usr/bin/systemctl start rspamd
Jul 08 19:00:53 ninja sudo[982]: pam_unix(sudo:session): session opened for user root by peracchi(uid=0)
Jul 08 19:00:53 ninja systemd[1]: Started rapid spam filtering system.
Jul 08 19:00:53 ninja sudo[982]: pam_unix(sudo:session): session closed for user root
Jul 08 19:00:53 ninja systemd[1]: Created slice system-systemd\x2dcoredump.slice.
Jul 08 19:00:53 ninja systemd[1]: Started Process Core Dump (PID 994/UID 0).
Jul 08 19:00:54 ninja systemd[1]: rspamd.service: Main process exited, code=dumped, status=11/SEGV
Jul 08 19:00:54 ninja systemd[1]: rspamd.service: Failed with result 'core-dump'.
Jul 08 19:00:54 ninja systemd-coredump[995]: Process 988 (rspamd) of user 970 dumped core.

                                             Stack trace of thread 988:
                                             #0  0x0000007f948e9120 lpeg_allocate_mem_low (librspamd-server.so + 0x1e5120)
                                             #1  0x0000007f948e7820 n/a (librspamd-server.so + 0x1e3820)
                                             #2  0x0000007f9448ccd4 n/a (libluajit-5.1.so.2 + 0x9cd4)
                                             #3  0x0000007f944dab78 lua_pcall (libluajit-5.1.so.2 + 0x57b78)
                                             #4  0x0000007f947c8d54 n/a (librspamd-server.so + 0xc4d54)
                                             #5  0x0000007f949bd184 ucl_parser_add_chunk_full (librspamd-server.so + 0x2b9184)
                                             #6  0x0000007f947ce0e0 rspamd_config_parse_ucl (librspamd-server.so + 0xca0e0)
                                             #7  0x0000007f947d258c rspamd_config_read (librspamd-server.so + 0xce58c)
                                             #8  0x000000556f567f08 n/a (rspamd-2.5 + 0x17f08)
                                             #9  0x000000556f55961c n/a (rspamd-2.5 + 0x961c)
                                             #10 0x0000007f941c4d90 __libc_start_main (libc.so.6 + 0x23d90)
                                             #11 0x000000556f55a120 n/a (rspamd-2.5 + 0xa120)
                                             #12 0x000000556f55a120 n/a (rspamd-2.5 + 0xa120)

Now I flashed the SD Card with Arch Linux (following instructions from https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-4 ), repeated the same steps and it worked.

I prefer Manjaro, will continue trying to make it work until I find a way or someone with more knowledge find the solution. :smiley:

As @Darksky only get it to work until reboot, I powered off, turned it on and tested again. Still works.


                   -`                    alarm@rainbow
                  .o+`                   -------------
                 `ooo/                   OS: Arch Linux ARM armv7l
                `+oooo:                  Host: Raspberry Pi 4 Model B Rev 1.1
               `+oooooo:                 Kernel: 5.4.50-1-ARCH
               -+oooooo+:                Uptime: 4 mins
             `/:-:++oooo+:               Packages: 237 (pacman)
            `/++++/+++++++:              Shell: bash 5.0.17
           `/++++++++++++++:             Terminal: /dev/pts/0
          `/+++ooooooooooooo/`           CPU: BCM2711 (4) @ 1.500GHz
         ./ooosssso++osssssso+`          Memory: 71MiB / 3837MiB
        .oossssso-````/ossssss+`
       -osssssso.      :ssssssso.
      :osssssss/        osssso+++.
     /ossssssss/        +ssssooo/-
   `/ossssso+/:-        -:/+osssso+-
  `+sso+:-`                 `.-/+oso:
 `++:.                           `-/+/
 .`                                 `/

$ pstree
systemd-+-NetworkManager---2*[{NetworkManager}]
        |-agetty
        |-dbus-daemon
        |-f2b/server---4*[{f2b/server}]
        |-haveged
        |-nginx---nginx
        |-sshd---sshd---sshd---bash---pstree
        |-systemd---(sd-pam)
        |-systemd-journal
        |-systemd-logind
        |-systemd-network
        |-systemd-resolve
        |-systemd-timesyn---{systemd-timesyn}
        |-systemd-udevd
        `-wpa_supplicant

$ pacman -Si rspamd
Repository      : community
Name            : rspamd
Version         : 2.5-2
Description     : Fast, free and open-source spam filtering system
Architecture    : armv7h
URL             : https://rspamd.com
Licenses        : BSD
Groups          : None
Provides        : None
Depends On      : file  glib2  glibc  icu  jemalloc  libevent  libsodium  luajit  openblas  openssl  pcre  sqlite  zlib
Optional Deps   : redis: Redis cache and data storage
Conflicts With  : None
Replaces        : None
Download Size   : 2.42 MiB
Installed Size  : 8.52 MiB
Packager        : Arch Linux ARM Build System <builder+xu4@archlinuxarm.org>
Build Date      : Fri May 1 13:13:39 2020
Validated By    : MD5 Sum  SHA-256 Sum  Signature

$ sudo systemctl status rspamd
* rspamd.service - rapid spam filtering system
     Loaded: loaded (/usr/lib/systemd/system/rspamd.service; disabled; vendor preset: disabled)
     Active: inactive (dead)
       Docs: https://rspamd.com/doc/

$ sudo systemctl start rspamd

Jul 08 20:41:57 rainbow sudo[451]:    alarm : TTY=pts/0 ; PWD=/home/alarm ; USER=root ; COMMAND=/usr/bin/systemctl start rspamd
Jul 08 20:41:57 rainbow sudo[451]: pam_unix(sudo:session): session opened for user root by alarm(uid=0)
Jul 08 20:41:57 rainbow systemd[1]: Started rapid spam filtering system.

$ sudo systemctl status rspamd
* rspamd.service - rapid spam filtering system
     Loaded: loaded (/usr/lib/systemd/system/rspamd.service; disabled; vendor preset: disabled)
     Active: active (running) since Wed 2020-07-08 20:41:57 -03; 1min 43s ago
       Docs: https://rspamd.com/doc/
   Main PID: 454 (rspamd)
      Tasks: 5 (limit: 4915)
     CGroup: /system.slice/rspamd.service
             |-454 rspamd: main process
             |-456 rspamd: rspamd_proxy process (localhost:11332)
             |-457 rspamd: controller process (localhost:11334)
             |-458 rspamd: normal process (localhost:11333)
             `-459 rspamd: normal process (localhost:11333)

Jul 08 20:41:57 rainbow systemd[1]: Started rapid spam filtering system.

$ sudo systemctl start rspamd

Jul 08 20:53:07 rainbow sudo[434]:    alarm : TTY=pts/0 ; PWD=/home/alarm ; USER=root ; COMMAND=/usr/bin/systemctl start rspamd
Jul 08 20:53:07 rainbow sudo[434]: pam_unix(sudo:session): session opened for user root by alarm(uid=0)
Jul 08 20:53:07 rainbow systemd[1]: Started rapid spam filtering system.

$ sudo systemctl status rspamd
* rspamd.service - rapid spam filtering system
     Loaded: loaded (/usr/lib/systemd/system/rspamd.service; disabled; vendor preset: disabled)
     Active: active (running) since Wed 2020-07-08 20:53:07 -03; 1min 50s ago
       Docs: https://rspamd.com/doc/
   Main PID: 437 (rspamd)
      Tasks: 5 (limit: 4915)
     CGroup: /system.slice/rspamd.service
             |-437 rspamd: main process
             |-438 rspamd: rspamd_proxy process (localhost:11332)
             |-439 rspamd: controller process (localhost:11334)
             |-440 rspamd: normal process (localhost:11333)
             `-441 rspamd: normal process (localhost:11333)

Jul 08 20:53:07 rainbow systemd[1]: Started rapid spam filtering system.

Forum kindly sponsored by