[prev in list] [next in list] [prev in thread] [next in thread] 

List:       macports-users
Subject:    Re: bash prints errors for every non-existing command
From:       brian <bholder+macports () gmail ! com>
Date:       2024-04-25 7:08:12
Message-ID: CAGX8P==8X8OVrB_DQ-606EZ6C9si0zKvGbjktQZW2cOgx4FA1A () mail ! gmail ! com
[Download RAW message or body]

Bash should probably be compiled with --disable-nls to workaround.

More generally this problem is described here:
http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html
 and here: https://wefearchange.org/2018/11/forkmacos.rst.html and here:
https://blog.phusion.nl/2017/10/13/why-ruby-app-servers-break-on-macos-high-sierra-and-what-can-be-done-about-it/


It's not a gettext issue. It's just like calling malloc in a signal
handler. Or backtrace to catch that SIGSEGV if you aren't careful. LOL.

Thanks.

On Thu, Apr 25, 2024 at 2:08 AM Baerenblau via macports-users <
macports-users@lists.macports.org> wrote:

> Indeed, $LANG is the root cause (any of $LC_* is not set). Unset of $LANG
> or LANG=en_US.UTF-8 helps in my environment, setting it to e.g. "C" does
> not help.
> 
> At least a workaround :-)
> 
> Issue #41248 was created 10 years ago but it didn't happen for me until I
> upgraded to the current or previous Macos version.
> 
> Thanks!
> 
> Am 24.04.24 um 23:42 schrieb Rainer Müller:
> > On 24.04.24 18:33, Baerenblau via macports-users wrote:
> > > I'm on macOS 14.4.1 (23E224) and continue to experience a long standing
> problem with bash from Macports
> > > 
> > > % which bash
> > > /opt/local/bin/bash
> > > 
> > > % bash --version
> > > GNU bash, Version 5.2.26(1)-release (x86_64-apple-darwin23.2.0)
> > > 
> > > For every command which is not found a error similar error like this is
> printed:
> > > 
> > > $ asdf
> > > objc[1321]: +[__SwiftNativeNSStringBase initialize] may have been in
> progress in another thread when fork() was called.
> > > objc[1321]: +[__SwiftNativeNSStringBase initialize] may have been in
> progress in another thread when fork() was called. We cannot safely call it
> or ignore it in the fork() child process. Crashing instead. Set a
> breakpoint on objc_initializeAfterForkError to debug.
> > > Abort trap: 6
> > > 
> > > Xcode has been installed today. Then MacPorts has been updated to the
> latest version, machine is rebooted, issue continues to exist.
> > 
> > This is indeed a very long standing issue:
> > https://trac.macports.org/ticket/41248
> > https://trac.macports.org/ticket/68638
> > 
> > It appears that this crash is actually caused by gettext, when
> localizing the error message in the child process forked by bash.
> > 
> > Rainer
> 


[Attachment #3 (text/html)]

<div dir="ltr">Bash should probably be compiled with --disable-nls to \
workaround.<div><br></div><div>More generally this problem is described here:  <a \
href="http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_10 \
13.html">http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html</a> \
and here:  <a href="https://wefearchange.org/2018/11/forkmacos.rst.html">https://wefearchange.org/2018/11/forkmacos.rst.html</a> \
and here:  <a href="https://blog.phusion.nl/2017/10/13/why-ruby-app-servers-break-on-m \
acos-high-sierra-and-what-can-be-done-about-it/">https://blog.phusion.nl/2017/10/13/wh \
y-ruby-app-servers-break-on-macos-high-sierra-and-what-can-be-done-about-it/</a></div><div><br></div><div>It&#39;s \
not a gettext issue. It&#39;s just like calling malloc in a signal handler. Or \
backtrace to catch that SIGSEGV if you aren&#39;t careful. \
LOL.<br></div><div><br></div><div>Thanks.</div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 25, 2024 at \
2:08 AM Baerenblau via macports-users &lt;<a \
href="mailto:macports-users@lists.macports.org">macports-users@lists.macports.org</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Indeed, \
$LANG is the root cause (any of $LC_* is not set). Unset of $LANG or LANG=en_US.UTF-8 \
helps in my environment, setting it to e.g. &quot;C&quot; does not help.<br> <br>
At least a workaround :-)<br>
<br>
Issue #41248 was created 10 years ago but it didn&#39;t happen for me until I \
upgraded to the current or previous Macos version.<br> <br>
Thanks!<br>
<br>
Am 24.04.24 um 23:42 schrieb Rainer Müller:<br>
&gt; On 24.04.24 18:33, Baerenblau via macports-users wrote:<br>
&gt;&gt; I&#39;m on macOS 14.4.1 (23E224) and continue to experience a long standing \
problem with bash from Macports<br> &gt;&gt;<br>
&gt;&gt; % which bash<br>
&gt;&gt; /opt/local/bin/bash<br>
&gt;&gt;<br>
&gt;&gt; % bash --version<br>
&gt;&gt; GNU bash, Version 5.2.26(1)-release (x86_64-apple-darwin23.2.0)<br>
&gt;&gt;<br>
&gt;&gt; For every command which is not found a error similar error like this is \
printed:<br> &gt;&gt;<br>
&gt;&gt; $ asdf<br>
&gt;&gt; objc[1321]: +[__SwiftNativeNSStringBase initialize] may have been in \
progress in another thread when fork() was called.<br> &gt;&gt; objc[1321]: \
+[__SwiftNativeNSStringBase initialize] may have been in progress in another thread \
when fork() was called. We cannot safely call it or ignore it in the fork() child \
process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to \
debug.<br> &gt;&gt; Abort trap: 6<br>
&gt;&gt;<br>
&gt;&gt; Xcode has been installed today. Then MacPorts has been updated to the latest \
version, machine is rebooted, issue continues to exist.<br> &gt;<br>
&gt; This is indeed a very long standing issue:<br>
&gt; <a href="https://trac.macports.org/ticket/41248" rel="noreferrer" \
target="_blank">https://trac.macports.org/ticket/41248</a><br> &gt; <a \
href="https://trac.macports.org/ticket/68638" rel="noreferrer" \
target="_blank">https://trac.macports.org/ticket/68638</a><br> &gt;<br>
&gt; It appears that this crash is actually caused by gettext, when localizing the \
error message in the child process forked by bash.<br> &gt;<br>
&gt; Rainer<br>
</blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic