mac sonoma 14.1 uncaught exception only when using launchctl

58 views
Skip to first unread message

Brock Palen

unread,
Oct 27, 2023, 10:38:12 PM10/27/23
to bareos-users
Updated my personal mac to Sonoma, bareos wouldn’t start so grabed the latest packge,

22.1.1~pre160.72763729a

If I start it manually it works just fine:
cd /usr/local/bareos
sudo /usr/local/bareos/sbin/bareos-fd

When I use launchctl
sudo launchctl start com.bareos.bareos-fd

I get in /var/run/bareos.log

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString stringByStandardizingPath]: unrecognized selector sent to instance 0x600000724440'
*** First throw call stack:
(
0 CoreFoundation 0x00007ff817261aae __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007ff816d585ff objc_exception_throw + 48
2 CoreFoundation 0x00007ff8173069dd -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00007ff8171cfff8 ___forwarding___ + 1379
4 CoreFoundation 0x00007ff8171cfa08 _CF_forwarding_prep_0 + 120
5 Foundation 0x00007ff818094b8f -[NSProcessInfo arguments] + 203
6 CoreFoundation 0x00007ff8172d4572 __getDefaultArguments_block_invoke + 101
7 libdispatch.dylib 0x00007ff816f6d59a _dispatch_client_callout + 8
8 libdispatch.dylib 0x00007ff816f6e7cb _dispatch_once_callout + 20
9 CoreFoundation 0x00007ff8172d3f83 _addBackstopValuesForIdentifierAndSource + 626
10 CoreFoundation 0x00007ff81719bfc4 __81-[_CFXPreferences(SourceAdditions) withNamedVolatileSourceForIdentifier:perform:]_block_invoke + 151
11 CoreFoundation 0x00007ff8172d3c4c -[_CFXPreferences withNamedVolatileSourceForIdentifier:perform:] + 241
12 CoreFoundation 0x00007ff8171a2c00 -[CFPrefsSearchListSource addNamedVolatileSourceForIdentifier:] + 98
13 CoreFoundation 0x00007ff81730e479 __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke.160 + 310
14 CoreFoundation 0x00007ff81730e146 -[_CFXPreferences withSearchLists:] + 60
15 CoreFoundation 0x00007ff81719d5e6 __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 278
16 CoreFoundation 0x00007ff81730e2be -[_CFXPreferences withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 349
17 CoreFoundation 0x00007ff81719d06b -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] + 124
18 CoreFoundation 0x00007ff81719cfb5 _CFPreferencesCopyAppValueWithContainerAndConfiguration + 101
19 libbareos.22.1.1.dylib 0x000000010a5788f8 _libintl_locale_name_default + 66
20 libbareos.22.1.1.dylib 0x000000010a5768b7 libintl_dcigettext + 1571
21 libbareos.22.1.1.dylib 0x000000010a53dff5 _ZL7gettextPKc + 21
22 libbareos.22.1.1.dylib 0x000000010a542e70 __cxx_global_var_init + 16
23 libbareos.22.1.1.dylib 0x000000010a5431d9 _GLOBAL__sub_I_var.cc + 9
24 dyld 0x000000020107ffea ___ZZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateEENK3$_0clEv_block_invoke + 182
25 dyld 0x00000002010c176f ___ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv_block_invoke.180 + 241
26 dyld 0x00000002010b5963 ___ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE_block_invoke + 543
27 dyld 0x000000020106307f _ZNK5dyld39MachOFile18forEachLoadCommandER11DiagnosticsU13block_pointerFvPK12load_commandRbE + 249
28 dyld 0x00000002010b4b2c _ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE + 176
29 dyld 0x00000002010c135a _ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv + 470
30 dyld 0x000000020107cd1c _ZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateE + 222
31 dyld 0x00000002010825eb _ZNK5dyld416JustInTimeLoader15runInitializersERNS_12RuntimeStateE + 21
32 dyld 0x000000020107cf11 _ZNK5dyld46Loader23runInitializersBottomUpERNS_12RuntimeStateERN5dyld35ArrayIPKS0_EE + 181
33 dyld 0x000000020107cef3 _ZNK5dyld46Loader23runInitializersBottomUpERNS_12RuntimeStateERN5dyld35ArrayIPKS0_EE + 151
34 dyld 0x000000020107cef3 _ZNK5dyld46Loader23runInitializersBottomUpERNS_12RuntimeStateERN5dyld35ArrayIPKS0_EE + 151
35 dyld 0x0000000201080060 _ZZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateEENK3$_1clEv + 98
36 dyld 0x000000020107cfa7 _ZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateE + 93
37 dyld 0x000000020109e9ad _ZN5dyld44APIs25runAllInitializersForMainEv + 317
38 dyld 0x0000000201068261 _ZN5dyld4L7prepareERNS_4APIsEPKN5dyld313MachOAnalyzerE + 3397
39 dyld 0x000000020106733f start + 1839
)
libc++abi: terminating due to uncaught exception of type NSException




