FS#78380 - [memcached] core-dumps when attempting to use it as a caching layer for mediawiki

Attached to Project: Arch Linux
Opened by Jamin Collins (jamincollins) - Wednesday, 03 May 2023, 21:34 GMT
Last edited by Toolybird (Toolybird) - Saturday, 13 May 2023, 00:01 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
memcached core-dumps when attempting to use it as a caching layer for mediawiki

Additional info:
* memcached 1.6.18-1
* mediawiki 1.39.3-1
* php-fpm 8.2.5-1

* config and/or log files etc.

## Shared memory settings
$wgMainCacheType = CACHE_MEMCACHED;
$wgMemCachedServers = [ '127.0.0.1:11211' ];

* link to upstream bug report, if any
haven't filed an upstream bug report because it seems this may be Arch Linux specific
https://bbs.archlinux.org/viewtopic.php?id=278914

Steps to reproduce:
1. Install mediawiki, php-fpm, and memcached
2. Configure mediawiki to use memcached
3. Attempt to load pages within mediawiki

May 01 22:24:28 solitaire systemd[1]: Started memcached daemon.
May 01 22:24:49 solitaire memcached[955]: Seccomp policy failure. Caught syscall 096. This is either an exploit attempt, or your system is not supported yet.
May 01 22:24:50 solitaire systemd[1]: memcached.service: Main process exited, code=dumped, status=31/SYS
May 01 22:24:50 solitaire systemd[1]: memcached.service: Failed with result 'core-dump'.
May 01 22:24:50 solitaire systemd[1]: memcached.service: Scheduled restart job, restart counter is at 14.
May 01 22:24:50 solitaire systemd[1]: Stopped memcached daemon.
May 01 22:24:50 solitaire systemd[1]: Started memcached daemon.
This task depends upon

Closed by  Toolybird (Toolybird)
Saturday, 13 May 2023, 00:01 GMT
Reason for closing:  Fixed
Additional comments about closing:  memcached 1.6.19-1
Comment by Jamin Collins (jamincollins) - Wednesday, 03 May 2023, 21:46 GMT
Looks like the seccomp feature is experimental:

--enable-seccomp Enable seccomp restrictions EXPERIMENTAL

https://github.com/memcached/memcached/commit/0a3d2d199ec46b57e59f82acec7a401b0781a7a1
Comment by Toolybird (Toolybird) - Thursday, 04 May 2023, 04:19 GMT
> seccomp

Yeah, please see the comments in the commit message here [1]. Not sure if a backtrace will help, but it won't hurt. Preferred method on Arch these days:

$ coredumpctl gdb (then answer y when it asks "Enable debuginfod for this session?")
(gdb) set logging enabled
(gdb) bt (or bt full)

Then post gdb.txt

[1] https://github.com/archlinux/svntogit-packages/commit/e9cc3568ef5f9d8e6e1d2b55d9bef508c1ed2628
Comment by Jamin Collins (jamincollins) - Thursday, 04 May 2023, 16:05 GMT
$ cat gdb.txt
#0 0x00007f2ef5137f3d in ?? ()
No symbol table info available.
#1 0x0000563bf664019d in ?? ()
No symbol table info available.
#2 0x000000000005baf6 in ?? ()
No symbol table info available.
#3 0x00007f2ef509ef50 in ?? ()
No symbol table info available.
#4 0x0000000000000007 in ?? ()
No symbol table info available.
#5 0x0000000000000000 in ?? ()
No symbol table info available.
#0 0x00007f2ef5137f3d in ?? () from /usr/lib/libc.so.6
No symbol table info available.
#1 0x00007f2ef509ef50 in ?? () from /usr/lib/libc.so.6
No symbol table info available.
#2 0x0000000000000000 in ?? ()
No symbol table info available.
quit
Comment by Levente Polyak (anthraxx) - Thursday, 04 May 2023, 16:35 GMT
@Jamin: you do not seem to be using debuginfod to get the debug symbols.

can you check:
1. if the environment variable $DEBUGINFOD_URLS is set to https://debuginfod.archlinux.org
2. inside gdb, enter "show debuginfod urls" to verify the same URL
3. inside gdb, check if debug is enabled "show debuginfod enabled", otherwise force it with "set debuginfod enabled on"
Comment by Levente Polyak (anthraxx) - Friday, 05 May 2023, 16:26 GMT
@Jamin: can you please test the new upgrade: 1.6.19-1 and report back if that works for you
Comment by Jamin Collins (jamincollins) - Thursday, 11 May 2023, 21:07 GMT
It seems to be working, but it seems this can break anytime a kernel is updated.
Comment by Toolybird (Toolybird) - Saturday, 13 May 2023, 00:01 GMT
Further discussion upstream [1]

[1] https://github.com/memcached/memcached/issues/1028

Loading...