Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Feb 2020 11:25:12 +0000
From:      Dr Josef Karthauser <joe@truespeed.com>
To:        freebsd-stable@freebsd.org
Cc:        Richard Smith <richards@truespeed.com>
Subject:   PAM modules; pthreads not reliably dispatching background threads :(.
Message-ID:  <1F45763E-08A1-4308-A77A-B5CA30CF3909@truespeed.com>
References:  <9E850062-AA7F-4A0F-98B2-7FBE8B58AE76@truespeed.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Folks,

Has anyone got any experience with PAM and pthreads?

We=E2=80=99re using a 2FA module (pam_yubico =
https://www.freebsd.org/cgi/man.cgi?query=3Dpam_yubico&sektion=3D8 =
<https://www.freebsd.org/cgi/man.cgi?query=3Dpam_yubico&sektion=3D8>).

It=E2=80=99s proving unreliable. Digging deeper it uses libcurl to =
communication to an HTTP endpoint, and libcurl is using pthreads for to =
make asynchronous DNS lookup requests.=20

It seems that the pthreads are not being handled reliably within the PAM =
runtime context - the background threads do not complete or dispatch. =
It=E2=80=99s very strange.

The problem doesn=E2=80=99t happen if we use the same code running from =
a user land process. The pthreads are reliably in this context.

Is there a known issue with PAM and pthreads? Hints are that there are =
(https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214540 =
<https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214540>). But that =
problem was reported 3 years ago!

HELP!

If you know something I=E2=80=99d really appreciate a steer!

Many thanks,
Joe
=E2=80=94=20
Dr Josef Karthauser
Chief Technical Officer=20
(01225) 300371 / (07703) 596893=20
www.truespeed.com <http://www.truespeed.com/>=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1F45763E-08A1-4308-A77A-B5CA30CF3909>