httpd-webdav segmentation faults when starting with mod_dav_tpc
I was adding our custom module mod_resolve
and mod_dav_tpc
to the httpd-webdav image on branch .
Unfortunately, httpd seg faults immediately during start up.
$ webdav-docker build images/httpd-webdav
$ webdav-docker build images/configurations/webdav
$ docker container run -it --rm --net httpd-webdav-pytest --name httpd registry.hzdr.de/kit-scc-sdm/onlinestorage/httpd-webdav/production-config/configurations/webdav bash
(docker) $ httpd -DFOREGROUND
[Fri Jun 23 11:47:07.008750 2023] [core:trace3] [pid 16] core.c(3471): Setting LogLevel for all modules to trace8
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.19.0.3. Set the 'ServerName' directive globally to suppress this message
[Fri Jun 23 11:47:07.009620 2023] [oauth2:debug] [pid 16] src/mod_oauth2.c(261): oauth2_post_config: enter
Segmentation fault (core dumped)
(docker) $ apt update && apt install -y gdb
(docker) $ gdb httpd
(gdb) $ run -DFOREGROUND
warning: Error disabling address space randomization: Operation not permitted
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Fri Jun 23 11:51:17.953355 2023] [core:trace3] [pid 833] core.c(3471): Setting LogLevel for all modules to trace8
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.19.0.3. Set the 'ServerName' directive globally to suppress this message
[Fri Jun 23 11:51:17.958277 2023] [oauth2:debug] [pid 833] src/mod_oauth2.c(261): oauth2_post_config: enter
Program received signal SIGSEGV, Segmentation fault.
__strcmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:115
115 ../sysdeps/x86_64/multiarch/strcmp-avx2.S: No such file or directory.
(gdb) $ bt
#0 __strcmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:115
#1 0x00007efcce5173b9 in g_str_equal () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007efcce515e03 in g_hash_table_lookup () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007efcce538c8a in g_quark_from_static_string () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007efcceb78530 in ?? () from /usr/lib/x86_64-linux-gnu/libgfal_transfer.so.2
#5 0x00007efcd000dfe2 in call_init (l=<optimized out>, argc=argc@entry=2, argv=argv@entry=0x7fffb0590aa8, env=env@entry=0x7fffb0590ac0) at dl-init.c:72
#6 0x00007efcd000e0e9 in call_init (env=0x7fffb0590ac0, argv=0x7fffb0590aa8, argc=2, l=<optimized out>) at dl-init.c:30
#7 _dl_init (main_map=0x557f13013740, argc=2, argv=0x7fffb0590aa8, env=0x7fffb0590ac0) at dl-init.c:119
#8 0x00007efccfe59aed in __GI__dl_catch_exception (exception=<optimized out>, operate=<optimized out>, args=<optimized out>) at dl-error-skeleton.c:182
#9 0x00007efcd0012364 in dl_open_worker (a=a@entry=0x7fffb058fec0) at dl-open.c:758
#10 0x00007efccfe59a90 in __GI__dl_catch_exception (exception=0x7fffb058fea0, operate=0x7efcd0011ca0 <dl_open_worker>, args=0x7fffb058fec0) at dl-error-skeleton.c:208
#11 0x00007efcd00118fa in _dl_open (file=0x7efccfc77b60 "/usr/local/apache2/modules/mod_dav_tpc.so", mode=-2147483390, caller_dlopen=0x7efccff35b0d <apr_dso_load+29>, nsid=-2, argc=2,
argv=0x7fffb058fea0, env=0x7fffb0590ac0) at dl-open.c:837
#12 0x00007efccfcaa258 in dlopen_doit (a=a@entry=0x7fffb05900e0) at dlopen.c:66
#13 0x00007efccfe59a90 in __GI__dl_catch_exception (exception=exception@entry=0x7fffb0590080, operate=0x7efccfcaa200 <dlopen_doit>, args=0x7fffb05900e0) at dl-error-skeleton.c:208
#14 0x00007efccfe59b4f in __GI__dl_catch_error (objname=0x557f12fbc560, errstring=0x557f12fbc568, mallocedp=0x557f12fbc558, operate=<optimized out>, args=<optimized out>) at dl-error-skeleton.c:227
#15 0x00007efccfcaaa65 in _dlerror_run (operate=operate@entry=0x7efccfcaa200 <dlopen_doit>, args=args@entry=0x7fffb05900e0) at dlerror.c:170
#16 0x00007efccfcaa2e4 in __dlopen (file=<optimized out>, mode=<optimized out>) at dlopen.c:87
#17 0x00007efccff35b0d in apr_dso_load (res_handle=res_handle@entry=0x7fffb05902a8, path=path@entry=0x7efccfc77b60 "/usr/local/apache2/modules/mod_dav_tpc.so", pool=0x7efccfca3028)
at ./dso/unix/dso.c:139
#18 0x0000557f11f1d75f in dso_load (cmd=cmd@entry=0x7fffb05907c0, modhandlep=modhandlep@entry=0x7fffb05902a8, filename=filename@entry=0x7efcce633898 "modules/mod_dav_tpc.so",
used_filename=used_filename@entry=0x7fffb05902b8) at mod_so.c:162
#19 0x0000557f11f1da22 in load_module (cmd=0x7fffb05907c0, dummy=<optimized out>, modname=0x7efcce633888 "dav_tpc_module", filename=0x7efcce633898 "modules/mod_dav_tpc.so") at mod_so.c:263
#20 0x0000557f11f08f3a in invoke_cmd (cmd=0x557f11f4c720 <so_cmds>, parms=parms@entry=0x7fffb05907c0, mconfig=mconfig@entry=0x7fffb05906a0, args=<optimized out>,
args@entry=0x7efccfc7717b "dav_tpc_module modules/mod_dav_tpc.so") at config.c:947
#21 0x0000557f11f09923 in execute_now (p=0x7efccfc720c8, ptemp=0x7efccfc77b30, parent=<optimized out>, sub_tree=0x7fffb05906a0, parms=0x7fffb05907c0,
args=0x7efccfc7717b "dav_tpc_module modules/mod_dav_tpc.so", cmd_line=0x7efccfc77b30 "LoadModule") at config.c:1706
#22 ap_build_config_sub (p=p@entry=0x7efccfca3028, temp_pool=temp_pool@entry=0x7efccfc77028, l=<optimized out>, parms=parms@entry=0x7fffb05907c0, current=current@entry=0x7fffb0590710,
curr_parent=curr_parent@entry=0x7fffb0590718, conftree=0x557f11f54db0 <ap_conftree>) at config.c:1170
#23 0x0000557f11f0ba85 in ap_build_config (parms=parms@entry=0x7fffb05907c0, p=p@entry=0x7efccfca3028, temp_pool=temp_pool@entry=0x7efccfc77028, conftree=conftree@entry=0x557f11f54db0 <ap_conftree>)
at config.c:1427
#24 0x0000557f11f0c3a1 in ap_process_resource_config (s=s@entry=0x7efccfc79110, fname=0x7efccfc72298 "/usr/local/apache2/conf/httpd.conf", conftree=conftree@entry=0x557f11f54db0 <ap_conftree>,
p=p@entry=0x7efccfca3028, ptemp=ptemp@entry=0x7efccfc77028) at config.c:1876
#25 0x0000557f11f0d3c7 in ap_read_config (process=process@entry=0x7efccfca5118, ptemp=<optimized out>, filename=filename@entry=0x557f11f2a220 "conf/httpd.conf", conftree=<optimized out>)
at config.c:2338
#26 0x0000557f11ee1f00 in main (argc=<optimized out>, argv=<optimized out>) at main.c:788
So the seg fault occurs during loading mod_dav_tpc
(19) which in turn loads gfal_transfer
(~9) which initialises itself (4) and executes some glib functions for that.
The problem is probably again due to a combination of libraries being loaded... Disabling the loading of either mod_dav_tpc
or mod_auth_openidc
leads to httpd starting up.
Perhaps again an issue with symbol conflicts (mod-dav-tpc#1 (closed))?
Generally, mod_dav_tpc
does load without problems in the docker containers used for testing in its own repository.
Also, we have not faced this issue on RHEL7, where we are loading both.
/cc @Sven.Siebler /cc @cw296