Brock Palen
bro...@mlds-networks.com
www.mlds-networks.com
Websites, Linux, Hosting, Joomla, Consulting



Joshua Myles

unread,
Oct 31, 2023, 3:34:21 PM10/31/23
to bareos-users
Hi Brock,

I just ran into this too with 22.1.1 (subscription release).

OS build info:

 ~ % sw_vers
ProductName:        macOS
ProductVersion:     14.1
BuildVersion:       23B74
 ~ %

Log looks similar, attached.

Were you going to submit a bug report on this?

Josh
bareos.log

Brock Palen

unread,
Oct 31, 2023, 4:15:23 PM10/31/23
to Joshua Myles, bareos-users
I never did, please do subscriber will be prioritized (as they should be on average)


Brock Palen
bro...@mlds-networks.com
www.mlds-networks.com
Websites, Linux, Hosting, Joomla, Consulting



> --
> You received this message because you are subscribed to the Google Groups "bareos-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bareos-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/5b54b1d0-02b0-4cf3-add4-037d0e9a91d7n%40googlegroups.com.
> <bareos.log>

Joshua Myles

unread,
Oct 31, 2023, 7:15:37 PM10/31/23
to bareos-users

Joshua Myles

unread,
Nov 5, 2023, 12:39:46 PM11/5/23
to bareos-users
There hasn't been any motion on the bug report, so I came up with a workaround (this is definitely not a fix). The bug isn't hit if you have the LC_MESSAGES environment variable set. This is maybe why it worked for you with sudo but not launchctl, Brock. To do this with launchctl, set the environment variable in /Library/LaunchDaemons/com.bareos.bareos-fd.plist.

<key>EnvironmentVariables</key>
<dict>
<key>LC_MESSAGES</key>
<string>C</string>
</dict>

Full example file attached.

Then unload, reload, and start the service.

sudo launchctl unload -w /Library/LaunchDaemons/com.bareos.bareos-fd.plist
sudo launchctl load -w /Library/LaunchDaemons/com.bareos.bareos-fd.plist
sudo launchctl start com.bareos.bareos-fd

I also found that bareos-fd was looking for a wrong Working Directory even though it is set correctly in the plist (I tested this to be sure). This is what I got in /var/run/bareos-fd.log:

bareos-fd: ERROR TERMINATION at lib/util.cc:1072
Working Directory: "/usr/local/var/lib/bareos" not found. Cannot continue.

I'm not sure if this is another bug, but as a workaround I created that directory. bareos-fd does want to use that directory, so it's best as a symlink to the normal location.

% sudo mkdir -p /usr/local/var/lib
% sudo ln -s /usr/local/bareos/var/lib/bareos /usr/local/var/lib/bareos

Josh

On Tuesday, October 31, 2023 at 7:15:37 PM UTC-4 Joshua Myles wrote:

Josh
com.bareos.bareos-fd.plist

Jörg Steffens

unread,
Dec 4, 2023, 11:33:25 AM12/4/23
to bareos...@googlegroups.com
When https://github.com/bareos/bareos/pull/1592 got merged, these bugs
should be gone.

Regards,
Jörg


On 05.11.23 at 18:39 wrote Joshua Myles:
> <https://bugs.bareos.org/view.php?id=1565>
>
> Josh
>
> --
> You received this message because you are subscribed to the Google
> Groups "bareos-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to bareos-users...@googlegroups.com
> <mailto:bareos-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/bareos-users/fb4740ec-82e3-49fe-b5e0-52e0ae095436n%40googlegroups.com <https://groups.google.com/d/msgid/bareos-users/fb4740ec-82e3-49fe-b5e0-52e0ae095436n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Jörg Steffens joerg.s...@bareos.com
Bareos GmbH & Co. KG Phone: +49 221 630693-91
https://www.bareos.com Fax: +49 221 630693-10

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Komplementär: Bareos Verwaltungs-GmbH
Geschäftsführer: Stephan Dühr, Jörg Steffens, Philipp Storz


Reply all
Reply to author
Forward
0 new messages