mod_ruid2 causes segfault with Debian 9

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
9,158
This is more of a report than anything else, but we've found mod_ruid2 doesn't play well on Debian 9.
Until we find some other fix, current solution is to use php-fpm, instead of mod_php, and mod_ruid2, which has the added benefit of letting apache use mpm_event, instead of mpm_prefork (requied for mod_php).

So if you're testing with Debian 9, run this:
Code:
cd /usr/local/directadmin/custombuild
./build set php1_mode php-fpm
./build set mod_ruid2 n
./build php n
./build rewrite_confs

I'll change the default in the setup.sh for now.
If we find a solution or more info on the problem, we'll update or fix whatever it is that's causing it.

If anyone else knows, let us know :)

Current httpd segfault trace:
Code:
Thread 1 "httpd" received signal SIGABRT, Aborted.__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt full
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
        set = {__val = {0, 140737353476168, 140737488347856, 8589927088, 140737353475312, 140737488347840, 140737320956012, 252833149, 4294967295, 140737353477832, 140737315061208, 140737353477832, 1,
            140737353487272, 140737488348020, 93825000453112}}
        pid = <optimized out>
        tid = <optimized out>
#1  0x00007ffff5ae93fa in __GI_abort () at abort.c:89
        save_stage = 2
        act = {__sigaction_handler = {sa_handler = 0xffffffff, sa_sigaction = 0xffffffff}, sa_mask = {__val = {0, 18374966855136706560, 0, 72058693549555712, 72057594037927935, 720687490904385125,
              7795014556134368097, 64, 0, 1, 140737320972052, 0, 0, 140737488348448, 140737488348480, 140737488348416}}, sa_flags = -134880016, sa_restorer = 0x7fffffffe520}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x00007ffff605ecee in __nptl_setxid_error (cmdp=cmdp@entry=0x7fffffffe520, error=<optimized out>) at allocatestack.c:1074
        olderror = <optimized out>
#3  0x00007ffff605ef27 in __nptl_setxid (cmdp=0x7fffffffe520) at allocatestack.c:1181
        signalled = <optimized out>
        result = 0
        self = 0x7ffff7f57880
        runp = <optimized out>
        error = <optimized out>
#4  0x00007ffff5b69c26 in __GI_setgroups (n=<optimized out>, groups=<optimized out>) at ../sysdeps/unix/sysv/linux/setgroups.c:33
        __p = <optimized out>
        __cmd = {syscall_no = 116, id = {2, 140737488348544, 0}, cntr = 0, error = 1}
        __result = <optimized out>
        groups = <optimized out>
        n = <optimized out>
#5  0x00007ffff4abc767 in ruid_set_perm () from /usr/lib/apache/mod_ruid2.so
No symbol table info available.
#6  0x00007ffff4abce05 in ruid_setup () from /usr/lib/apache/mod_ruid2.so
No symbol table info available.
#7  0x00005555555c6b1e in ap_run_post_read_request ()
No symbol table info available.
#8  0x00005555555c3d6f in ap_read_request ()
No symbol table info available.
#9  0x0000555555662196 in ap_process_http_sync_connection ()
No symbol table info available.
#10 0x00005555556621f4 in ap_process_http_connection ()
No symbol table info available.
#11 0x00005555555f0180 in ap_run_process_connection ()
No symbol table info available.
#12 0x00005555555f0831 in ap_process_connection ()
No symbol table info available.
#13 0x00007ffff44aba26 in child_main () from /usr/lib/apache/mod_mpm_prefork.so
No symbol table info available.
#14 0x00007ffff44abb35 in make_child () from /usr/lib/apache/mod_mpm_prefork.so
No symbol table info available.
#15 0x00007ffff44ac26a in prefork_run () from /usr/lib/apache/mod_mpm_prefork.so
No symbol table info available.
#16 0x00005555555b9130 in ap_run_mpm ()
No symbol table info available.
#17 0x00005555555b013f in main ()
No symbol table info available.
once we have more time, we'll try and compile mod_ruid2.so with the -g flag to gdb gives us more info about where in ruid_set_perm() function it's segfaulting.

