Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segfault with macaroons on XRootD 5.6.2 #2114

Closed
matyasselmeci opened this issue Oct 28, 2023 · 0 comments · Fixed by #2118
Closed

segfault with macaroons on XRootD 5.6.2 #2114

matyasselmeci opened this issue Oct 28, 2023 · 0 comments · Fixed by #2118
Assignees
Milestone

Comments

@matyasselmeci
Copy link
Contributor

We have a user that's seeing a segfault in xrootd when it's configured with macaroons. This is their cconfig dump:

cconfig -c /etc/xrootd/xrootd-clustered.cfg
all.adminpath /var/spool/xrootd/var/spool 
all.pidpath /var/run/xrootd/var/run 
all.export /rucio 
xrd.port 1094
xrootd.chksum adler32 
xrd.tls /etc/grid-security/xrd/xrdcert.pem /etc/grid-security/xrd/xrdkey.pem 
xrd.tlsca certdir /etc/grid-security/certificates 
xrootd.tls capable all -data 
xrootd.seclib /usr/lib64/libXrdSec.so 
ofs.tpc logok autorm pgm /etc/xrootd/xrdcp-tpc2.sh 
acc.audit deny 
acc.authdb /etc/xrootd/auth_file 
acc.authrefresh 60 
ofs.authorize 1 
sec.protocol /usr/lib64 gsi -certdir:/etc/grid-security/certificates  -cert:/etc/grid-security/xrd/xrdcert.pem  -key:/etc/grid-security/xrd/xrdkey.pem  -crl:1  -gmapopt:trymap  -gridmap:/etc/grid-security/grid-mapfile  -vomsfun:default 
xrd.protocol http:1094 /usr/lib64/libXrdHttp.so 
http.cadir /etc/grid-security/certificates 
http.cert /etc/grid-security/xrd/xrdcert.pem 
http.key /etc/grid-security/xrd/xrdkey.pem 
http.listingdeny yes 
http.staticpreload http://static/robots.txt /etc/xrootd/robots.txt 
http.desthttps yes 
http.exthandler xrdtpc libXrdHttpTPC.so 
macaroons.secretkey /etc/xrootd/macaroon-secret 
ofs.authlib libXrdMacaroons.so 
http.exthandler xrdmacaroons libXrdMacaroons.so 
http.header2cgi Authorization authz 
http.gridmap /etc/grid-security/grid-mapfile 
http.secxtractor /usr/lib64/libXrdHttpVOMS.so 
all.sitename Jlab 
ofs.authorize 1 
sec.protocol host 
ofs.authdb /etc/xrootd/auth_file 
acc.authrefresh 600 

and the traceback from gdb.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff26fc700 (LWP 24804)]
XrdNetAddrInfo::Name (this=0x0, eName=eName@entry=0x7ffff7ba5c38 "?", eText=eText@entry=0x0) at /usr/src/debug/xrootd/xrootd-5.6.2/src/XrdNet/XrdNetAddrInfo.cc:319
319     if (IP.Addr.sa_family == AF_UNIX) return "localhost";
(gdb)
(gdb)
(gdb) where
#0  XrdNetAddrInfo::Name (this=0x0, eName=eName@entry=0x7ffff7ba5c38 "?", eText=eText@entry=0x0) at /usr/src/debug/xrootd/xrootd-5.6.2/src/XrdNet/XrdNetAddrInfo.cc:319
#1  0x00007ffff7b8814b in XrdAccAccess::Resolve (Entity=Entity@entry=0x7fffe000e438) at /usr/src/debug/xrootd/xrootd-5.6.2/src/XrdAcc/XrdAccAccess.cc:343
#2  0x00007ffff7b88955 in XrdAccAccess::Access (this=0x698aa0, Entity=0x7fffe000e438, path=0x7fffe0030168 "/rucio/dir/testFile", oper=AOP_Any, Env=<optimized out>)
    at /usr/src/debug/xrootd/xrootd-5.6.2/src/XrdAcc/XrdAccAccess.cc:167
#3  0x00007fffef94a9fa in Macaroons::Authz::Access (this=this@entry=0x698e80, Entity=0x7fffe000e438, path=path@entry=0x7fffe0030168 "/rucio/dir/testFile", oper=oper@entry=AOP_Any, env=env@entry=0x0)
    at /usr/src/debug/xrootd/xrootd-5.6.2/src/XrdMacaroons/XrdMacaroonsAuthz.cc:171
#4  0x00007fffef943ade in Macaroons::Handler::GenerateActivities (this=this@entry=0x6be9e0, req=..., resource="/rucio/dir/testFile")
    at /usr/src/debug/xrootd/xrootd-5.6.2/src/XrdMacaroons/XrdMacaroonsHandler.cc:179
#5  0x00007fffef944e26 in Macaroons::Handler::GenerateMacaroonResponse (this=this@entry=0x6be9e0, req=..., resource="/rucio/dir/testFile", other_caveats=std::vector of length 1, capacity 1 = {...},
    validity=validity@entry=10800, oauth_response=oauth_response@entry=false) at /usr/src/debug/xrootd/xrootd-5.6.2/src/XrdMacaroons/XrdMacaroonsHandler.cc:487
#6  0x00007fffef947fae in Macaroons::Handler::ProcessReq (this=0x6be9e0, req=...) at /usr/src/debug/xrootd/xrootd-5.6.2/src/XrdMacaroons/XrdMacaroonsHandler.cc:461
#7  0x00007ffff1ade6bc in XrdHttpReq::ProcessHTTPReq (this=this@entry=0x7fffe000e560) at /usr/src/debug/xrootd/xrootd-5.6.2/src/XrdHttp/XrdHttpReq.cc:917
#8  0x00007ffff1ad6825 in XrdHttpProtocol::Process (this=0x7fffe000e400, lp=<optimized out>) at /usr/src/debug/xrootd/xrootd-5.6.2/src/XrdHttp/XrdHttpProtocol.cc:872
#9  0x00007ffff7877a26 in XrdLinkXeq::DoIt (this=0x7fffe00070e8) at /usr/src/debug/xrootd/xrootd-5.6.2/src/Xrd/XrdLinkXeq.cc:320
#10 0x00007ffff78741d9 in XrdLink::setProtocol (this=0x7fffe00070e8, pp=<optimized out>, runit=<optimized out>, push=<optimized out>) at /usr/src/debug/xrootd/xrootd-5.6.2/src/Xrd/XrdLink.cc:435
#11 0x00007ffff787ae6a in XrdScheduler::Run (this=0x613e60 <XrdGlobal::Sched>) at /usr/src/debug/xrootd/xrootd-5.6.2/src/Xrd/XrdScheduler.cc:406
#12 0x00007ffff787af89 in XrdStartWorking (carg=<optimized out>) at /usr/src/debug/xrootd/xrootd-5.6.2/src/Xrd/XrdScheduler.cc:89
#13 0x00007ffff7806a97 in XrdSysThread_Xeq (myargs=0x64a440) at /usr/src/debug/xrootd/xrootd-5.6.2/src/XrdSys/XrdSysPthread.cc:86
#14 0x00007ffff696eea5 in start_thread () from /lib64/libpthread.so.0
#15 0x00007ffff6697b0d in clone () from /lib64/libc.so.6
(gdb)

any ideas? This is using the xrootd 5.6.2-2.2 RPMs from OSG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants