syncloud / platform

Run popular services on your device with one click
https://syncloud.org
GNU General Public License v3.0
393 stars 40 forks source link

Nextcloud / Mail App - Sync Error - Segmentation Fault #599

Closed flovl closed 1 year ago

flovl commented 2 years ago

Hi, after a post in the discourse group and a short talk with boris i create this Issue.

System: Nextcloud: 21.0.2 Mail App: 1.10.2 PHP:

root@odroid-xu3and4:~# snap run nextcloud.php -v
PHP 7.4.20 (cli) (built: Jun  4 2021 04:05:06) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.20, Copyright (c), by Zend Technologies

Error: /snap/nextcloud/210624280/php/bin/php.sh: line 7: 24556 Segmentation fault MAGICK_CODER_MODULE_PATH=$(echo ${DIR}/usr/lib/ImageMagickCoders) PHP_INI_SCAN_DIR=${DIR}/usr/local/etc/php/conf.d ${DIR}/lib/*-linux*/ld-*.so --library-path $LIBS ${DIR}/usr/local/bin/php "$@"

Log:

root@odroid-xu3and4:~# snap run nextcloud.occ mail:account:sync 1
[debug] account is up to date, skipping mailbox sync
[debug] Skipping mailbox sync for 8
[debug] Skipping mailbox sync for 1
[debug] Skipping mailbox sync for 5
[debug] Skipping mailbox sync for 3
[debug] Skipping mailbox sync for 12
[debug] Skipping mailbox sync for 4
[debug] Skipping mailbox sync for 13
[debug] Skipping mailbox sync for 14
[debug] Skipping mailbox sync for 9
[debug] Skipping mailbox sync for 2
[debug] Skipping mailbox sync for 7
[debug] Skipping mailbox sync for 10
[debug] Skipping mailbox sync for 11
[debug] Syncing 6
[debug] Locking mailbox 6 for new messages sync
[debug] Locking mailbox 6 for changed messages sync
[debug] Locking mailbox 6 for vanished messages sync
[debug] Running partial sync for 6
[debug] partial sync 1:INBOX - get all known UIDs took 0s
/snap/nextcloud/210624280/php/bin/php.sh: line 7: 24556 Segmentation fault      MAGICK_CODER_MODULE_PATH=$(echo ${DIR}/usr/lib/ImageMagickCoders) PHP_INI_SCAN_DIR=${DIR}/usr/local/etc/php/conf.d ${DIR}/lib/*-linux*/ld-*.so --library-path $LIBS ${DIR}/usr/local/bin/php "$@"

Ref.: https://syncloud.discourse.group/t/nextcloud-21-0-2-mail-app-1-10-2-sync-error-segmentation-fault/89

Thanks for your help in advance.

Best Regards Florian

cyberb commented 2 years ago

Still cannot reproduce the error, added the following automated test:

snap run nextcloud.occ app:install mail 
snap run nextcloud.occ mail:account:create user test user@syncloud.test syncloud.test 143 None user@syncloud.test password syncloud.test 25 None test test
snap run nextcloud.occ mail:account:sync 1 -vvv

Produced this:

[debug] Skipping mailbox sync for 1
[debug] Syncing 5
[debug] Locking mailbox 5 for new messages sync
[debug] Locking mailbox 5 for changed messages sync
[debug] Locking mailbox 5 for vanished messages sync
[debug] Running initial sync for 5
[debug] Initial sync 1:INBOX - fetch all messages from IMAP took 0s
[debug] Initial sync 1:INBOX - persist messages in database took 0s
[debug] Initial sync 1:INBOX took 0s
[debug] Unlocking mailbox 5 from vanished messages sync
[debug] Unlocking mailbox 5 from changed messages sync
[debug] Unlocking mailbox 5 from new messages sync
[debug] Skipping mailbox sync for 2
[debug] Skipping mailbox sync for 4

Let me try to have some emails in the test

cyberb commented 2 years ago

Sent a test message and still no error:

[debug] Skipping mailbox sync for 1
[debug] Syncing 5
[debug] Locking mailbox 5 for new messages sync
[debug] Locking mailbox 5 for changed messages sync
[debug] Locking mailbox 5 for vanished messages sync
[debug] Running initial sync for 5
[debug] Initial sync 1:INBOX - fetch all messages from IMAP took 0s
[debug] Initial sync 1:INBOX - persist messages in database took 0s
[debug] Initial sync 1:INBOX took 0s
[debug] Unlocking mailbox 5 from vanished messages sync
[debug] Unlocking mailbox 5 from changed messages sync
[debug] Unlocking mailbox 5 from new messages sync
[debug] Skipping mailbox sync for 2
[debug] Skipping mailbox sync for 4
[debug] Skipping mailbox sync for 3
[debug] Account 1 has 1 messages for threading
[debug] Threading 1 messages - build ID table took 0s
[debug] Threading 1 messages - build root container took 0s
[debug] Threading 1 messages - free ID table took 0s
[debug] Threading 1 messages - prune containers took 0s
[debug] Threading 1 messages - group by subject took 0s
[debug] Threading 1 messages took 0s
[debug] Account 1 has 1 threads
[debug] Account 1 has 0 messages with a new thread IDs
10MB of memory used

can you paste more info like the output of:

free
flovl commented 2 years ago

Hi, thanks for the feedback.

The following is the output from free:

root@odroid-xu3and4:~# free
             total       used       free     shared    buffers     cached
Mem:       2042376    1719736     322640      86156     300220     971820
-/+ buffers/cache:     447696    1594680
Swap:            0          0          0
cyberb commented 2 years ago

300M memory left free, not sure if that is the problem. Do you run other apps? Can you remove them and try again? Also after the error coupd you send logs from Settings - Support?