John
 
I've been trying to setup a directadmin server on a fresh Debian 9 install. I've tried switching to php-fpm, as stated above, but I still get the same error and my webpage is unreachable.

My log looks like this when I try to view a page in my web browser.

Code:
[Wed Aug 09 16:37:16.156670 2017] [core:notice] [pid 373:tid 139789210740864] AH00052: child pid 1261 exit signal Aborted (6)
[Wed Aug 09 16:37:16.156751 2017] [core:notice] [pid 373:tid 139789210740864] AH00052: child pid 1263 exit signal Aborted (6)
[Wed Aug 09 16:37:18.159487 2017] [core:notice] [pid 373:tid 139789210740864] AH00052: child pid 1558 exit signal Aborted (6)
[Wed Aug 09 16:37:20.162200 2017] [core:notice] [pid 373:tid 139789210740864] AH00052: child pid 1626 exit signal Aborted (6)
[Wed Aug 09 16:37:22.164964 2017] [core:notice] [pid 373:tid 139789210740864] AH00052: child pid 1694 exit signal Aborted (6)
[Wed Aug 09 16:37:24.167739 2017] [core:notice] [pid 373:tid 139789210740864] AH00052: child pid 1762 exit signal Aborted (6)
[Wed Aug 09 16:37:26.170393 2017] [core:notice] [pid 373:tid 139789210740864] AH00052: child pid 1830 exit signal Aborted (6)
[Wed Aug 09 16:37:28.173047 2017] [core:notice] [pid 373:tid 139789210740864] AH00052: child pid 1898 exit signal Aborted (6)
[Wed Aug 09 16:37:30.175976 2017] [core:notice] [pid 373:tid 139789210740864] AH00052: child pid 1966 exit signal Aborted (6)
[Wed Aug 09 16:37:32.178636 2017] [core:notice] [pid 373:tid 139789210740864] AH00052: child pid 2034 exit signal Aborted (6)

I've installed directadmin serveral times in the past and never had any big problems, until now :(
 
Pretty sure there is some mod_ruid2 bug with debian 9, not isolated to just us... so make sure that's fully shut off in the options.conf.
Once off, be sure to run the ./build rewrite_confs.

If you still get a segfaults, check what it's doing with gdb:
https://help.directadmin.com/item.php?id=687

or create a ticket for us to check.

Debian 9 is still in beta, so new issues can pop up until more testing is done.

John
 
Thank you for the hint! Changing "mod_ruid2=yes" to "mod_ruid2=no" in the options.conf file fixed it for me.

Do you have an estimate how low DA for Debian9 will be beta? I want to replace an old server with a fresh one and prefer to use the latest stable debian.
 
It's usually what decides how long it will be in beta. Once we have no reported issues for the span of about 2 weeks, we're usually fairly confident in it.
Right now, we're not aware of any issues with it, but that doesn't mean there aren't any :)
Usually once install, it's good to go, as most new OS bugs are typically compiler issues, or things that show themselves right away... which we're not seeing now.

Anyway, if you want to try the new Debian 9 now and want us to install, just let us know and we can do that for you to ensure it's all good.
Worst case, we redo, and go back to Debian 8.

John
 
It's pretty frustrating that nothing has been happening on the Debian side. :(

Yes I know it's an open-source project... Not sure if I can donate some money to get someone working on this :/
 
Hi Recently, I found the same problem on CentOS 8 as well. I have to set ./build set mod_ruid2 n then rewrite_confs to get it works.

Here is my os versions.

Code:
[root@webhost custombuild]# cat /etc/redhat-release
CentOS Linux release 8.1.1911 (Core)

[root@webhost custombuild]# uname -a
Linux webhost 4.18.0-147.3.1.el8_1.x86_64 #1 SMP Fri Jan 3 23:55:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
 
Back
Top