JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for MOONSHOT-DEV Archives


MOONSHOT-DEV Archives

MOONSHOT-DEV Archives


MOONSHOT-DEV@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

MOONSHOT-DEV Home

MOONSHOT-DEV Home

MOONSHOT-DEV  June 2017

MOONSHOT-DEV June 2017

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: infinite-loop(?) bug in tids exit handlers

From:

Alejandro Pérez Méndez <[log in to unmask]>

Date:

Mon, 19 Jun 2017 08:12:34 +0200

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (141 lines)

El 16/06/17 a las 15:39, Matthew Vernon escribió:
> Hi,
>
> I've been bugging Jisc about this bug for ages, so thought I'd try
> looking at it myself. I didn't make much headway, but perhaps enough to
> let someone who knows what they're doing fix it :)
>
> The failure mode is that tids processes do not die, and instead sit
> around chewing 100% CPU - over time you have enough of these to bring
> your IdP to its knees.

So, does this only happen when you are shutting the tids process down? 
(e.g. Ctrl-C?).

> We've bodged round this by having a cron job do
> system tids restart ever 2 hours :(
>
> strace on a spinning tids produces no output (suggesting no system calls
> are being made), gdb (with moonshot-trust-router-dbg installed) always
> looks roughly like:
>
> Attaching to program: /usr/bin/tids, process 2374
> [New LWP 2375]
> [New LWP 2376]
> [New LWP 2377]
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> 0x00007fac5b1804c2 in log4shib::Category::getChainedPriority() const ()
>     from /usr/lib/x86_64-linux-gnu/liblog4shib.so.1
> (gdb) bt
> #0  0x00007fac5b1804c2 in log4shib::Category::getChainedPriority() const ()
>     from /usr/lib/x86_64-linux-gnu/liblog4shib.so.1
> #1  0x00007fac5b17fc79 in log4shib::Category::isPriorityEnabled(int)
> const ()
>     from /usr/lib/x86_64-linux-gnu/liblog4shib.so.1
> #2  0x00007fac5b1809fc in log4shib::Category::info(char const*, ...) ()
>     from /usr/lib/x86_64-linux-gnu/liblog4shib.so.1
> #3  0x00007fac5d9a63c2 in shibsp::SPConfig::term() ()
>     from /usr/lib/x86_64-linux-gnu/libshibsp.so.6
> #4  0x00007fac5d9a6a88 in shibsp::SPInternalConfig::term() ()
>     from /usr/lib/x86_64-linux-gnu/libshibsp.so.6
> #5  0x00007fac5dd6fd7e in shibresolver::ShibbolethResolver::term() ()
>     from /usr/lib/x86_64-linux-gnu/libshibresolver.so.1
> #6  0x00007fac5e1c9189 in gssEapLocalAttrProviderFinalize ()
>     from /usr/lib/x86_64-linux-gnu/gss/mech_eap.so
> #7  0x00007fac5e1c1174 in ?? () from
> /usr/lib/x86_64-linux-gnu/gss/mech_eap.so
> #8  0x00007fac5f5ebff8 in __run_exit_handlers (status=status@entry=0,
>      listp=0x7fac5f9755f8 <__exit_funcs>,
>      run_list_atexit=run_list_atexit@entry=true) at exit.c:82
> #9  0x00007fac5f5ec045 in __GI_exit (status=status@entry=0) at exit.c:104
> #10 0x00000000004059b7 in tids_accept (tids=0x190e200, listen=<optimized
> out>)
>      at tid/tids.c:485
> #11 0x0000000000405dec in tids_start (tids=tids@entry=0x190e200,
>      req_handler=req_handler@entry=0x403dc0 <tids_req_handler>,
>      auth_handler=auth_handler@entry=0x403d70 <auth_handler>,
>      hostname=<optimized out>, port=port@entry=12309,
>      cookie=cookie@entry=0x1904dc0) at tid/tids.c:546
> #12 0x0000000000403a94 in main (argc=<optimized out>, argv=<optimized out>)
>      at tid/example/tids_main.c:389
>
> tid/tids.c:485 is
>      exit(0); /* exit to kill forked child process */
>
> ...so it appears to be a bug in something's exit handlers?
> getChainedPriority does have a loop in it:
>
>          const Category* c = this;
>          while(c->getPriority() >= Priority::NOTSET) {
>              c = c->getParent();
>          }
>
> ...which makes me wonder if something is being incorrectly initialised,
> but I'm rather clutching at straws here.
>
> Debian/Ubuntu don't ship a log4shib library with debugging symbols
> installed.
>
> I then installed moonshot-gss-eap-dbg and the problem seems much slower
> to recur (to the point that I'd thought it had caused the problem to
> entirely go away); now a bt looks like:
>
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> 0x00007fd74ece84c2 in log4shib::Category::getChainedPriority() const ()
>     from /usr/lib/x86_64-linux-gnu/liblog4shib.so.1
> (gdb) bt
> #0  0x00007fd74ece84c2 in log4shib::Category::getChainedPriority() const ()
>     from /usr/lib/x86_64-linux-gnu/liblog4shib.so.1
> #1  0x00007fd74ece7c79 in log4shib::Category::isPriorityEnabled(int)
> const ()
>     from /usr/lib/x86_64-linux-gnu/liblog4shib.so.1
> #2  0x00007fd74ece89fc in log4shib::Category::info(char const*, ...) ()
>     from /usr/lib/x86_64-linux-gnu/liblog4shib.so.1
> #3  0x00007fd75150e3c2 in shibsp::SPConfig::term() ()
>     from /usr/lib/x86_64-linux-gnu/libshibsp.so.6
> #4  0x00007fd75150ea88 in shibsp::SPInternalConfig::term() ()
>     from /usr/lib/x86_64-linux-gnu/libshibsp.so.6
> #5  0x00007fd7518d7d7e in shibresolver::ShibbolethResolver::term() ()
>     from /usr/lib/x86_64-linux-gnu/libshibresolver.so.1
> #6  0x00007fd751d310f7 in gss_eap_shib_attr_provider::finalize ()
>      at util_shib.cpp:481
> #7  0x00007fd751d31189 in gssEapLocalAttrProviderFinalize (
>      minor=minor@entry=0x7ffeac0d31f4) at util_shib.cpp:550
> #8  0x00007fd751d29174 in (anonymous
> namespace)::finalize_class::~finalize_class (this=<optimized out>,
> __in_chrg=<optimized out>) at util_attr.cpp:101
> #9  0x00007fd753153ff8 in __run_exit_handlers (status=status@entry=0,
>      listp=0x7fd7534dd5f8 <__exit_funcs>,
>      run_list_atexit=run_list_atexit@entry=true) at exit.c:82
> #10 0x00007fd753154045 in __GI_exit (status=status@entry=0) at exit.c:104
> #11 0x00000000004059b7 in tids_accept (tids=0x968200, listen=<optimized
> out>)
>      at tid/tids.c:485
> #12 0x0000000000405dec in tids_start (tids=tids@entry=0x968200,
>      req_handler=req_handler@entry=0x403dc0 <tids_req_handler>,
>      auth_handler=auth_handler@entry=0x403d70 <auth_handler>,
>      hostname=<optimized out>, port=port@entry=12309,
>      cookie=cookie@entry=0x95edc0) at tid/tids.c:546
> #13 0x0000000000403a94 in main (argc=<optimized out>, argv=<optimized out>)
>      at tid/example/tids_main.c:389
>
> This is an Ubuntu Xenial system, but I've seen the runaway-tids problem
> basically since I started looking at the moonshot pilot back at my
> previous job (where we were running Debian).

Which installation instructions have you followed? I failed to find 
official ones for Ubuntu Xenial.
Not saying that is the problem, but wondering whether incorrect 
libraries might be related.

Regards,
Alejandro

>
> Regards,
>
> Matthew
>
>

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

March 2022
December 2021
October 2021
September 2021
August 2021
June 2021
April 2021
February 2021
January 2021
December 2020
November 2020
October 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
April 2018
February 2018
January 2018
December 2017
November 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
February 2017
January 2017
December 2016
October 2016
September 2016
August 2016
June 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
August 2015
July 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager