Bug#839742: hurd: system() is broken after dlclose() of SO which links to curl-gnutls

2016-10-09 Thread Eugene V. Lyubimkin
Hi Samuel,

On 09.10.2016 13:23, Samuel Thibault wrote:
> Samuel Thibault, on Tue 04 Oct 2016 15:33:58 +0200, wrote:
>> Eugene V. Lyubimkin, on Tue 04 Oct 2016 14:37:58 +0200, wrote:
>>> On Hurd, if one loads and unloads the shared object which was linked to
>>> curl-gnutls library, system() stops to work.
>>
>> It looks like gnutls calls pthread_atfork(), and thus on unload the
>> registered hook points to nowhere. glibc seems to have support to avoid
>> the issue, I had started to put the infrastructure for using it on
>> hurd-i386 but didn't finish. I'll see how easy it'll be to finish it :)
> 
> It's easy, will commit the fix :)

Cool, thanks :)



Bug#839742: hurd: system() is broken after dlclose() of SO which links to curl-gnutls

2016-10-09 Thread Samuel Thibault
Samuel Thibault, on Tue 04 Oct 2016 15:33:58 +0200, wrote:
> Eugene V. Lyubimkin, on Tue 04 Oct 2016 14:37:58 +0200, wrote:
> > On Hurd, if one loads and unloads the shared object which was linked to
> > curl-gnutls library, system() stops to work.
> 
> It looks like gnutls calls pthread_atfork(), and thus on unload the
> registered hook points to nowhere. glibc seems to have support to avoid
> the issue, I had started to put the infrastructure for using it on
> hurd-i386 but didn't finish. I'll see how easy it'll be to finish it :)

It's easy, will commit the fix :)

Samuel



Bug#839742: hurd: system() is broken after dlclose() of SO which links to curl-gnutls

2016-10-04 Thread Samuel Thibault
Hello,

Eugene V. Lyubimkin, on Tue 04 Oct 2016 14:37:58 +0200, wrote:
> On Hurd, if one loads and unloads the shared object which was linked to
> curl-gnutls library, system() stops to work.

It looks like gnutls calls pthread_atfork(), and thus on unload the
registered hook points to nowhere. glibc seems to have support to avoid
the issue, I had started to put the infrastructure for using it on
hurd-i386 but didn't finish. I'll see how easy it'll be to finish it :)

Thanks,
Samuel



Bug#839742: hurd: system() is broken after dlclose() of SO which links to curl-gnutls

2016-10-04 Thread Eugene V. Lyubimkin
Package: libc0.3
Version: 2.24-3
Severity: normal
Control: affects -1 cupt

[ Not sure if it's libc or kernel or something else, please reassign if
needed. ]

Dear Maintainer,

Thank you for maintaining Glibc.

On Hurd, if one loads and unloads the shared object which was linked to
curl-gnutls library, system() stops to work. Namely, it then returns 11
without executing a command passed.

A test case is attached. To run:
1) install cmake and libcurl4-gnutls-dev;
2) unpack attached .tar
3) $ ./run.sh


-- System Information:
Debian Release: 8.0
Architecture: amd64 (x86_64)

Kernel: Linux 4.3.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)


dlclose.tar
Description: Unix tar archive