Re: PAM modules; pthreads not reliably dispatching background threads :(.

2020-02-16 Thread Dr Josef Karthauser
> On 16 Feb 2020, at 19:14, Jan Bramkamp  wrote:
> 
> On 09.02.20 12:25, Dr Josef Karthauser wrote:
>> Hi Folks,
>> 
>> Has anyone got any experience with PAM and pthreads?
>> 
> Is the "host" process multithreaded or at least built with Pthread support?

The pam library (libyubikey) links to libcurl, which uses pthreads. I’ve added 
debug statements and compiled, and it’s definitely not running code in the 
pthread that was dispatched.

Cheers,
Joe


___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: PAM modules; pthreads not reliably dispatching background threads :(.

2020-02-16 Thread Jan Bramkamp


On 09.02.20 12:25, Dr Josef Karthauser wrote:

Hi Folks,

Has anyone got any experience with PAM and pthreads?

We’re using a 2FA module (pam_yubico 
https://www.freebsd.org/cgi/man.cgi?query=pam_yubico=8 
).

It’s 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.

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

The problem doesn’t 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=214540 
). But that problem 
was reported 3 years ago!

HELP!

If you know something I’d really appreciate a steer!

Is the "host" process multithreaded or at least built with Pthread support?
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


PAM modules; pthreads not reliably dispatching background threads :(.

2020-02-09 Thread Dr Josef Karthauser
Hi Folks,

Has anyone got any experience with PAM and pthreads?

We’re using a 2FA module (pam_yubico 
https://www.freebsd.org/cgi/man.cgi?query=pam_yubico=8 
).

It’s 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. 

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

The problem doesn’t 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=214540 
). But that problem 
was reported 3 years ago!

HELP!

If you know something I’d really appreciate a steer!

Many thanks,
Joe
— 
Dr Josef Karthauser
Chief Technical Officer 
(01225) 300371 / (07703) 596893 
www.truespeed.com 
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"