From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: setrlimit hangs the process
Date: Tue, 9 Oct 2018 15:45:21 -0400 [thread overview]
Message-ID: <20181009194521.GJ17110@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAA3hR4cm8m4sov-w7WLx-LOGJEDdtQ-TPm2DJbVMVwF+ZZt1mQ@mail.gmail.com>
On Tue, Oct 09, 2018 at 09:37:06PM +0200, Rabbitstack wrote:
> Should we raise an issue in Go upstream repository since there is nothing
> actionable from musl side?
Yes, I think so.
Rich
> El vie., 5 oct. 2018 2:47, Rich Felker <dalias@libc.org> escribió:
>
> > On Thu, Oct 04, 2018 at 11:53:02AM -0400, Rich Felker wrote:
> > > On Thu, Oct 04, 2018 at 05:41:52PM +0200, Rabbitstack wrote:
> > > > Please use the following link to download strace since daemon is
> > refusing
> > > > to deliver the mail.
> > > >
> > > > https://www.dropbox.com/s/syhbzxvijf7s4v1/agent.strace?dl=0
> > >
> > > Here is the bug:
> > >
> > > 6208 rt_sigprocmask(SIG_SETMASK, ~[HUP INT QUIT ILL TRAP ABRT BUS FPE
> > SEGV TERM STKFLT CHLD PROF SYS RTMIN RT_1], <unfinished ...>
> > >
> > > Apparently Go has its own version of sigfillset, rather than calling
> > > the libc one, and it's hard-coded the glibc values for which signals
> > > are reserved for the implementation (just RTMIN and RT_1) rather than
> > > honoring SIGRTMIN (which resolves at runtime via a function call),
> > > which would exempt RT_2 from being blocked too.
> > >
> > > It needs to be fixed on the Go side. I'll look at it later if nobody
> > > else more familiar with Go gets to it sooner.
> >
> > If these are the right source files:
> >
> > https://golang.org/src/runtime/os_linux_generic.go#L33
> > https://golang.org/src/runtime/sys_linux_amd64.s#L290
> >
> > Then they're not even making any attempt to avoid stomping on
> > implementation-internal signals, and there's nothing musl could do to
> > prevent this. This suggests to me that something in your codebase is
> > explicitly avoiding RTMIN and RT_1 (33 and 34). Making it also avoid
> > RT_2 (35) would be a short-term hack you could use to get past this
> > problem, but there's no guarantee assignments won't change in the
> > future (this is why SIGRTMIN and SIGRTMAX macros expand to functions
> > calls). Really if a Go program wants to use libc, it needs to avoid
> > bypassing libc in ways that change the process state (like signal mask
> > or disposition).
> >
> > Rich
> >
next prev parent reply other threads:[~2018-10-09 19:45 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-25 12:59 Rabbitstack
2018-09-25 14:15 ` Szabolcs Nagy
2018-09-25 14:54 ` Rabbitstack
2018-09-25 15:13 ` Rich Felker
2018-09-25 15:38 ` Szabolcs Nagy
2018-09-25 15:36 ` Szabolcs Nagy
2018-09-25 16:38 ` Rich Felker
2018-10-04 14:54 ` Rabbitstack
2018-10-04 15:04 ` Rich Felker
2018-10-04 15:41 ` Rabbitstack
2018-10-04 15:53 ` Rich Felker
2018-10-04 16:05 ` Rabbitstack
2018-10-05 0:47 ` Rich Felker
2018-10-09 19:37 ` Rabbitstack
2018-10-09 19:45 ` Rich Felker [this message]
2018-10-09 20:36 ` Szabolcs Nagy
2018-10-09 20:40 ` Rich Felker
2018-10-11 15:14 ` Rabbitstack
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181009194521.GJ17110@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).