{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/9371","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/9371/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/9371/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/9371/events","html_url":"https://github.com/NixOS/nixpkgs/issues/9371","id":102167139,"number":9371,"title":"Locale-related error on running gawk","user":{"login":"mwilson-ns","id":6087802,"avatar_url":"https://avatars.githubusercontent.com/u/6087802?v=3","gravatar_id":"","url":"https://api.github.com/users/mwilson-ns","html_url":"https://github.com/mwilson-ns","followers_url":"https://api.github.com/users/mwilson-ns/followers","following_url":"https://api.github.com/users/mwilson-ns/following{/other_user}","gists_url":"https://api.github.com/users/mwilson-ns/gists{/gist_id}","starred_url":"https://api.github.com/users/mwilson-ns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwilson-ns/subscriptions","organizations_url":"https://api.github.com/users/mwilson-ns/orgs","repos_url":"https://api.github.com/users/mwilson-ns/repos","events_url":"https://api.github.com/users/mwilson-ns/events{/privacy}","received_events_url":"https://api.github.com/users/mwilson-ns/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-20T15:33:32Z","updated_at":"2015-08-20T18:06:11Z","closed_at":"2015-08-20T18:06:11Z","body":"After doing a system update to my Arch machine, I can no longer run awk (and other things, e.g., perl) because of what look like locale-related issues perhaps due to glibc.\r\n\r\n`which awk`:\r\n```\r\n/home/mwilson/.nix-profile/bin/awk\r\n```\r\n\r\n`awk`\r\n```\r\nawk: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed.\r\n```\r\n\r\n`ldd $(which awk)`:\r\n\r\n```\r\n\tlinux-vdso.so.1 (0x00007fff8dbc5000)\r\n\tlibdl.so.2 => /nix/store/6k9z1sfl7kghmagwd205k3i81pbcw57s-glibc-2.21/lib/libdl.so.2 (0x00007f943dc61000)\r\n\tlibm.so.6 => /nix/store/6k9z1sfl7kghmagwd205k3i81pbcw57s-glibc-2.21/lib/libm.so.6 (0x00007f943d95e000)\r\n\tlibc.so.6 => /nix/store/6k9z1sfl7kghmagwd205k3i81pbcw57s-glibc-2.21/lib/libc.so.6 (0x00007f943d5be000)\r\n\t/nix/store/6k9z1sfl7kghmagwd205k3i81pbcw57s-glibc-2.21/lib/ld-linux-x86-64.so.2 (0x00007f943de65000)\r\n```\r\n\r\n`strace awk`\r\n\r\n```\r\nexecve(\"/home/mwilson/.nix-profile/bin/awk\", [\"awk\"], [/* 73 vars */]) = 0\r\nbrk(0)                                  = 0x1cd7000\r\nmmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fab8c93c000\r\naccess(\"/etc/ld-nix.so.preload\", R_OK)  = -1 ENOENT (No such file or directory)\r\nopen(\"/nix/store/6k9z1sfl7kghmagwd205k3i81pbcw57s-glibc-2.21/lib/tls/x86_64/libdl.so.2\", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)\r\nstat(\"/nix/store/6k9z1sfl7kghmagwd205k3i81pbcw57s-glibc-2.21/lib/tls/x86_64\", 0x7ffca8594560) = -1 ENOENT (No such file or directory)\r\nopen(\"/nix/store/6k9z1sfl7kghmagwd205k3i81pbcw57s-glibc-2.21/lib/tls/libdl.so.2\", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)\r\nstat(\"/nix/store/6k9z1sfl7kghmagwd205k3i81pbcw57s-glibc-2.21/lib/tls\", 0x7ffca8594560) = -1 ENOENT (No such file or directory)\r\nopen(\"/nix/store/6k9z1sfl7kghmagwd205k3i81pbcw57s-glibc-2.21/lib/x86_64/libdl.so.2\", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)\r\nstat(\"/nix/store/6k9z1sfl7kghmagwd205k3i81pbcw57s-glibc-2.21/lib/x86_64\", 0x7ffca8594560) = -1 ENOENT (No such file or directory)\r\nopen(\"/nix/store/6k9z1sfl7kghmagwd205k3i81pbcw57s-glibc-2.21/lib/libdl.so.2\", O_RDONLY|O_CLOEXEC) = 3\r\nread(3, \"\\177ELF\\2\\1\\1\\0\\0\\0\\0\\0\\0\\0\\0\\0\\3\\0>\\0\\1\\0\\0\\0p\\16\\0\\0\\0\\0\\0\\0\"..., 832) = 832\r\nfstat(3, {st_mode=S_IFREG|0555, st_size=18638, ...}) = 0\r\nmmap(NULL, 2109712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fab8c51a000\r\nmprotect(0x7fab8c51c000, 2097152, PROT_NONE) = 0\r\nmmap(0x7fab8c71c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fab8c71c000\r\nclose(3)                                = 0\r\nopen(\"/nix/store/6k9z1sfl7kghmagwd205k3i81pbcw57s-glibc-2.21/lib/libm.so.6\", O_RDONLY|O_CLOEXEC) = 3\r\nread(3, \"\\177ELF\\2\\1\\1\\0\\0\\0\\0\\0\\0\\0\\0\\0\\3\\0>\\0\\1\\0\\0\\0\\360W\\0\\0\\0\\0\\0\\0\"..., 832) = 832\r\nfstat(3, {st_mode=S_IFREG|0555, st_size=1127110, ...}) = 0\r\nmmap(NULL, 3154264, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fab8c217000\r\nmprotect(0x7fab8c318000, 2097152, PROT_NONE) = 0\r\nmmap(0x7fab8c518000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x101000) = 0x7fab8c518000\r\nclose(3)                                = 0\r\nopen(\"/nix/store/6k9z1sfl7kghmagwd205k3i81pbcw57s-glibc-2.21/lib/libc.so.6\", O_RDONLY|O_CLOEXEC) = 3\r\nread(3, \"\\177ELF\\2\\1\\1\\0\\0\\0\\0\\0\\0\\0\\0\\0\\3\\0>\\0\\1\\0\\0\\0\\260\\n\\2\\0\\0\\0\\0\\0\"..., 832) = 832\r\nfstat(3, {st_mode=S_IFREG|0555, st_size=1920067, ...}) = 0\r\nmmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fab8c93b000\r\nmmap(NULL, 3799584, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fab8be77000\r\nmprotect(0x7fab8c00d000, 2097152, PROT_NONE) = 0\r\nmmap(0x7fab8c20d000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x196000) = 0x7fab8c20d000\r\nmmap(0x7fab8c213000, 14880, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fab8c213000\r\nclose(3)                                = 0\r\nmmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fab8c93a000\r\nmmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fab8c939000\r\narch_prctl(ARCH_SET_FS, 0x7fab8c93a700) = 0\r\nmprotect(0x7fab8c20d000, 16384, PROT_READ) = 0\r\nmprotect(0x7fab8c518000, 4096, PROT_READ) = 0\r\nmprotect(0x7fab8c71c000, 4096, PROT_READ) = 0\r\nmprotect(0x7fab8c93e000, 4096, PROT_READ) = 0\r\nbrk(0)                                  = 0x1cd7000\r\nbrk(0x1cf8000)                          = 0x1cf8000\r\nopen(\"/nix/store/6k9z1sfl7kghmagwd205k3i81pbcw57s-glibc-2.21/lib/locale/locale-archive\", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)\r\nopen(\"/usr/lib/locale/locale-archive\", O_RDONLY|O_CLOEXEC) = 3\r\nfstat(3, {st_mode=S_IFREG|0644, st_size=1629600, ...}) = 0\r\nmmap(NULL, 1629600, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fab8c7ab000\r\nclose(3)                                = 0\r\nwrite(2, \"awk: loadlocale.c:130: _nl_inter\"..., 150awk: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed.\r\n) = 150\r\nmmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fab8c7aa000\r\nrt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0\r\ngettid()                                = 12282\r\ntgkill(12282, 12282, SIGABRT)           = 0\r\n--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=12282, si_uid=1000} ---\r\n+++ killed by SIGABRT (core dumped) +++\r\n```\r\n\r\nOS: arch linux\r\n```\r\ncat /etc/lsb-release                                                                    1 ↵\r\nLSB_VERSION=1.4\r\nDISTRIB_ID=Arch\r\nDISTRIB_RELEASE=rolling\r\nDISTRIB_DESCRIPTION=\"Arch Linux\"\r\n```\r\n\r\n```\r\nuname -a                                                                                                                                                                                         127 ↵\r\nLinux octet 4.1.5-1-ARCH #1 SMP PREEMPT Tue Aug 11 15:41:14 CEST 2015 x86_64 GNU/Linux\r\n```\r\n\r\n```\r\nnix-env --version                                                                                                                                                                                  1 ↵\r\nnix-env (Nix) 1.9\r\n```"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/133101686","html_url":"https://github.com/NixOS/nixpkgs/issues/9371#issuecomment-133101686","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/9371","id":133101686,"user":{"login":"vcunat","id":1785925,"avatar_url":"https://avatars.githubusercontent.com/u/1785925?v=3","gravatar_id":"","url":"https://api.github.com/users/vcunat","html_url":"https://github.com/vcunat","followers_url":"https://api.github.com/users/vcunat/followers","following_url":"https://api.github.com/users/vcunat/following{/other_user}","gists_url":"https://api.github.com/users/vcunat/gists{/gist_id}","starred_url":"https://api.github.com/users/vcunat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vcunat/subscriptions","organizations_url":"https://api.github.com/users/vcunat/orgs","repos_url":"https://api.github.com/users/vcunat/repos","events_url":"https://api.github.com/users/vcunat/events{/privacy}","received_events_url":"https://api.github.com/users/vcunat/received_events","type":"User","site_admin":false},"created_at":"2015-08-20T18:06:11Z","updated_at":"2015-08-20T18:06:11Z","body":"We have that in https://github.com/NixOS/nix/issues/599, already with longer discussion. Better keep all in one place (nixpkgs is better place than nix, but we can't move threads AFAIK)."}}