Bug 222751 - sysutils/facter 3.9.0 fails when locate not set and custom facts are used (Puppet4 port used as well)
Summary: sysutils/facter 3.9.0 fails when locate not set and custom facts are used (P...
Status: Closed DUPLICATE of bug 222125
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: FreeBSD Puppet Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-03 10:02 UTC by Hristo Mohamed
Modified: 2017-10-11 07:42 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hristo Mohamed 2017-10-03 10:02:06 UTC
On a clean puppet4 installation with CFacter, facter -p runs fine.
When I run it against my existing puppet infrastructure, I get : 
2017-10-03 11:33:47.023229 WARN  puppetlabs.facter - Could not initialize locale, even with LC_* variables cleared. Continuing without localization support
2017-10-03 11:33:50.301838 FATAL puppetlabs.facter - unhandled exception: cxxrt::bad_alloc


Deleting all my custom facts, solves the issue. But then if I do:
export LC_CTYPE=en_US.UTF-8

and rerun facter -p, the command goes through and all my facts are reported correctly.
Running only facter executes correctly.

Attaching gdb with : 
(gdb) b 'std::bad_alloc::bad_alloc()'
Function "std::bad_alloc::bad_alloc()" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) run -p
[New Thread 808216f00 (LWP 101455/ruby-timer-thr)]
2017-10-03 11:40:41.899334 FATAL puppetlabs.facter - unhandled exception: cxxrt::bad_alloc
Comment 1 Zach Leslie freebsd_committer freebsd_triage 2017-10-06 16:24:01 UTC
I believe this is related to a locale issue, for which a patch has just been committed.  Please test the new version of puppet4 and let me know if this is still a problem.  I'll leave this ticket open for the moment, as this looks different than the other reports we had about the locale issue.
Comment 2 Romain Tartière freebsd_committer freebsd_triage 2017-10-11 07:42:25 UTC
I guess it's a duplicate of bug 222125 regarding running Puppet in non-UTF-8 env.

*** This bug has been marked as a duplicate of bug 222125 ***