[Bug 252579] fork() causes process to hang in rare circumstances.
| Newsgroups | gmane.os.freebsd.devel.threading |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252579
Bug ID: 252579
Summary: fork() causes process to hang in rare circumstances.
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: threads
Assignee: [email protected]
Reporter: [email protected]
Created attachment 221461
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=221461&action=edit
NSS module and test program
This bug is discovered on FreeBSD 13-CURRENT but can also be reproduced on
12.2-RELEASE. It causes a process to hung when fork(2) is called and specific
NSS (Name Switch Service) module is used.
How to reproduce:
1) Download archive in the attachment.
2) Compile NSS stub module (do not forget .1 at the end of compiled module):
cc -shared -fPIC -pthread -o nss_stub.so.1 nss_stub.c
3) Copy nss_stub.so.1 to /usr/local/lib
4) Edit /etc/nsswitch.conf and replace 'hosts: files dns' witch 'hosts: files
dns stub'
5) Compile test program: cc -o bug bug.c
6) Run it, it will hang, so even killall -9 bug won't kill it.
There is a small and unpleasant discussion on freebsd-net mailing list with
Konstantin Belousov who wanted me to reproduce this bug without editing
/etc/nsswitch.conf I think it's either impossible, because NSS system is
somehow messing with fork, or it's beyond my competence. So the provided way to
reproduce the bug is as minimal as I can get.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-threads
To unsubscribe, send any mail to "[email protected]"